From a57092cd4e7d3f98c17b5a2529e1b5c2619347f2 Mon Sep 17 00:00:00 2001 From: nitro-neal Date: Tue, 6 Jun 2023 15:25:48 -0400 Subject: [PATCH 1/3] List Credentials without params (#489) * list creds * Apply suggestions from code review Co-authored-by: Andres Uribe * update spec * adding info instead of warn * fix spec * update log * updating to listcredentials --------- Co-authored-by: Gabe <7622243+decentralgabe@users.noreply.github.com> Co-authored-by: Andres Uribe --- doc/docs.go | 2 +- doc/swagger.yaml | 5 ++- pkg/server/router/credential.go | 33 ++++++++++++---- pkg/server/server_credential_test.go | 57 ++++++++++++++++++++++++++++ pkg/service/credential/service.go | 28 +++++++++++++- pkg/service/credential/storage.go | 52 +++++++++++++++++++------ 6 files changed, 153 insertions(+), 24 deletions(-) diff --git a/doc/docs.go b/doc/docs.go index bc9498af4..c92190341 100644 --- a/doc/docs.go +++ b/doc/docs.go @@ -5,7 +5,7 @@ package doc import "github.com/swaggo/swag/v2" const docTemplate = `{ - "schemes": {{ marshal .Schemes }},"swagger":"2.0","info":{"description":"{{escape .Description}}","title":"{{.Title}}","contact":{"name":"TBD","url":"https://github.com/TBD54566975/ssi-service/issues","email":"tbd-developer@squareup.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"version":"{{.Version}}"},"host":"{{.Host}}","basePath":"{{.BasePath}}","paths":{"/health":{"get":{"description":"Health is a simple handler that always responds with a 200 OK","consumes":["application/json"],"produces":["application/json"],"tags":["HealthCheck"],"summary":"Health Check","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetHealthCheckResponse"}}}}},"/readiness":{"get":{"description":"Readiness runs a number of application specific checks to see if all the relied upon services are\nhealthy.","consumes":["application/json"],"produces":["application/json"],"tags":["Readiness"],"summary":"Readiness","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetReadinessResponse"}}}}},"/v1/credentials":{"get":{"description":"Checks for the presence of a query parameter and calls the associated filtered get method. Only one parameter is allowed to be specified.","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"List Credentials","parameters":[{"type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp","description":"The issuer id","name":"issuer","in":"query"},{"type":"string","description":"The credentialSchema.id value to filter by","name":"schema","in":"query"},{"type":"string","description":"The credentialSubject.id value to filter by","name":"subject","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListCredentialsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create a verifiable credential","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Create Credential","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateCredentialRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/status/{id}":{"get":{"description":"Get credential status list by id.","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential Status List","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialStatusListResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/verification":{"put":{"description":"Verify a given credential by its id. The system does the following levels of verification:\n1. Makes sure the credential has a valid signature\n2. Makes sure the credential has is not expired\n3. Makes sure the credential complies with the VC Data Model\n4. If the credential has a schema, makes sure its data complies with the schema","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Verify Credential","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.VerifyCredentialRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.VerifyCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/{id}":{"get":{"description":"Get credential by id","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"delete":{"description":"Delete credential by ID","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Delete Credentials","parameters":[{"type":"string","description":"ID of the credential to delete","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/{id}/status":{"get":{"description":"Get credential status by id","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential Status","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialStatusResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Update a credential's status","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Update Credential Status","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.UpdateCredentialStatusRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.UpdateCredentialStatusResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/dids":{"get":{"description":"Get the list of supported DID methods","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"List DID Methods","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDIDMethodsResponse"}}}}},"/v1/dids/resolver/{id}":{"get":{"description":"Resolve a DID that may not be stored in this service","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Resolve a DID","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ResolveDIDResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/dids/{method}":{"get":{"description":"List DIDs by method. Checks for an optional \"deleted=true\" query parameter, which exclusively returns DIDs that have been \"Soft Deleted\".","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"List DIDs","parameters":[{"type":"boolean","description":"When true, returns soft-deleted DIDs. Otherwise, returns DIDs that have not been soft-deleted. Default is false.","name":"deleted","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDIDsByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Creates a fully custodial DID document with the given method. The document created is stored internally\nand can be retrieved using the GetOperation. Method dependent registration (for example, DID web\nregistration) is left up to the clients of this API. The private key(s) created by the method are stored\ninternally never leave the service boundary.","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Create DID Document","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodRequest"}},{"type":"string","description":"Method","name":"method","in":"path","required":true}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/dids/{method}/{id}":{"get":{"description":"Get DID by method","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Get DID","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodRequest"}},{"type":"string","description":"Method","name":"method","in":"path","required":true},{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetDIDByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"When this is called with the correct did method and id it will flip the softDelete flag to true for the db entry.\nA user can still get the did if they know the DID ID, and the did keys will still exist, but this did will not show up in the ListDIDsByMethod call\nThis facilitates a clean SSI-Service Admin UI but not leave any hanging VCs with inaccessible hanging DIDs.\nSoft Deletes DID by method","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Soft Delete DID","parameters":[{"type":"string","description":"Method","name":"method","in":"path","required":true},{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/issuancetemplates":{"put":{"description":"Create issuance template","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Create issuance template","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateIssuanceTemplateRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/issuancetemplates/{id}":{"get":{"description":"Get an issuance template by its id","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Get issuance template","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete issuance template by ID","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Delete issuance template","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/keys":{"put":{"description":"Stores a key to be used by the service","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Store Key","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.StoreKeyRequest"}}],"responses":{"201":{"description":"Created"},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/keys/{id}":{"get":{"description":"Get details about a stored key","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Get Details For Key","parameters":[{"type":"string","description":"ID of the key to get","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetKeyDetailsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Marks the stored key as being revoked, along with the timestamps of when it was revoked. NB: the key can still be used for signing. This will likely be addressed before v1 is released.","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Revoke Key","parameters":[{"type":"string","description":"ID of the key to revoke","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.RevokeKeyResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests":{"get":{"description":"Checks for the presence of a query parameter and calls the associated filtered get method","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"List manifests","parameters":[{"type":"string","description":"string issuer","name":"issuer","in":"query"},{"type":"string","description":"string schema","name":"schema","in":"query"},{"type":"string","description":"string subject","name":"subject","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create manifest","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Create manifest","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications":{"get":{"description":"List all the existing applications.","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"List applications","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListApplicationsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Submit a credential application in response to a credential manifest. The request body is expected to","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Submit application","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.SubmitApplicationRequest"}}],"responses":{"201":{"description":"Operation with a SubmitApplicationResponse type in the ` + "`" + `result.response` + "`" + ` field.","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications/{id}":{"get":{"description":"Get application by id","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Get application","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetApplicationResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete application by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Delete applications","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications/{id}/review":{"put":{"description":"Reviewing an application either fulfills or denies the credential.","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Reviews an application","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.ReviewApplicationRequest"}}],"responses":{"201":{"description":"Credential Response","schema":{"$ref":"#/definitions/pkg_server_router.SubmitApplicationResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/requests":{"get":{"description":"Lists all the existing credential manifest requests","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"List Credential Manifest Requests","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestRequestsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create manifest request from an existing credential manifest.","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Create Manifest Request Request","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/requests/{id}":{"get":{"description":"Get a manifest request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Get Manifest Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetManifestRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a manifest request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Delete Manifest Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/responses":{"get":{"description":"Lists all responses","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"List responses","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListResponsesResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/responses/{id}":{"get":{"description":"Get response by id","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"Get response","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetResponseResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"delete":{"description":"Delete response by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"Delete responses","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/{id}":{"get":{"description":"Get a credential manifest by its id","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Get manifest","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete manifest by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Delete manifests","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations":{"get":{"description":"List operations according to the request","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"List operations","parameters":[{"type":"string","description":"The name of the parent's resource. For example: ` + "`" + `?parent=/presentation/submissions` + "`" + `","name":"parent","in":"query"},{"type":"string","description":"A standard filter expression conforming to https://google.aip.dev/160. For example: ` + "`" + `?filter=done=","name":"filter","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListOperationsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations/cancel/{id}":{"get":{"description":"Cancels an ongoing operation, if possible.","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"Cancel an ongoing operation","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations/{id}":{"get":{"description":"Get operation by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"Get an operation","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/definitions":{"get":{"description":"Lists all the existing presentation definitions","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"List Presentation Definitions","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDefinitionsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create presentation definition","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Create PresentationDefinition","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreatePresentationDefinitionRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreatePresentationDefinitionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/definitions/{id}":{"get":{"description":"Get a presentation definition by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Get PresentationDefinition","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetPresentationDefinitionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a presentation definition by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Delete PresentationDefinition","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/requests":{"get":{"description":"Lists all the existing presentation requests","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"List Presentation Requests","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListPresentationRequestsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create presentation request from an existing presentation definition.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Create Presentation Request","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateRequestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/requests/{id}":{"get":{"description":"Get a presentation request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Get Presentation Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a presentation request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Delete PresentationRequest","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/submissions":{"get":{"description":"List existing submissions according to a filtering query. The ` + "`" + `filter` + "`" + ` field follows the syntax described in https://google.aip.dev/160.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"List Submissions","parameters":[{"type":"string","description":"A standard filter expression conforming to https://google.aip.dev/160. For example: ` + "`" + `?filter=status=","name":"filter","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Creates a submission in this server ready to be reviewed.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Create Submission","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateSubmissionRequest"}}],"responses":{"201":{"description":"The type of response is Submission once the operation has finished.","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/submissions/{id}":{"get":{"description":"Get a submission by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Get Submission","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/presentations/submissions/{id}/review":{"put":{"description":"Reviews a pending submission. After this method is called, the operation with ` + "`" + `id==presentations/submissions/{submission_id}` + "`" + ` will be updated with the result of this invocation.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Review a pending submission","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.ReviewSubmissionRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ReviewSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/schemas":{"get":{"description":"List schemas","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"List Schemas","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListSchemasResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create schema","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Create Schema","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateSchemaRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateSchemaResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/schemas/{id}":{"get":{"description":"Get a schema by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Get Schema","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetSchemaResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a schema by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Delete Schema","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/webhooks":{"get":{"description":"Lists all webhooks","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"List Webhooks","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListWebhooksResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create webhook","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Create Webhook","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateWebhookRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateWebhookResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/webhooks/nouns":{"get":{"description":"Get supported nouns for webhook generation","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Supported Nouns","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedNounsResponse"}}}}},"/v1/webhooks/verbs":{"get":{"description":"Get supported verbs for webhook generation","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Supported Verbs","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedVerbsResponse"}}}}},"/v1/webhooks/{noun}/{verb}":{"get":{"description":"Get a webhook by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Webhook","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListWebhookResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/webhooks/{noun}/{verb}/{url}":{"delete":{"description":"Delete a webhook by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Delete Webhook","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}}},"definitions":{"credential.CredentialSchema":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string"}}},"credential.CredentialSubject":{"type":"object","additionalProperties":{}},"credential.Prohibition":{"type":"object","properties":{"action":{"type":"array","items":{"type":"string"}},"assignee":{"type":"string"},"assigner":{"type":"string"},"target":{"type":"string"}}},"credential.RefreshService":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string"}}},"credential.TermsOfUse":{"type":"object","properties":{"id":{"type":"string"},"profile":{"type":"string"},"prohibition":{"type":"array","items":{"$ref":"#/definitions/credential.Prohibition"}},"type":{"type":"string"}}},"credential.VerifiableCredential":{"type":"object","required":["@context","credentialSubject","issuanceDate","issuer","type"],"properties":{"@context":{"description":"Either a string or set of strings"},"credentialSchema":{"$ref":"#/definitions/credential.CredentialSchema"},"credentialStatus":{},"credentialSubject":{"description":"This is where the subject's ID *may* be present","allOf":[{"$ref":"#/definitions/credential.CredentialSubject"}]},"evidence":{"type":"array","items":{}},"expirationDate":{"type":"string"},"id":{"type":"string"},"issuanceDate":{"description":"https://www.w3.org/TR/xmlschema11-2/#dateTimes","type":"string"},"issuer":{"description":"either a URI or an object containing an ` + "`" + `id` + "`" + ` property."},"proof":{"description":"For embedded proof support\nProof is a digital signature over a credential https://www.w3.org/TR/2021/REC-vc-data-model-20211109/#proofs-signatures"},"refreshService":{"$ref":"#/definitions/credential.RefreshService"},"termsOfUse":{"type":"array","items":{"$ref":"#/definitions/credential.TermsOfUse"}},"type":{"description":"Either a string or a set of strings https://www.w3.org/TR/2021/REC-vc-data-model-20211109/#types"}}},"credential.VerifiablePresentation":{"type":"object","required":["type"],"properties":{"@context":{"description":"Either a string or set of strings"},"holder":{"type":"string"},"id":{"type":"string"},"presentation_submission":{"description":"an optional field as a part of https://identity.foundation/presentation-exchange/#embed-targets"},"proof":{},"type":{},"verifiableCredential":{"description":"Verifiable credential could be our object model, a JWT, or any other valid credential representation","type":"array","items":{}}}},"crypto.KeyType":{"type":"string","enum":["Ed25519","X25519","secp256k1","secp256k1-ECDSA","P-224","P-256","P-384","P-521","RSA","BLS12381G1","BLS12381G2","Dilithium2","Dilithium3","Dilithium5"],"x-enum-varnames":["Ed25519","X25519","SECP256k1","SECP256k1ECDSA","P224","P256","P384","P521","RSA","BLS12381G1","BLS12381G2","Dilithium2","Dilithium3","Dilithium5"]},"crypto.SignatureAlgorithm":{"type":"string","enum":["EdDSA","ES256K","ES256","ES384","PS256","Dilithium2","Dilithium3","Dilithium5"],"x-enum-varnames":["EdDSA","ES256K","ES256","ES384","PS256","Dilithium2Sig","Dilithium3Sig","Dilithium5Sig"]},"did.Document":{"type":"object","properties":{"@context":{},"alsoKnownAs":{"type":"string"},"assertionMethod":{"type":"array","items":{}},"authentication":{"type":"array","items":{}},"capabilityDelegation":{"type":"array","items":{}},"capabilityInvocation":{"type":"array","items":{}},"controller":{"type":"string"},"id":{"description":"As per https://www.w3.org/TR/did-core/#did-subject intermediate representations of DID Documents do not\nrequire an ID property. The provided test vectors demonstrate IRs. As such, the property is optional.","type":"string"},"keyAgreement":{"type":"array","items":{}},"service":{"type":"array","items":{"$ref":"#/definitions/github_com_TBD54566975_ssi-sdk_did.Service"}},"verificationMethod":{"type":"array","items":{"$ref":"#/definitions/did.VerificationMethod"}}}},"did.Method":{"type":"string","enum":["key","peer","pkh","web","ion","jwk"],"x-enum-varnames":["KeyMethod","PeerMethod","PKHMethod","WebMethod","IONMethod","JWKMethod"]},"did.VerificationMethod":{"type":"object","required":["controller","id","type"],"properties":{"blockchainAccountId":{"description":"for PKH DIDs - https://github.com/w3c-ccg/did-pkh/blob/90b28ad3c18d63822a8aab3c752302aa64fc9382/did-pkh-method-draft.md","type":"string"},"controller":{"type":"string"},"id":{"type":"string"},"publicKeyBase58":{"type":"string"},"publicKeyJwk":{"description":"must conform to https://datatracker.ietf.org/doc/html/rfc7517","allOf":[{"$ref":"#/definitions/jwx.PublicKeyJWK"}]},"publicKeyMultibase":{"description":"https://datatracker.ietf.org/doc/html/draft-multiformats-multibase-03","type":"string"},"type":{"type":"string"}}},"exchange.ClaimFormat":{"type":"object","properties":{"jwt":{"$ref":"#/definitions/exchange.JWTType"},"jwt_vc":{"$ref":"#/definitions/exchange.JWTType"},"jwt_vp":{"$ref":"#/definitions/exchange.JWTType"},"ldp":{"$ref":"#/definitions/exchange.LDPType"},"ldp_vc":{"$ref":"#/definitions/exchange.LDPType"},"ldp_vp":{"$ref":"#/definitions/exchange.LDPType"}}},"exchange.Constraints":{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/definitions/exchange.Field"}},"is_holder":{"type":"array","items":{"$ref":"#/definitions/exchange.RelationalConstraint"}},"limit_disclosure":{"$ref":"#/definitions/exchange.Preference"},"same_subject":{"type":"array","items":{"$ref":"#/definitions/exchange.RelationalConstraint"}},"statuses":{"description":"https://identity.foundation/presentation-exchange/#credential-status-constraint-feature","allOf":[{"$ref":"#/definitions/exchange.CredentialStatus"}]},"subject_is_issuer":{"description":"https://identity.foundation/presentation-exchange/#relational-constraint-feature","allOf":[{"$ref":"#/definitions/exchange.Preference"}]}}},"exchange.CredentialStatus":{"type":"object","properties":{"active":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}},"revoked":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}},"suspended":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}}}},"exchange.Field":{"type":"object","required":["path"],"properties":{"filter":{"$ref":"#/definitions/exchange.Filter"},"id":{"type":"string"},"intent_to_retain":{"description":"https://identity.foundation/presentation-exchange/spec/v2.0.0/#retention-feature","type":"boolean"},"name":{"type":"string"},"optional":{"type":"boolean"},"path":{"type":"array","items":{"type":"string"}},"predicate":{"description":"If a predicate property is present, filter must be too\nhttps://identity.foundation/presentation-exchange/#predicate-feature","allOf":[{"$ref":"#/definitions/exchange.Preference"}]},"purpose":{"type":"string"}}},"exchange.Filter":{"type":"object","properties":{"additionalProperties":{"type":"boolean"},"allOf":{},"const":{},"enum":{"type":"array","items":{}},"exclusiveMaximum":{},"exclusiveMinimum":{},"format":{"type":"string"},"maxLength":{"type":"integer"},"maximum":{},"minLength":{"type":"integer"},"minimum":{},"not":{},"oneOf":{},"pattern":{"type":"string"},"properties":{},"required":{"type":"array","items":{"type":"string"}},"type":{"type":"string"}}},"exchange.InputDescriptor":{"type":"object","required":["constraints","id"],"properties":{"constraints":{"$ref":"#/definitions/exchange.Constraints"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"group":{"description":"Must match a grouping strings listed in the ` + "`" + `from` + "`" + ` values of a submission requirement rule","type":"array","items":{"type":"string"}},"id":{"description":"Must be unique within the Presentation Definition","type":"string"},"name":{"type":"string"},"purpose":{"description":"Purpose for which claim's data is being requested","type":"string"}}},"exchange.JWTType":{"type":"object","required":["alg"],"properties":{"alg":{"type":"array","items":{"$ref":"#/definitions/crypto.SignatureAlgorithm"}}}},"exchange.LDPType":{"type":"object","required":["proof_type"],"properties":{"proof_type":{"type":"array","items":{"type":"string"}}}},"exchange.Preference":{"type":"string","enum":["required","preferred","allowed","disallowed"],"x-enum-varnames":["Required","Preferred","Allowed","Disallowed"]},"exchange.PresentationDefinition":{"type":"object","required":["id","input_descriptors"],"properties":{"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"frame":{"description":"https://identity.foundation/presentation-exchange/#json-ld-framing-feature"},"id":{"type":"string"},"input_descriptors":{"type":"array","items":{"$ref":"#/definitions/exchange.InputDescriptor"}},"name":{"type":"string"},"purpose":{"type":"string"},"submission_requirements":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}}}},"exchange.PresentationSubmission":{"type":"object","required":["definition_id","descriptor_map","id"],"properties":{"definition_id":{"type":"string"},"descriptor_map":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}},"id":{"type":"string"}}},"exchange.RelationalConstraint":{"type":"object","required":["directive","field_id"],"properties":{"directive":{"$ref":"#/definitions/exchange.Preference"},"field_id":{"type":"array","items":{"type":"string"}}}},"exchange.Selection":{"type":"string","enum":["all","pick"],"x-enum-varnames":["All","Pick"]},"exchange.SubmissionDescriptor":{"type":"object","required":["format","id","path"],"properties":{"format":{"type":"string"},"id":{"description":"Must match the ` + "`" + `id` + "`" + ` property of the corresponding input descriptor","type":"string"},"path":{"type":"string"},"path_nested":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}}},"exchange.SubmissionRequirement":{"type":"object","required":["rule"],"properties":{"count":{"type":"integer","minimum":1},"from":{"type":"string"},"from_nested":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}},"max":{"type":"integer"},"min":{"type":"integer"},"name":{"type":"string"},"purpose":{"type":"string"},"rule":{"$ref":"#/definitions/exchange.Selection"}}},"github_com_TBD54566975_ssi-sdk_did.Service":{"type":"object","required":["id","serviceEndpoint","type"],"properties":{"accept":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"routingKeys":{"type":"array","items":{"type":"string"}},"serviceEndpoint":{"description":"A string, map, or set composed of one or more strings and/or maps\nAll string values must be valid URIs"},"type":{"type":"string"}}},"github_com_tbd54566975_ssi-service_internal_credential.Container":{"type":"object","properties":{"credential":{"description":"Verifiable Credential in the ` + "`" + `application/vc+ld+json` + "`" + ` format. The credential is secured with an external proof\nusing JWS. In other words, the ` + "`" + `proof` + "`" + ` field is not present. See ` + "`" + `credentialJwt` + "`" + ` for the secured Verifiable\nCredential.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"JWT representation of ` + "`" + `credential` + "`" + `, secured with an external proof signed by ` + "`" + `issuerKid` + "`" + `.","type":"string"},"id":{"description":"Credential ID","type":"string"},"issuerKid":{"description":"The KID of the private key used to sign ` + "`" + `credentialJwt` + "`" + `.","type":"string"},"revoked":{"description":"Whether this credential is currently revoked.","type":"boolean"},"suspended":{"description":"Whether this credential is currently suspended.","type":"boolean"}}},"github_com_tbd54566975_ssi-service_pkg_service_framework.Status":{"type":"object","properties":{"message":{"description":"When ` + "`" + `status` + "`" + ` is ` + "`" + `\"not_ready\"` + "`" + `, message contains an explanation of why it's not ready.","type":"string"},"status":{"description":"Enum of the status.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.StatusState"}]}}},"github_com_tbd54566975_ssi-service_pkg_service_framework.StatusState":{"type":"string","enum":["ready","not_ready"],"x-enum-varnames":["StatusReady","StatusNotReady"]},"github_com_tbd54566975_ssi-service_pkg_service_issuance.ClaimTemplates":{"type":"object","additionalProperties":{}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate":{"type":"object","properties":{"credentialInputDescriptor":{"description":"Optional.\nWhen present, it's the ID of the input descriptor in the application. Corresponds to one of the\nPresentationDefinition.InputDescriptors[].ID in the credential manifest. When creating a credential, the base\ndata will be populated from the provided submission that matches this ID.\nWhen absent, there will be no base data for the credentials created. Additionally, no JSON path strings in\nClaimTemplates.Data will be resolved.","type":"string"},"data":{"description":"Data that will be used to determine credential claims.\nValues may be json path like strings, or any other JSON primitive. Each entry will be used to come up with a\nclaim about the credentialSubject in the credential that will be issued.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.ClaimTemplates"}]},"expiry":{"description":"Parameter to determine the expiry of the credential.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.TimeLike"}]},"id":{"description":"ID corresponding to an OutputDescriptor.ID from the manifest.","type":"string"},"revocable":{"description":"Whether the credentials created should be revocable.","type":"boolean"},"schema":{"description":"ID of the CredentialSchema to be used for the issued credential.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.Template":{"type":"object","required":["credentialManifest","issuer","issuerKid"],"properties":{"credentialManifest":{"description":"ID of the credential manifest that this template corresponds to.","type":"string"},"credentials":{"description":"Info required to create a credential from a credential application.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate"}},"id":{"description":"ID of this template.","type":"string"},"issuer":{"description":"ID of the issuer that will be issuance the credentials.","type":"string"},"issuerKid":{"description":"ID of the key that will be used to sign the credentials.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.TimeLike":{"type":"object","properties":{"duration":{"description":"For a fixed offset from when it was issued.","allOf":[{"$ref":"#/definitions/time.Duration"}]},"time":{"description":"For fixed time in the future.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_manifest_model.CredentialOverride":{"type":"object","properties":{"data":{"description":"Data that will be used to determine credential claims.","type":"object","additionalProperties":{}},"expiry":{"description":"Parameter to determine the expiry of the credential.","type":"string"},"revocable":{"description":"Whether the credentials created should be revocable.","type":"boolean"}}},"github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request":{"type":"object","required":["expiration","issuerId","issuerKid","manifestId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3.","type":"array","items":{"type":"string"}},"credentialManifestJwt":{"description":"CredentialManifestJWT is a JWT token with a \"presentation_definition\" claim within it. The\nvalue of the field named \"presentation_definition.id\" matches PresentationDefinitionID.\nThis is an output only field.","type":"string"},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4","type":"string"},"id":{"description":"ID for this request. It matches the \"jti\" claim in the JWT.\nThis is an output only field.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID used to sign the JWT.","type":"string"},"manifestId":{"description":"ID of the credential manifest used for this request.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request":{"type":"object","required":["expiration","issuerId","issuerKid","presentationDefinitionId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3.","type":"array","items":{"type":"string"}},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4","type":"string"},"id":{"description":"ID for this request. It matches the \"jti\" claim in the JWT.\nThis is an output only field.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID used to sign the JWT.","type":"string"},"presentationDefinitionId":{"description":"ID of the presentation definition used for this request.","type":"string"},"presentationRequestJwt":{"description":"PresentationDefinitionJWT is a JWT token with a \"presentation_definition\" claim within it. The\nvalue of the field named \"presentation_definition.id\" matches PresentationDefinitionID.\nThis is an output only field.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Submission":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedNounsResponse":{"type":"object","properties":{"nouns":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"}}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedVerbsResponse":{"type":"object","properties":{"verbs":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun":{"type":"string","enum":["Credential","DID","Manifest","SchemaID","Presentation","Application","Submission"],"x-enum-varnames":["Credential","DID","Manifest","Schema","Presentation","Application","Submission"]},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb":{"type":"string","enum":["Create","Delete"],"x-enum-varnames":["Create","Delete"]},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook":{"type":"object","required":["noun","urls","verb"],"properties":{"noun":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"},"urls":{"type":"array","items":{"type":"string"}},"verb":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}}},"jwx.PublicKeyJWK":{"type":"object","required":["kty"],"properties":{"alg":{"type":"string"},"crv":{"type":"string"},"e":{"type":"string"},"key_ops":{"type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"n":{"type":"string"},"use":{"type":"string"},"x":{"type":"string"},"y":{"type":"string"}}},"manifest.CredentialApplication":{"type":"object","required":["format","id","manifest_id","spec_version"],"properties":{"applicant":{"type":"string"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"id":{"type":"string"},"manifest_id":{"type":"string"},"presentation_submission":{"description":"Must be present if the corresponding manifest contains a presentation_definition","allOf":[{"$ref":"#/definitions/exchange.PresentationSubmission"}]},"spec_version":{"type":"string"}}},"manifest.CredentialManifest":{"type":"object","required":["id","issuer","output_descriptors","spec_version"],"properties":{"description":{"type":"string"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"id":{"type":"string"},"issuer":{"$ref":"#/definitions/manifest.Issuer"},"name":{"type":"string"},"output_descriptors":{"type":"array","items":{"$ref":"#/definitions/manifest.OutputDescriptor"}},"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"},"spec_version":{"type":"string"}}},"manifest.CredentialResponse":{"type":"object","required":["id","manifest_id","spec_version"],"properties":{"applicant":{"type":"string"},"application_id":{"type":"string"},"denial":{"type":"object","required":["reason"],"properties":{"input_descriptors":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"}}},"fulfillment":{"type":"object","required":["descriptor_map"],"properties":{"descriptor_map":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}}}},"id":{"type":"string"},"manifest_id":{"type":"string"},"spec_version":{"type":"string"}}},"manifest.Issuer":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"styles":{"description":"an object or URI as defined by the DIF Entity Styles specification\nhttps://identity.foundation/wallet-rendering/#entity-styles","allOf":[{"$ref":"#/definitions/rendering.EntityStyleDescriptor"}]}}},"manifest.OutputDescriptor":{"type":"object","required":["id","schema"],"properties":{"description":{"type":"string"},"display":{"description":"both below: an object or URI as defined by the DIF Entity Styles specification","allOf":[{"$ref":"#/definitions/rendering.DataDisplay"}]},"id":{"description":"Must be unique within a manifest","type":"string"},"name":{"type":"string"},"schema":{"type":"string"},"styles":{"$ref":"#/definitions/rendering.EntityStyleDescriptor"}}},"pkg_server_router.CreateCredentialRequest":{"type":"object","required":["data","issuer","issuerKid","subject"],"properties":{"@context":{"description":"A context is optional. If not present, we'll apply default, required context values.","type":"string"},"data":{"description":"Claims about the subject. The keys should be predicates (e.g. \"alumniOf\"), and the values can be any object.","type":"object","additionalProperties":{"type":"string"},"example":{"alumniOf":"did_for_uni"}},"expiry":{"description":"Optional. Corresponds to ` + "`" + `expirationDate` + "`" + ` in https://www.w3.org/TR/vc-data-model/#expiration.","type":"string","example":"2020-01-01T19:23:24Z"},"issuer":{"description":"The issuer id.","type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"issuerKid":{"description":"The KID used to sign the credential.","type":"string","example":"#z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"revocable":{"description":"Whether this credential can be revoked. When true, the created VC will have the \"credentialStatus\"\nproperty set.","type":"boolean"},"schemaId":{"description":"A schema ID is optional. If present, we'll attempt to look it up and validate the data against it.","type":"string"},"subject":{"description":"The subject id.","type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"suspendable":{"description":"Whether this credential can be suspended. When true, the created VC will have the \"credentialStatus\"\nproperty set.","type":"boolean"}}},"pkg_server_router.CreateCredentialResponse":{"type":"object","properties":{"credential":{"description":"Verifiable Credential in the ` + "`" + `application/vc+ld+json` + "`" + ` format. The credential is secured with an external proof\nusing JWS. In other words, the ` + "`" + `proof` + "`" + ` field is not present. See ` + "`" + `credentialJwt` + "`" + ` for the secured Verifiable\nCredential.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"JWT representation of ` + "`" + `credential` + "`" + `, secured with an external proof signed by ` + "`" + `issuerKid` + "`" + `.","type":"string"},"id":{"description":"Credential ID","type":"string"},"issuerKid":{"description":"The KID of the private key used to sign ` + "`" + `credentialJwt` + "`" + `.","type":"string"},"revoked":{"description":"Whether this credential is currently revoked.","type":"boolean"},"suspended":{"description":"Whether this credential is currently suspended.","type":"boolean"}}},"pkg_server_router.CreateDIDByMethodRequest":{"type":"object","required":["keyType"],"properties":{"keyType":{"description":"Identifies the cryptographic algorithm family to use when generating this key.\nOne of the following: \"Ed25519\", \"X25519\", \"secp256k1\", \"P-224\",\"P-256\",\"P-384\", \"P-521\", \"RSA\"","allOf":[{"$ref":"#/definitions/crypto.KeyType"}]},"options":{"description":"Options for creating the DID. Implementation dependent on the method."}}},"pkg_server_router.CreateDIDByMethodResponse":{"type":"object","properties":{"did":{"$ref":"#/definitions/did.Document"}}},"pkg_server_router.CreateIssuanceTemplateRequest":{"type":"object","required":["credentialManifest","issuer","issuerKid"],"properties":{"credentialManifest":{"description":"ID of the credential manifest that this template corresponds to.","type":"string"},"credentials":{"description":"Info required to create a credential from a credential application.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate"}},"id":{"description":"ID of this template.","type":"string"},"issuer":{"description":"ID of the issuer that will be issuance the credentials.","type":"string"},"issuerKid":{"description":"ID of the key that will be used to sign the credentials.","type":"string"}}},"pkg_server_router.CreateManifestRequest":{"type":"object","required":["format","issuerDid","issuerKid","outputDescriptors"],"properties":{"description":{"type":"string"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"issuerDid":{"type":"string"},"issuerKid":{"type":"string"},"issuerName":{"type":"string"},"name":{"type":"string"},"outputDescriptors":{"type":"array","items":{"$ref":"#/definitions/manifest.OutputDescriptor"}},"presentationDefinition":{"$ref":"#/definitions/exchange.PresentationDefinition"}}},"pkg_server_router.CreateManifestRequestRequest":{"type":"object","required":["credentialManifestId","issuerId","issuerKid"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3\nOptional","type":"array","items":{"type":"string"}},"credentialManifestId":{"description":"ID of the credential manifest to use for this request.","type":"string"},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4\nOptional. When not specified, the request will be valid for a default duration.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition. The DID must have been previously created with the DID API,\nor the PrivateKey must have been added independently.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID will be used to sign an envelope that contains\nthe created presentation definition.","type":"string"}}},"pkg_server_router.CreateManifestRequestResponse":{"type":"object","properties":{"manifestRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}},"pkg_server_router.CreateManifestResponse":{"type":"object","properties":{"credential_manifest":{"$ref":"#/definitions/manifest.CredentialManifest"}}},"pkg_server_router.CreatePresentationDefinitionRequest":{"type":"object","required":["inputDescriptors"],"properties":{"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"inputDescriptors":{"type":"array","items":{"$ref":"#/definitions/exchange.InputDescriptor"}},"name":{"type":"string"},"purpose":{"type":"string"},"submissionRequirements":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}}}},"pkg_server_router.CreatePresentationDefinitionResponse":{"type":"object","properties":{"presentationDefinitionJwt":{"description":"Signed envelope that contains the PresentationDefinition created using the privateKey of the author of the\ndefinition.","type":"string"},"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"}}},"pkg_server_router.CreateRequestRequest":{"type":"object","required":["issuerId","issuerKid","presentationDefinitionId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3\nOptional","type":"array","items":{"type":"string"}},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4\nOptional. When not specified, the request will be valid for a default duration.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition. The DID must have been previously created with the DID API,\nor the PrivateKey must have been added independently.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID will be used to sign an envelope that contains\nthe created presentation definition.","type":"string"},"presentationDefinitionId":{"description":"ID of the presentation definition to use for this request.","type":"string"}}},"pkg_server_router.CreateRequestResponse":{"type":"object","properties":{"presentationRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}},"pkg_server_router.CreateSchemaRequest":{"type":"object","required":["issuer","issuerKid","name","schema"],"properties":{"description":{"description":"Description is an optional human-readable description for a schema","type":"string"},"issuer":{"description":"Issuer represents the DID of the issuer for the schema if it's signed. Required if intending to sign the\nschema as a credential using CredentialSchema2023.","type":"string"},"issuerKid":{"description":"IssuerKID represents the KID of the issuer's private key to sign the schema. Required if intending to sign the\nschema as a credential using CredentialSchema2023.","type":"string"},"name":{"description":"Name is a human-readable name for a schema","type":"string"},"schema":{"description":"Schema represents the JSON schema for the credential schema\nIf the schema has an $id field, it will be overwritten with an ID the service generates.\nThe schema must be against draft 2020-12, 2019-09, or 7.","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]}}},"pkg_server_router.CreateSchemaResponse":{"type":"object","required":["type"],"properties":{"credentialSchema":{"description":"CredentialSchema is the JWT schema for the credential, returned when the type is CredentialSchema2023","type":"string"},"id":{"description":"ID is the URL of for resolution of the schema","type":"string"},"schema":{"description":"Schema is the JSON schema for the credential, returned when the type is JsonSchema2023","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]},"type":{"description":"Type is the type of schema such as ` + "`" + `JsonSchema2023` + "`" + ` or ` + "`" + `CredentialSchema2023` + "`" + `","allOf":[{"$ref":"#/definitions/schema.VCJSONSchemaType"}]}}},"pkg_server_router.CreateSubmissionRequest":{"type":"object","required":["submissionJwt"],"properties":{"submissionJwt":{"description":"A Verifiable Presentation that's encoded as a JWT.\nVerifiable Presentation are described in https://www.w3.org/TR/vc-data-model/#presentations-0\nJWT encoding of the Presentation as described in https://www.w3.org/TR/vc-data-model/#presentations-0","type":"string"}}},"pkg_server_router.CreateWebhookRequest":{"type":"object","required":["noun","url","verb"],"properties":{"noun":{"description":"The noun (entity) for the new webhook.eg: Credential","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"}]},"url":{"description":"The URL to post the output of this request to Noun.Verb action to.","type":"string"},"verb":{"description":"The verb for the new webhook.eg: Create","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}]}}},"pkg_server_router.CreateWebhookResponse":{"type":"object","properties":{"webhook":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook"}}},"pkg_server_router.GetApplicationResponse":{"type":"object","properties":{"application":{"$ref":"#/definitions/manifest.CredentialApplication"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialResponse":{"type":"object","properties":{"credential":{"$ref":"#/definitions/credential.VerifiableCredential"},"credentialJwt":{"type":"string"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialStatusListResponse":{"type":"object","properties":{"credential":{"description":"Credential where type includes \"VerifiableCredential\" and \"StatusList2021\".","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"The JWT signed with the associated issuer's private key.","type":"string"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialStatusResponse":{"type":"object","properties":{"revoked":{"description":"Whether the credential has been revoked.","type":"boolean"},"suspended":{"description":"Whether the credential has been suspended.","type":"boolean"}}},"pkg_server_router.GetDIDByMethodResponse":{"type":"object","properties":{"did":{"$ref":"#/definitions/did.Document"}}},"pkg_server_router.GetHealthCheckResponse":{"type":"object","properties":{"status":{"description":"Status is always equal to ` + "`" + `OK` + "`" + `.","type":"string"}}},"pkg_server_router.GetKeyDetailsResponse":{"type":"object","properties":{"controller":{"type":"string"},"createdAt":{"description":"Represents the time at which the key was created. Encoded according to RFC3339.","type":"string"},"id":{"type":"string"},"publicKeyJwk":{"description":"The public key in JWK format according to RFC7517. This public key is associated with the private\nkey with the associated ID.","allOf":[{"$ref":"#/definitions/jwx.PublicKeyJWK"}]},"type":{"$ref":"#/definitions/crypto.KeyType"}}},"pkg_server_router.GetManifestRequestResponse":{"type":"object","properties":{"manifestRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}},"pkg_server_router.GetPresentationDefinitionResponse":{"type":"object","properties":{"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"}}},"pkg_server_router.GetReadinessResponse":{"type":"object","properties":{"serviceStatuses":{"description":"A map from the name of the service to the status of that current service.","type":"object","additionalProperties":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.Status"}},"status":{"description":"Overall status of the ssi service.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.Status"}]}}},"pkg_server_router.GetRequestResponse":{"type":"object","properties":{"presentationRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}},"pkg_server_router.GetResponseResponse":{"type":"object","properties":{"credential_response":{"$ref":"#/definitions/manifest.CredentialResponse"},"responseJwt":{"type":"string"},"verifiableCredentials":{"description":"this is an interface type to union Data Integrity and JWT style VCs"}}},"pkg_server_router.GetSchemaResponse":{"type":"object","required":["type"],"properties":{"credentialSchema":{"description":"CredentialSchema is the JWT schema for the credential, returned when the type is CredentialSchema2023","type":"string"},"id":{"description":"ID is the URL of for resolution of the schema","type":"string"},"schema":{"description":"Schema is the JSON schema for the credential, returned when the type is JsonSchema2023","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]},"type":{"description":"Type is the type of schema such as ` + "`" + `JsonSchema2023` + "`" + ` or ` + "`" + `CredentialSchema2023` + "`" + `","allOf":[{"$ref":"#/definitions/schema.VCJSONSchemaType"}]}}},"pkg_server_router.GetSubmissionResponse":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"pkg_server_router.ListApplicationsResponse":{"type":"object","properties":{"applications":{"type":"array","items":{"$ref":"#/definitions/manifest.CredentialApplication"}}}},"pkg_server_router.ListCredentialsResponse":{"type":"object","properties":{"credentials":{"description":"Array of credentials that match the query parameters.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_internal_credential.Container"}}}},"pkg_server_router.ListDIDMethodsResponse":{"type":"object","properties":{"method":{"type":"array","items":{"$ref":"#/definitions/did.Method"}}}},"pkg_server_router.ListDIDsByMethodResponse":{"type":"object","properties":{"dids":{"type":"array","items":{"$ref":"#/definitions/did.Document"}}}},"pkg_server_router.ListDefinitionsResponse":{"type":"object","properties":{"definitions":{"type":"array","items":{"$ref":"#/definitions/exchange.PresentationDefinition"}}}},"pkg_server_router.ListIssuanceTemplatesResponse":{"type":"object","properties":{"issuanceTemplates":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}}}},"pkg_server_router.ListManifestRequestsResponse":{"type":"object","properties":{"manifestRequests":{"description":"The manifest requests matching the query.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}}},"pkg_server_router.ListManifestResponse":{"type":"object","properties":{"credential_manifest":{"$ref":"#/definitions/manifest.CredentialManifest"},"id":{"type":"string"}}},"pkg_server_router.ListManifestsResponse":{"type":"object","properties":{"manifests":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.ListManifestResponse"}}}},"pkg_server_router.ListOperationsResponse":{"type":"object","properties":{"operations":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.Operation"}}}},"pkg_server_router.ListPresentationRequestsResponse":{"type":"object","properties":{"presentationRequests":{"description":"The presentation requests matching the query.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}}},"pkg_server_router.ListResponsesResponse":{"type":"object","properties":{"responses":{"type":"array","items":{"$ref":"#/definitions/manifest.CredentialResponse"}}}},"pkg_server_router.ListSchemasResponse":{"type":"object","properties":{"schemas":{"description":"Schemas is the list of all schemas the service holds","type":"array","items":{"$ref":"#/definitions/pkg_server_router.GetSchemaResponse"}}}},"pkg_server_router.ListSubmissionResponse":{"type":"object","properties":{"submissions":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Submission"}}}},"pkg_server_router.ListWebhookResponse":{"type":"object","properties":{"webhook":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook"}}},"pkg_server_router.ListWebhooksResponse":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.ListWebhookResponse"}}}},"pkg_server_router.Operation":{"type":"object","required":["done","id"],"properties":{"done":{"description":"Whether this operation has finished.","type":"boolean"},"id":{"description":"The name of the resource related to this operation. E.g. \"presentations/submissions/\u003cuuid\u003e\"","type":"string"},"result":{"description":"Populated if Done == true.","allOf":[{"$ref":"#/definitions/pkg_server_router.OperationResult"}]}}},"pkg_server_router.OperationResult":{"type":"object","properties":{"error":{"description":"Populated when there was an error with the operation.","type":"string"},"response":{"description":"Populated iff Error == \"\". The type should be specified in the calling APIs documentation."}}},"pkg_server_router.ResolveDIDResponse":{"type":"object","properties":{"didDocument":{"$ref":"#/definitions/did.Document"},"didDocumentMetadata":{"$ref":"#/definitions/resolution.DocumentMetadata"},"didResolutionMetadata":{"$ref":"#/definitions/resolution.Metadata"}}},"pkg_server_router.ReviewApplicationRequest":{"type":"object","properties":{"approved":{"type":"boolean"},"credentialOverrides":{"description":"Overrides to apply to the credentials that will be created. Keys are the ID that corresponds to an\nOutputDescriptor.ID from the manifest.","type":"object","additionalProperties":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.CredentialOverride"}},"reason":{"type":"string"}}},"pkg_server_router.ReviewSubmissionRequest":{"type":"object","required":["approved"],"properties":{"approved":{"type":"boolean"},"reason":{"type":"string"}}},"pkg_server_router.ReviewSubmissionResponse":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"pkg_server_router.RevokeKeyResponse":{"type":"object","properties":{"id":{"type":"string"}}},"pkg_server_router.StoreKeyRequest":{"type":"object","required":["base58PrivateKey","controller","id","type"],"properties":{"base58PrivateKey":{"description":"Base58 encoding of the bytes that result from marshalling the private key using golang's implementation.","type":"string"},"controller":{"description":"See https://www.w3.org/TR/did-core/#did-controller","type":"string"},"id":{"description":"The ` + "`" + `id` + "`" + ` field is the unique identifier for this object. If set to a resolvable DID, the ssi-service will use\nthe private key encoded in the ` + "`" + `PrivateKeyBase58` + "`" + ` field of this object to sign objects issued or authored by this\nDID; otherwise, it will only be used to identify this object.","type":"string"},"type":{"description":"Identifies the cryptographic algorithm family used with the key.\nOne of the following: \"Ed25519\", \"X25519\", \"secp256k1\", \"P-224\", \"P-256\", \"P-384\", \"P-521\", \"RSA\".","allOf":[{"$ref":"#/definitions/crypto.KeyType"}]}}},"pkg_server_router.SubmitApplicationRequest":{"type":"object","required":["applicationJwt"],"properties":{"applicationJwt":{"description":"Contains the following properties:\nApplication manifestsdk.CredentialApplication ` + "`" + `json:\"credential_application\" validate:\"required\"` + "`" + `\nCredentials []interface{} ` + "`" + `json:\"vcs\" validate:\"required\"` + "`" + `","type":"string"}}},"pkg_server_router.SubmitApplicationResponse":{"type":"object","properties":{"credential_response":{"$ref":"#/definitions/manifest.CredentialResponse"},"responseJwt":{"type":"string"},"verifiableCredentials":{"description":"this is an any type to union Data Integrity and JWT style VCs","type":"array","items":{}}}},"pkg_server_router.UpdateCredentialStatusRequest":{"type":"object","properties":{"revoked":{"description":"The new revoked status of this credential. The status will be saved in the encodedList of the StatusList2021\ncredential associated with this VC.","type":"boolean"},"suspended":{"type":"boolean"}}},"pkg_server_router.UpdateCredentialStatusResponse":{"type":"object","properties":{"revoked":{"description":"The updated status of this credential.","type":"boolean"},"suspended":{"type":"boolean"}}},"pkg_server_router.VerifyCredentialRequest":{"type":"object","properties":{"credential":{"description":"A credential secured via data integrity. Must have the \"proof\" property set.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"A JWT that encodes a credential.","type":"string"}}},"pkg_server_router.VerifyCredentialResponse":{"type":"object","properties":{"reason":{"description":"The reason why this credential couldn't be verified.","type":"string"},"verified":{"description":"Whether the credential was verified.","type":"boolean"}}},"rendering.ColorResource":{"type":"object","properties":{"color":{"description":"a HEX string color value (e.g. #00000)","type":"string"}}},"rendering.DataDisplay":{"type":"object","properties":{"description":{"$ref":"#/definitions/rendering.DisplayMappingObject"},"properties":{"type":"array","items":{"$ref":"#/definitions/rendering.LabeledDisplayMappingObject"}},"subtitle":{"$ref":"#/definitions/rendering.DisplayMappingObject"},"title":{"$ref":"#/definitions/rendering.DisplayMappingObject"}}},"rendering.DisplayMappingObject":{"type":"object","properties":{"fallback":{"type":"string"},"path":{"description":"Ifa path is present it must be an array of JSON Path string expressions\nand the schema property must also be present.","type":"array","items":{"type":"string"}},"schema":{"$ref":"#/definitions/rendering.DisplayMappingSchema"},"text":{"description":"If path is not present, the text value is required with no other properties","type":"string"}}},"rendering.DisplayMappingSchema":{"type":"object","required":["type"],"properties":{"format":{"description":"Must be present if the value of the type property is \"string\"","allOf":[{"$ref":"#/definitions/rendering.SchemaFormat"}]},"type":{"$ref":"#/definitions/rendering.SchemaType"}}},"rendering.EntityStyleDescriptor":{"type":"object","properties":{"background":{"$ref":"#/definitions/rendering.ColorResource"},"hero":{"$ref":"#/definitions/rendering.ImageResource"},"text":{"$ref":"#/definitions/rendering.ColorResource"},"thumbnail":{"$ref":"#/definitions/rendering.ImageResource"}}},"rendering.ImageResource":{"type":"object","required":["uri"],"properties":{"alt":{"description":"Describes the alternate text for a logo image","type":"string"},"uri":{"description":"Must be a valid URI string to an image resource","type":"string"}}},"rendering.LabeledDisplayMappingObject":{"type":"object","required":["label"],"properties":{"fallback":{"type":"string"},"label":{"type":"string"},"path":{"description":"Ifa path is present it must be an array of JSON Path string expressions\nand the schema property must also be present.","type":"array","items":{"type":"string"}},"schema":{"$ref":"#/definitions/rendering.DisplayMappingSchema"},"text":{"description":"If path is not present, the text value is required with no other properties","type":"string"}}},"rendering.SchemaFormat":{"type":"string","enum":["date-time","time","date","email","idn-email","hostname","idn-hostname","ipv4","ipv6","uri","uri-reference","iri","iri-reference"],"x-enum-varnames":["DateTimeFormat","TimeFormat","DateFormat","EmailFormat","IDNEmailFormat","HostnameFormat","IDNHostnameFormat","IPV4Format","IPV6Format","URIFormat","URIReferenceFormat","IRIFormat","IRIReferenceFormat"]},"rendering.SchemaType":{"type":"string","enum":["string","boolean","number","integer"],"x-enum-varnames":["StringType","BooleanType","NumberType","IntegerType"]},"resolution.DocumentMetadata":{"type":"object","properties":{"canonicalId":{"type":"string"},"created":{"type":"string"},"deactivated":{"type":"boolean"},"equivalentId":{"type":"string"},"nextUpdate":{"type":"string"},"nextVersionId":{"type":"string"},"updated":{"type":"string"},"versionId":{"type":"string"}}},"resolution.Error":{"type":"object","properties":{"code":{"type":"string"},"invalidDid":{"type":"boolean"},"notFound":{"type":"boolean"},"representationNotSupported":{"type":"boolean"}}},"resolution.Metadata":{"type":"object","properties":{"contentType":{"type":"string"},"error":{"$ref":"#/definitions/resolution.Error"}}},"schema.JSONSchema":{"type":"object","additionalProperties":{}},"schema.VCJSONSchemaType":{"type":"string","enum":["CredentialSchema2023","JsonSchema2023"],"x-enum-varnames":["CredentialSchema2023Type","JSONSchema2023Type"]},"time.Duration":{"type":"integer","enum":[-9223372036854775808,9223372036854775807,1,1000,1000000,1000000000,60000000000,3600000000000],"x-enum-varnames":["minDuration","maxDuration","Nanosecond","Microsecond","Millisecond","Second","Minute","Hour"]}}}` + "schemes": {{ marshal .Schemes }},"swagger":"2.0","info":{"description":"{{escape .Description}}","title":"{{.Title}}","contact":{"name":"TBD","url":"https://github.com/TBD54566975/ssi-service/issues","email":"tbd-developer@squareup.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"version":"{{.Version}}"},"host":"{{.Host}}","basePath":"{{.BasePath}}","paths":{"/health":{"get":{"description":"Health is a simple handler that always responds with a 200 OK","consumes":["application/json"],"produces":["application/json"],"tags":["HealthCheck"],"summary":"Health Check","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetHealthCheckResponse"}}}}},"/readiness":{"get":{"description":"Readiness runs a number of application specific checks to see if all the relied upon services are\nhealthy.","consumes":["application/json"],"produces":["application/json"],"tags":["Readiness"],"summary":"Readiness","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetReadinessResponse"}}}}},"/v1/credentials":{"get":{"description":"Checks for the presence of an optional query parameter and calls the associated filtered get method. Only one optional parameter is allowed to be specified.","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"List Credentials","parameters":[{"type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp","description":"The issuer id","name":"issuer","in":"query"},{"type":"string","description":"The credentialSchema.id value to filter by","name":"schema","in":"query"},{"type":"string","description":"The credentialSubject.id value to filter by","name":"subject","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListCredentialsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create a verifiable credential","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Create Credential","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateCredentialRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/status/{id}":{"get":{"description":"Get credential status list by id.","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential Status List","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialStatusListResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/verification":{"put":{"description":"Verify a given credential by its id. The system does the following levels of verification:\n1. Makes sure the credential has a valid signature\n2. Makes sure the credential has is not expired\n3. Makes sure the credential complies with the VC Data Model\n4. If the credential has a schema, makes sure its data complies with the schema","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Verify Credential","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.VerifyCredentialRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.VerifyCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/{id}":{"get":{"description":"Get credential by id","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"delete":{"description":"Delete credential by ID","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Delete Credentials","parameters":[{"type":"string","description":"ID of the credential to delete","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/{id}/status":{"get":{"description":"Get credential status by id","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential Status","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialStatusResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Update a credential's status","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Update Credential Status","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.UpdateCredentialStatusRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.UpdateCredentialStatusResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/dids":{"get":{"description":"Get the list of supported DID methods","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"List DID Methods","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDIDMethodsResponse"}}}}},"/v1/dids/resolver/{id}":{"get":{"description":"Resolve a DID that may not be stored in this service","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Resolve a DID","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ResolveDIDResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/dids/{method}":{"get":{"description":"List DIDs by method. Checks for an optional \"deleted=true\" query parameter, which exclusively returns DIDs that have been \"Soft Deleted\".","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"List DIDs","parameters":[{"type":"boolean","description":"When true, returns soft-deleted DIDs. Otherwise, returns DIDs that have not been soft-deleted. Default is false.","name":"deleted","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDIDsByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Creates a fully custodial DID document with the given method. The document created is stored internally\nand can be retrieved using the GetOperation. Method dependent registration (for example, DID web\nregistration) is left up to the clients of this API. The private key(s) created by the method are stored\ninternally never leave the service boundary.","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Create DID Document","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodRequest"}},{"type":"string","description":"Method","name":"method","in":"path","required":true}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/dids/{method}/{id}":{"get":{"description":"Get DID by method","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Get DID","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodRequest"}},{"type":"string","description":"Method","name":"method","in":"path","required":true},{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetDIDByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"When this is called with the correct did method and id it will flip the softDelete flag to true for the db entry.\nA user can still get the did if they know the DID ID, and the did keys will still exist, but this did will not show up in the ListDIDsByMethod call\nThis facilitates a clean SSI-Service Admin UI but not leave any hanging VCs with inaccessible hanging DIDs.\nSoft Deletes DID by method","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Soft Delete DID","parameters":[{"type":"string","description":"Method","name":"method","in":"path","required":true},{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/issuancetemplates":{"put":{"description":"Create issuance template","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Create issuance template","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateIssuanceTemplateRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/issuancetemplates/{id}":{"get":{"description":"Get an issuance template by its id","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Get issuance template","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete issuance template by ID","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Delete issuance template","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/keys":{"put":{"description":"Stores a key to be used by the service","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Store Key","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.StoreKeyRequest"}}],"responses":{"201":{"description":"Created"},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/keys/{id}":{"get":{"description":"Get details about a stored key","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Get Details For Key","parameters":[{"type":"string","description":"ID of the key to get","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetKeyDetailsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Marks the stored key as being revoked, along with the timestamps of when it was revoked. NB: the key can still be used for signing. This will likely be addressed before v1 is released.","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Revoke Key","parameters":[{"type":"string","description":"ID of the key to revoke","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.RevokeKeyResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests":{"get":{"description":"Checks for the presence of a query parameter and calls the associated filtered get method","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"List manifests","parameters":[{"type":"string","description":"string issuer","name":"issuer","in":"query"},{"type":"string","description":"string schema","name":"schema","in":"query"},{"type":"string","description":"string subject","name":"subject","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create manifest","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Create manifest","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications":{"get":{"description":"List all the existing applications.","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"List applications","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListApplicationsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Submit a credential application in response to a credential manifest. The request body is expected to","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Submit application","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.SubmitApplicationRequest"}}],"responses":{"201":{"description":"Operation with a SubmitApplicationResponse type in the ` + "`" + `result.response` + "`" + ` field.","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications/{id}":{"get":{"description":"Get application by id","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Get application","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetApplicationResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete application by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Delete applications","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications/{id}/review":{"put":{"description":"Reviewing an application either fulfills or denies the credential.","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Reviews an application","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.ReviewApplicationRequest"}}],"responses":{"201":{"description":"Credential Response","schema":{"$ref":"#/definitions/pkg_server_router.SubmitApplicationResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/requests":{"get":{"description":"Lists all the existing credential manifest requests","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"List Credential Manifest Requests","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestRequestsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create manifest request from an existing credential manifest.","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Create Manifest Request Request","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/requests/{id}":{"get":{"description":"Get a manifest request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Get Manifest Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetManifestRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a manifest request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Delete Manifest Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/responses":{"get":{"description":"Lists all responses","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"List responses","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListResponsesResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/responses/{id}":{"get":{"description":"Get response by id","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"Get response","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetResponseResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"delete":{"description":"Delete response by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"Delete responses","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/{id}":{"get":{"description":"Get a credential manifest by its id","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Get manifest","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete manifest by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Delete manifests","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations":{"get":{"description":"List operations according to the request","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"List operations","parameters":[{"type":"string","description":"The name of the parent's resource. For example: ` + "`" + `?parent=/presentation/submissions` + "`" + `","name":"parent","in":"query"},{"type":"string","description":"A standard filter expression conforming to https://google.aip.dev/160. For example: ` + "`" + `?filter=done=","name":"filter","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListOperationsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations/cancel/{id}":{"get":{"description":"Cancels an ongoing operation, if possible.","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"Cancel an ongoing operation","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations/{id}":{"get":{"description":"Get operation by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"Get an operation","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/definitions":{"get":{"description":"Lists all the existing presentation definitions","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"List Presentation Definitions","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDefinitionsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create presentation definition","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Create PresentationDefinition","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreatePresentationDefinitionRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreatePresentationDefinitionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/definitions/{id}":{"get":{"description":"Get a presentation definition by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Get PresentationDefinition","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetPresentationDefinitionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a presentation definition by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Delete PresentationDefinition","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/requests":{"get":{"description":"Lists all the existing presentation requests","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"List Presentation Requests","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListPresentationRequestsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create presentation request from an existing presentation definition.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Create Presentation Request","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateRequestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/requests/{id}":{"get":{"description":"Get a presentation request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Get Presentation Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a presentation request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Delete PresentationRequest","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/submissions":{"get":{"description":"List existing submissions according to a filtering query. The ` + "`" + `filter` + "`" + ` field follows the syntax described in https://google.aip.dev/160.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"List Submissions","parameters":[{"type":"string","description":"A standard filter expression conforming to https://google.aip.dev/160. For example: ` + "`" + `?filter=status=","name":"filter","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Creates a submission in this server ready to be reviewed.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Create Submission","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateSubmissionRequest"}}],"responses":{"201":{"description":"The type of response is Submission once the operation has finished.","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/submissions/{id}":{"get":{"description":"Get a submission by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Get Submission","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/presentations/submissions/{id}/review":{"put":{"description":"Reviews a pending submission. After this method is called, the operation with ` + "`" + `id==presentations/submissions/{submission_id}` + "`" + ` will be updated with the result of this invocation.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Review a pending submission","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.ReviewSubmissionRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ReviewSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/schemas":{"get":{"description":"List schemas","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"List Schemas","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListSchemasResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create schema","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Create Schema","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateSchemaRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateSchemaResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/schemas/{id}":{"get":{"description":"Get a schema by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Get Schema","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetSchemaResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a schema by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Delete Schema","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/webhooks":{"get":{"description":"Lists all webhooks","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"List Webhooks","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListWebhooksResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create webhook","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Create Webhook","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateWebhookRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateWebhookResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/webhooks/nouns":{"get":{"description":"Get supported nouns for webhook generation","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Supported Nouns","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedNounsResponse"}}}}},"/v1/webhooks/verbs":{"get":{"description":"Get supported verbs for webhook generation","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Supported Verbs","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedVerbsResponse"}}}}},"/v1/webhooks/{noun}/{verb}":{"get":{"description":"Get a webhook by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Webhook","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListWebhookResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/webhooks/{noun}/{verb}/{url}":{"delete":{"description":"Delete a webhook by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Delete Webhook","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}}},"definitions":{"credential.CredentialSchema":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string"}}},"credential.CredentialSubject":{"type":"object","additionalProperties":{}},"credential.Prohibition":{"type":"object","properties":{"action":{"type":"array","items":{"type":"string"}},"assignee":{"type":"string"},"assigner":{"type":"string"},"target":{"type":"string"}}},"credential.RefreshService":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string"}}},"credential.TermsOfUse":{"type":"object","properties":{"id":{"type":"string"},"profile":{"type":"string"},"prohibition":{"type":"array","items":{"$ref":"#/definitions/credential.Prohibition"}},"type":{"type":"string"}}},"credential.VerifiableCredential":{"type":"object","required":["@context","credentialSubject","issuanceDate","issuer","type"],"properties":{"@context":{"description":"Either a string or set of strings"},"credentialSchema":{"$ref":"#/definitions/credential.CredentialSchema"},"credentialStatus":{},"credentialSubject":{"description":"This is where the subject's ID *may* be present","allOf":[{"$ref":"#/definitions/credential.CredentialSubject"}]},"evidence":{"type":"array","items":{}},"expirationDate":{"type":"string"},"id":{"type":"string"},"issuanceDate":{"description":"https://www.w3.org/TR/xmlschema11-2/#dateTimes","type":"string"},"issuer":{"description":"either a URI or an object containing an ` + "`" + `id` + "`" + ` property."},"proof":{"description":"For embedded proof support\nProof is a digital signature over a credential https://www.w3.org/TR/2021/REC-vc-data-model-20211109/#proofs-signatures"},"refreshService":{"$ref":"#/definitions/credential.RefreshService"},"termsOfUse":{"type":"array","items":{"$ref":"#/definitions/credential.TermsOfUse"}},"type":{"description":"Either a string or a set of strings https://www.w3.org/TR/2021/REC-vc-data-model-20211109/#types"}}},"credential.VerifiablePresentation":{"type":"object","required":["type"],"properties":{"@context":{"description":"Either a string or set of strings"},"holder":{"type":"string"},"id":{"type":"string"},"presentation_submission":{"description":"an optional field as a part of https://identity.foundation/presentation-exchange/#embed-targets"},"proof":{},"type":{},"verifiableCredential":{"description":"Verifiable credential could be our object model, a JWT, or any other valid credential representation","type":"array","items":{}}}},"crypto.KeyType":{"type":"string","enum":["Ed25519","X25519","secp256k1","secp256k1-ECDSA","P-224","P-256","P-384","P-521","RSA","BLS12381G1","BLS12381G2","Dilithium2","Dilithium3","Dilithium5"],"x-enum-varnames":["Ed25519","X25519","SECP256k1","SECP256k1ECDSA","P224","P256","P384","P521","RSA","BLS12381G1","BLS12381G2","Dilithium2","Dilithium3","Dilithium5"]},"crypto.SignatureAlgorithm":{"type":"string","enum":["EdDSA","ES256K","ES256","ES384","PS256","Dilithium2","Dilithium3","Dilithium5"],"x-enum-varnames":["EdDSA","ES256K","ES256","ES384","PS256","Dilithium2Sig","Dilithium3Sig","Dilithium5Sig"]},"did.Document":{"type":"object","properties":{"@context":{},"alsoKnownAs":{"type":"string"},"assertionMethod":{"type":"array","items":{}},"authentication":{"type":"array","items":{}},"capabilityDelegation":{"type":"array","items":{}},"capabilityInvocation":{"type":"array","items":{}},"controller":{"type":"string"},"id":{"description":"As per https://www.w3.org/TR/did-core/#did-subject intermediate representations of DID Documents do not\nrequire an ID property. The provided test vectors demonstrate IRs. As such, the property is optional.","type":"string"},"keyAgreement":{"type":"array","items":{}},"service":{"type":"array","items":{"$ref":"#/definitions/github_com_TBD54566975_ssi-sdk_did.Service"}},"verificationMethod":{"type":"array","items":{"$ref":"#/definitions/did.VerificationMethod"}}}},"did.Method":{"type":"string","enum":["key","peer","pkh","web","ion","jwk"],"x-enum-varnames":["KeyMethod","PeerMethod","PKHMethod","WebMethod","IONMethod","JWKMethod"]},"did.VerificationMethod":{"type":"object","required":["controller","id","type"],"properties":{"blockchainAccountId":{"description":"for PKH DIDs - https://github.com/w3c-ccg/did-pkh/blob/90b28ad3c18d63822a8aab3c752302aa64fc9382/did-pkh-method-draft.md","type":"string"},"controller":{"type":"string"},"id":{"type":"string"},"publicKeyBase58":{"type":"string"},"publicKeyJwk":{"description":"must conform to https://datatracker.ietf.org/doc/html/rfc7517","allOf":[{"$ref":"#/definitions/jwx.PublicKeyJWK"}]},"publicKeyMultibase":{"description":"https://datatracker.ietf.org/doc/html/draft-multiformats-multibase-03","type":"string"},"type":{"type":"string"}}},"exchange.ClaimFormat":{"type":"object","properties":{"jwt":{"$ref":"#/definitions/exchange.JWTType"},"jwt_vc":{"$ref":"#/definitions/exchange.JWTType"},"jwt_vp":{"$ref":"#/definitions/exchange.JWTType"},"ldp":{"$ref":"#/definitions/exchange.LDPType"},"ldp_vc":{"$ref":"#/definitions/exchange.LDPType"},"ldp_vp":{"$ref":"#/definitions/exchange.LDPType"}}},"exchange.Constraints":{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/definitions/exchange.Field"}},"is_holder":{"type":"array","items":{"$ref":"#/definitions/exchange.RelationalConstraint"}},"limit_disclosure":{"$ref":"#/definitions/exchange.Preference"},"same_subject":{"type":"array","items":{"$ref":"#/definitions/exchange.RelationalConstraint"}},"statuses":{"description":"https://identity.foundation/presentation-exchange/#credential-status-constraint-feature","allOf":[{"$ref":"#/definitions/exchange.CredentialStatus"}]},"subject_is_issuer":{"description":"https://identity.foundation/presentation-exchange/#relational-constraint-feature","allOf":[{"$ref":"#/definitions/exchange.Preference"}]}}},"exchange.CredentialStatus":{"type":"object","properties":{"active":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}},"revoked":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}},"suspended":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}}}},"exchange.Field":{"type":"object","required":["path"],"properties":{"filter":{"$ref":"#/definitions/exchange.Filter"},"id":{"type":"string"},"intent_to_retain":{"description":"https://identity.foundation/presentation-exchange/spec/v2.0.0/#retention-feature","type":"boolean"},"name":{"type":"string"},"optional":{"type":"boolean"},"path":{"type":"array","items":{"type":"string"}},"predicate":{"description":"If a predicate property is present, filter must be too\nhttps://identity.foundation/presentation-exchange/#predicate-feature","allOf":[{"$ref":"#/definitions/exchange.Preference"}]},"purpose":{"type":"string"}}},"exchange.Filter":{"type":"object","properties":{"additionalProperties":{"type":"boolean"},"allOf":{},"const":{},"enum":{"type":"array","items":{}},"exclusiveMaximum":{},"exclusiveMinimum":{},"format":{"type":"string"},"maxLength":{"type":"integer"},"maximum":{},"minLength":{"type":"integer"},"minimum":{},"not":{},"oneOf":{},"pattern":{"type":"string"},"properties":{},"required":{"type":"array","items":{"type":"string"}},"type":{"type":"string"}}},"exchange.InputDescriptor":{"type":"object","required":["constraints","id"],"properties":{"constraints":{"$ref":"#/definitions/exchange.Constraints"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"group":{"description":"Must match a grouping strings listed in the ` + "`" + `from` + "`" + ` values of a submission requirement rule","type":"array","items":{"type":"string"}},"id":{"description":"Must be unique within the Presentation Definition","type":"string"},"name":{"type":"string"},"purpose":{"description":"Purpose for which claim's data is being requested","type":"string"}}},"exchange.JWTType":{"type":"object","required":["alg"],"properties":{"alg":{"type":"array","items":{"$ref":"#/definitions/crypto.SignatureAlgorithm"}}}},"exchange.LDPType":{"type":"object","required":["proof_type"],"properties":{"proof_type":{"type":"array","items":{"type":"string"}}}},"exchange.Preference":{"type":"string","enum":["required","preferred","allowed","disallowed"],"x-enum-varnames":["Required","Preferred","Allowed","Disallowed"]},"exchange.PresentationDefinition":{"type":"object","required":["id","input_descriptors"],"properties":{"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"frame":{"description":"https://identity.foundation/presentation-exchange/#json-ld-framing-feature"},"id":{"type":"string"},"input_descriptors":{"type":"array","items":{"$ref":"#/definitions/exchange.InputDescriptor"}},"name":{"type":"string"},"purpose":{"type":"string"},"submission_requirements":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}}}},"exchange.PresentationSubmission":{"type":"object","required":["definition_id","descriptor_map","id"],"properties":{"definition_id":{"type":"string"},"descriptor_map":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}},"id":{"type":"string"}}},"exchange.RelationalConstraint":{"type":"object","required":["directive","field_id"],"properties":{"directive":{"$ref":"#/definitions/exchange.Preference"},"field_id":{"type":"array","items":{"type":"string"}}}},"exchange.Selection":{"type":"string","enum":["all","pick"],"x-enum-varnames":["All","Pick"]},"exchange.SubmissionDescriptor":{"type":"object","required":["format","id","path"],"properties":{"format":{"type":"string"},"id":{"description":"Must match the ` + "`" + `id` + "`" + ` property of the corresponding input descriptor","type":"string"},"path":{"type":"string"},"path_nested":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}}},"exchange.SubmissionRequirement":{"type":"object","required":["rule"],"properties":{"count":{"type":"integer","minimum":1},"from":{"type":"string"},"from_nested":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}},"max":{"type":"integer"},"min":{"type":"integer"},"name":{"type":"string"},"purpose":{"type":"string"},"rule":{"$ref":"#/definitions/exchange.Selection"}}},"github_com_TBD54566975_ssi-sdk_did.Service":{"type":"object","required":["id","serviceEndpoint","type"],"properties":{"accept":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"routingKeys":{"type":"array","items":{"type":"string"}},"serviceEndpoint":{"description":"A string, map, or set composed of one or more strings and/or maps\nAll string values must be valid URIs"},"type":{"type":"string"}}},"github_com_tbd54566975_ssi-service_internal_credential.Container":{"type":"object","properties":{"credential":{"description":"Verifiable Credential in the ` + "`" + `application/vc+ld+json` + "`" + ` format. The credential is secured with an external proof\nusing JWS. In other words, the ` + "`" + `proof` + "`" + ` field is not present. See ` + "`" + `credentialJwt` + "`" + ` for the secured Verifiable\nCredential.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"JWT representation of ` + "`" + `credential` + "`" + `, secured with an external proof signed by ` + "`" + `issuerKid` + "`" + `.","type":"string"},"id":{"description":"Credential ID","type":"string"},"issuerKid":{"description":"The KID of the private key used to sign ` + "`" + `credentialJwt` + "`" + `.","type":"string"},"revoked":{"description":"Whether this credential is currently revoked.","type":"boolean"},"suspended":{"description":"Whether this credential is currently suspended.","type":"boolean"}}},"github_com_tbd54566975_ssi-service_pkg_service_framework.Status":{"type":"object","properties":{"message":{"description":"When ` + "`" + `status` + "`" + ` is ` + "`" + `\"not_ready\"` + "`" + `, message contains an explanation of why it's not ready.","type":"string"},"status":{"description":"Enum of the status.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.StatusState"}]}}},"github_com_tbd54566975_ssi-service_pkg_service_framework.StatusState":{"type":"string","enum":["ready","not_ready"],"x-enum-varnames":["StatusReady","StatusNotReady"]},"github_com_tbd54566975_ssi-service_pkg_service_issuance.ClaimTemplates":{"type":"object","additionalProperties":{}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate":{"type":"object","properties":{"credentialInputDescriptor":{"description":"Optional.\nWhen present, it's the ID of the input descriptor in the application. Corresponds to one of the\nPresentationDefinition.InputDescriptors[].ID in the credential manifest. When creating a credential, the base\ndata will be populated from the provided submission that matches this ID.\nWhen absent, there will be no base data for the credentials created. Additionally, no JSON path strings in\nClaimTemplates.Data will be resolved.","type":"string"},"data":{"description":"Data that will be used to determine credential claims.\nValues may be json path like strings, or any other JSON primitive. Each entry will be used to come up with a\nclaim about the credentialSubject in the credential that will be issued.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.ClaimTemplates"}]},"expiry":{"description":"Parameter to determine the expiry of the credential.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.TimeLike"}]},"id":{"description":"ID corresponding to an OutputDescriptor.ID from the manifest.","type":"string"},"revocable":{"description":"Whether the credentials created should be revocable.","type":"boolean"},"schema":{"description":"ID of the CredentialSchema to be used for the issued credential.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.Template":{"type":"object","required":["credentialManifest","issuer","issuerKid"],"properties":{"credentialManifest":{"description":"ID of the credential manifest that this template corresponds to.","type":"string"},"credentials":{"description":"Info required to create a credential from a credential application.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate"}},"id":{"description":"ID of this template.","type":"string"},"issuer":{"description":"ID of the issuer that will be issuance the credentials.","type":"string"},"issuerKid":{"description":"ID of the key that will be used to sign the credentials.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.TimeLike":{"type":"object","properties":{"duration":{"description":"For a fixed offset from when it was issued.","allOf":[{"$ref":"#/definitions/time.Duration"}]},"time":{"description":"For fixed time in the future.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_manifest_model.CredentialOverride":{"type":"object","properties":{"data":{"description":"Data that will be used to determine credential claims.","type":"object","additionalProperties":{}},"expiry":{"description":"Parameter to determine the expiry of the credential.","type":"string"},"revocable":{"description":"Whether the credentials created should be revocable.","type":"boolean"}}},"github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request":{"type":"object","required":["expiration","issuerId","issuerKid","manifestId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3.","type":"array","items":{"type":"string"}},"credentialManifestJwt":{"description":"CredentialManifestJWT is a JWT token with a \"presentation_definition\" claim within it. The\nvalue of the field named \"presentation_definition.id\" matches PresentationDefinitionID.\nThis is an output only field.","type":"string"},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4","type":"string"},"id":{"description":"ID for this request. It matches the \"jti\" claim in the JWT.\nThis is an output only field.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID used to sign the JWT.","type":"string"},"manifestId":{"description":"ID of the credential manifest used for this request.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request":{"type":"object","required":["expiration","issuerId","issuerKid","presentationDefinitionId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3.","type":"array","items":{"type":"string"}},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4","type":"string"},"id":{"description":"ID for this request. It matches the \"jti\" claim in the JWT.\nThis is an output only field.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID used to sign the JWT.","type":"string"},"presentationDefinitionId":{"description":"ID of the presentation definition used for this request.","type":"string"},"presentationRequestJwt":{"description":"PresentationDefinitionJWT is a JWT token with a \"presentation_definition\" claim within it. The\nvalue of the field named \"presentation_definition.id\" matches PresentationDefinitionID.\nThis is an output only field.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Submission":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedNounsResponse":{"type":"object","properties":{"nouns":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"}}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedVerbsResponse":{"type":"object","properties":{"verbs":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun":{"type":"string","enum":["Credential","DID","Manifest","SchemaID","Presentation","Application","Submission"],"x-enum-varnames":["Credential","DID","Manifest","Schema","Presentation","Application","Submission"]},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb":{"type":"string","enum":["Create","Delete"],"x-enum-varnames":["Create","Delete"]},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook":{"type":"object","required":["noun","urls","verb"],"properties":{"noun":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"},"urls":{"type":"array","items":{"type":"string"}},"verb":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}}},"jwx.PublicKeyJWK":{"type":"object","required":["kty"],"properties":{"alg":{"type":"string"},"crv":{"type":"string"},"e":{"type":"string"},"key_ops":{"type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"n":{"type":"string"},"use":{"type":"string"},"x":{"type":"string"},"y":{"type":"string"}}},"manifest.CredentialApplication":{"type":"object","required":["format","id","manifest_id","spec_version"],"properties":{"applicant":{"type":"string"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"id":{"type":"string"},"manifest_id":{"type":"string"},"presentation_submission":{"description":"Must be present if the corresponding manifest contains a presentation_definition","allOf":[{"$ref":"#/definitions/exchange.PresentationSubmission"}]},"spec_version":{"type":"string"}}},"manifest.CredentialManifest":{"type":"object","required":["id","issuer","output_descriptors","spec_version"],"properties":{"description":{"type":"string"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"id":{"type":"string"},"issuer":{"$ref":"#/definitions/manifest.Issuer"},"name":{"type":"string"},"output_descriptors":{"type":"array","items":{"$ref":"#/definitions/manifest.OutputDescriptor"}},"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"},"spec_version":{"type":"string"}}},"manifest.CredentialResponse":{"type":"object","required":["id","manifest_id","spec_version"],"properties":{"applicant":{"type":"string"},"application_id":{"type":"string"},"denial":{"type":"object","required":["reason"],"properties":{"input_descriptors":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"}}},"fulfillment":{"type":"object","required":["descriptor_map"],"properties":{"descriptor_map":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}}}},"id":{"type":"string"},"manifest_id":{"type":"string"},"spec_version":{"type":"string"}}},"manifest.Issuer":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"styles":{"description":"an object or URI as defined by the DIF Entity Styles specification\nhttps://identity.foundation/wallet-rendering/#entity-styles","allOf":[{"$ref":"#/definitions/rendering.EntityStyleDescriptor"}]}}},"manifest.OutputDescriptor":{"type":"object","required":["id","schema"],"properties":{"description":{"type":"string"},"display":{"description":"both below: an object or URI as defined by the DIF Entity Styles specification","allOf":[{"$ref":"#/definitions/rendering.DataDisplay"}]},"id":{"description":"Must be unique within a manifest","type":"string"},"name":{"type":"string"},"schema":{"type":"string"},"styles":{"$ref":"#/definitions/rendering.EntityStyleDescriptor"}}},"pkg_server_router.CreateCredentialRequest":{"type":"object","required":["data","issuer","issuerKid","subject"],"properties":{"@context":{"description":"A context is optional. If not present, we'll apply default, required context values.","type":"string"},"data":{"description":"Claims about the subject. The keys should be predicates (e.g. \"alumniOf\"), and the values can be any object.","type":"object","additionalProperties":{"type":"string"},"example":{"alumniOf":"did_for_uni"}},"expiry":{"description":"Optional. Corresponds to ` + "`" + `expirationDate` + "`" + ` in https://www.w3.org/TR/vc-data-model/#expiration.","type":"string","example":"2020-01-01T19:23:24Z"},"issuer":{"description":"The issuer id.","type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"issuerKid":{"description":"The KID used to sign the credential.","type":"string","example":"#z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"revocable":{"description":"Whether this credential can be revoked. When true, the created VC will have the \"credentialStatus\"\nproperty set.","type":"boolean"},"schemaId":{"description":"A schema ID is optional. If present, we'll attempt to look it up and validate the data against it.","type":"string"},"subject":{"description":"The subject id.","type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"suspendable":{"description":"Whether this credential can be suspended. When true, the created VC will have the \"credentialStatus\"\nproperty set.","type":"boolean"}}},"pkg_server_router.CreateCredentialResponse":{"type":"object","properties":{"credential":{"description":"Verifiable Credential in the ` + "`" + `application/vc+ld+json` + "`" + ` format. The credential is secured with an external proof\nusing JWS. In other words, the ` + "`" + `proof` + "`" + ` field is not present. See ` + "`" + `credentialJwt` + "`" + ` for the secured Verifiable\nCredential.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"JWT representation of ` + "`" + `credential` + "`" + `, secured with an external proof signed by ` + "`" + `issuerKid` + "`" + `.","type":"string"},"id":{"description":"Credential ID","type":"string"},"issuerKid":{"description":"The KID of the private key used to sign ` + "`" + `credentialJwt` + "`" + `.","type":"string"},"revoked":{"description":"Whether this credential is currently revoked.","type":"boolean"},"suspended":{"description":"Whether this credential is currently suspended.","type":"boolean"}}},"pkg_server_router.CreateDIDByMethodRequest":{"type":"object","required":["keyType"],"properties":{"keyType":{"description":"Identifies the cryptographic algorithm family to use when generating this key.\nOne of the following: \"Ed25519\", \"X25519\", \"secp256k1\", \"P-224\",\"P-256\",\"P-384\", \"P-521\", \"RSA\"","allOf":[{"$ref":"#/definitions/crypto.KeyType"}]},"options":{"description":"Options for creating the DID. Implementation dependent on the method."}}},"pkg_server_router.CreateDIDByMethodResponse":{"type":"object","properties":{"did":{"$ref":"#/definitions/did.Document"}}},"pkg_server_router.CreateIssuanceTemplateRequest":{"type":"object","required":["credentialManifest","issuer","issuerKid"],"properties":{"credentialManifest":{"description":"ID of the credential manifest that this template corresponds to.","type":"string"},"credentials":{"description":"Info required to create a credential from a credential application.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate"}},"id":{"description":"ID of this template.","type":"string"},"issuer":{"description":"ID of the issuer that will be issuance the credentials.","type":"string"},"issuerKid":{"description":"ID of the key that will be used to sign the credentials.","type":"string"}}},"pkg_server_router.CreateManifestRequest":{"type":"object","required":["format","issuerDid","issuerKid","outputDescriptors"],"properties":{"description":{"type":"string"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"issuerDid":{"type":"string"},"issuerKid":{"type":"string"},"issuerName":{"type":"string"},"name":{"type":"string"},"outputDescriptors":{"type":"array","items":{"$ref":"#/definitions/manifest.OutputDescriptor"}},"presentationDefinition":{"$ref":"#/definitions/exchange.PresentationDefinition"}}},"pkg_server_router.CreateManifestRequestRequest":{"type":"object","required":["credentialManifestId","issuerId","issuerKid"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3\nOptional","type":"array","items":{"type":"string"}},"credentialManifestId":{"description":"ID of the credential manifest to use for this request.","type":"string"},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4\nOptional. When not specified, the request will be valid for a default duration.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition. The DID must have been previously created with the DID API,\nor the PrivateKey must have been added independently.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID will be used to sign an envelope that contains\nthe created presentation definition.","type":"string"}}},"pkg_server_router.CreateManifestRequestResponse":{"type":"object","properties":{"manifestRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}},"pkg_server_router.CreateManifestResponse":{"type":"object","properties":{"credential_manifest":{"$ref":"#/definitions/manifest.CredentialManifest"}}},"pkg_server_router.CreatePresentationDefinitionRequest":{"type":"object","required":["inputDescriptors"],"properties":{"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"inputDescriptors":{"type":"array","items":{"$ref":"#/definitions/exchange.InputDescriptor"}},"name":{"type":"string"},"purpose":{"type":"string"},"submissionRequirements":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}}}},"pkg_server_router.CreatePresentationDefinitionResponse":{"type":"object","properties":{"presentationDefinitionJwt":{"description":"Signed envelope that contains the PresentationDefinition created using the privateKey of the author of the\ndefinition.","type":"string"},"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"}}},"pkg_server_router.CreateRequestRequest":{"type":"object","required":["issuerId","issuerKid","presentationDefinitionId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3\nOptional","type":"array","items":{"type":"string"}},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4\nOptional. When not specified, the request will be valid for a default duration.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition. The DID must have been previously created with the DID API,\nor the PrivateKey must have been added independently.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID will be used to sign an envelope that contains\nthe created presentation definition.","type":"string"},"presentationDefinitionId":{"description":"ID of the presentation definition to use for this request.","type":"string"}}},"pkg_server_router.CreateRequestResponse":{"type":"object","properties":{"presentationRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}},"pkg_server_router.CreateSchemaRequest":{"type":"object","required":["issuer","issuerKid","name","schema"],"properties":{"description":{"description":"Description is an optional human-readable description for a schema","type":"string"},"issuer":{"description":"Issuer represents the DID of the issuer for the schema if it's signed. Required if intending to sign the\nschema as a credential using CredentialSchema2023.","type":"string"},"issuerKid":{"description":"IssuerKID represents the KID of the issuer's private key to sign the schema. Required if intending to sign the\nschema as a credential using CredentialSchema2023.","type":"string"},"name":{"description":"Name is a human-readable name for a schema","type":"string"},"schema":{"description":"Schema represents the JSON schema for the credential schema\nIf the schema has an $id field, it will be overwritten with an ID the service generates.\nThe schema must be against draft 2020-12, 2019-09, or 7.","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]}}},"pkg_server_router.CreateSchemaResponse":{"type":"object","required":["type"],"properties":{"credentialSchema":{"description":"CredentialSchema is the JWT schema for the credential, returned when the type is CredentialSchema2023","type":"string"},"id":{"description":"ID is the URL of for resolution of the schema","type":"string"},"schema":{"description":"Schema is the JSON schema for the credential, returned when the type is JsonSchema2023","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]},"type":{"description":"Type is the type of schema such as ` + "`" + `JsonSchema2023` + "`" + ` or ` + "`" + `CredentialSchema2023` + "`" + `","allOf":[{"$ref":"#/definitions/schema.VCJSONSchemaType"}]}}},"pkg_server_router.CreateSubmissionRequest":{"type":"object","required":["submissionJwt"],"properties":{"submissionJwt":{"description":"A Verifiable Presentation that's encoded as a JWT.\nVerifiable Presentation are described in https://www.w3.org/TR/vc-data-model/#presentations-0\nJWT encoding of the Presentation as described in https://www.w3.org/TR/vc-data-model/#presentations-0","type":"string"}}},"pkg_server_router.CreateWebhookRequest":{"type":"object","required":["noun","url","verb"],"properties":{"noun":{"description":"The noun (entity) for the new webhook.eg: Credential","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"}]},"url":{"description":"The URL to post the output of this request to Noun.Verb action to.","type":"string"},"verb":{"description":"The verb for the new webhook.eg: Create","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}]}}},"pkg_server_router.CreateWebhookResponse":{"type":"object","properties":{"webhook":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook"}}},"pkg_server_router.GetApplicationResponse":{"type":"object","properties":{"application":{"$ref":"#/definitions/manifest.CredentialApplication"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialResponse":{"type":"object","properties":{"credential":{"$ref":"#/definitions/credential.VerifiableCredential"},"credentialJwt":{"type":"string"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialStatusListResponse":{"type":"object","properties":{"credential":{"description":"Credential where type includes \"VerifiableCredential\" and \"StatusList2021\".","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"The JWT signed with the associated issuer's private key.","type":"string"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialStatusResponse":{"type":"object","properties":{"revoked":{"description":"Whether the credential has been revoked.","type":"boolean"},"suspended":{"description":"Whether the credential has been suspended.","type":"boolean"}}},"pkg_server_router.GetDIDByMethodResponse":{"type":"object","properties":{"did":{"$ref":"#/definitions/did.Document"}}},"pkg_server_router.GetHealthCheckResponse":{"type":"object","properties":{"status":{"description":"Status is always equal to ` + "`" + `OK` + "`" + `.","type":"string"}}},"pkg_server_router.GetKeyDetailsResponse":{"type":"object","properties":{"controller":{"type":"string"},"createdAt":{"description":"Represents the time at which the key was created. Encoded according to RFC3339.","type":"string"},"id":{"type":"string"},"publicKeyJwk":{"description":"The public key in JWK format according to RFC7517. This public key is associated with the private\nkey with the associated ID.","allOf":[{"$ref":"#/definitions/jwx.PublicKeyJWK"}]},"type":{"$ref":"#/definitions/crypto.KeyType"}}},"pkg_server_router.GetManifestRequestResponse":{"type":"object","properties":{"manifestRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}},"pkg_server_router.GetPresentationDefinitionResponse":{"type":"object","properties":{"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"}}},"pkg_server_router.GetReadinessResponse":{"type":"object","properties":{"serviceStatuses":{"description":"A map from the name of the service to the status of that current service.","type":"object","additionalProperties":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.Status"}},"status":{"description":"Overall status of the ssi service.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.Status"}]}}},"pkg_server_router.GetRequestResponse":{"type":"object","properties":{"presentationRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}},"pkg_server_router.GetResponseResponse":{"type":"object","properties":{"credential_response":{"$ref":"#/definitions/manifest.CredentialResponse"},"responseJwt":{"type":"string"},"verifiableCredentials":{"description":"this is an interface type to union Data Integrity and JWT style VCs"}}},"pkg_server_router.GetSchemaResponse":{"type":"object","required":["type"],"properties":{"credentialSchema":{"description":"CredentialSchema is the JWT schema for the credential, returned when the type is CredentialSchema2023","type":"string"},"id":{"description":"ID is the URL of for resolution of the schema","type":"string"},"schema":{"description":"Schema is the JSON schema for the credential, returned when the type is JsonSchema2023","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]},"type":{"description":"Type is the type of schema such as ` + "`" + `JsonSchema2023` + "`" + ` or ` + "`" + `CredentialSchema2023` + "`" + `","allOf":[{"$ref":"#/definitions/schema.VCJSONSchemaType"}]}}},"pkg_server_router.GetSubmissionResponse":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"pkg_server_router.ListApplicationsResponse":{"type":"object","properties":{"applications":{"type":"array","items":{"$ref":"#/definitions/manifest.CredentialApplication"}}}},"pkg_server_router.ListCredentialsResponse":{"type":"object","properties":{"credentials":{"description":"Array of credentials that match the query parameters.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_internal_credential.Container"}}}},"pkg_server_router.ListDIDMethodsResponse":{"type":"object","properties":{"method":{"type":"array","items":{"$ref":"#/definitions/did.Method"}}}},"pkg_server_router.ListDIDsByMethodResponse":{"type":"object","properties":{"dids":{"type":"array","items":{"$ref":"#/definitions/did.Document"}}}},"pkg_server_router.ListDefinitionsResponse":{"type":"object","properties":{"definitions":{"type":"array","items":{"$ref":"#/definitions/exchange.PresentationDefinition"}}}},"pkg_server_router.ListIssuanceTemplatesResponse":{"type":"object","properties":{"issuanceTemplates":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}}}},"pkg_server_router.ListManifestRequestsResponse":{"type":"object","properties":{"manifestRequests":{"description":"The manifest requests matching the query.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}}},"pkg_server_router.ListManifestResponse":{"type":"object","properties":{"credential_manifest":{"$ref":"#/definitions/manifest.CredentialManifest"},"id":{"type":"string"}}},"pkg_server_router.ListManifestsResponse":{"type":"object","properties":{"manifests":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.ListManifestResponse"}}}},"pkg_server_router.ListOperationsResponse":{"type":"object","properties":{"operations":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.Operation"}}}},"pkg_server_router.ListPresentationRequestsResponse":{"type":"object","properties":{"presentationRequests":{"description":"The presentation requests matching the query.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}}},"pkg_server_router.ListResponsesResponse":{"type":"object","properties":{"responses":{"type":"array","items":{"$ref":"#/definitions/manifest.CredentialResponse"}}}},"pkg_server_router.ListSchemasResponse":{"type":"object","properties":{"schemas":{"description":"Schemas is the list of all schemas the service holds","type":"array","items":{"$ref":"#/definitions/pkg_server_router.GetSchemaResponse"}}}},"pkg_server_router.ListSubmissionResponse":{"type":"object","properties":{"submissions":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Submission"}}}},"pkg_server_router.ListWebhookResponse":{"type":"object","properties":{"webhook":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook"}}},"pkg_server_router.ListWebhooksResponse":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.ListWebhookResponse"}}}},"pkg_server_router.Operation":{"type":"object","required":["done","id"],"properties":{"done":{"description":"Whether this operation has finished.","type":"boolean"},"id":{"description":"The name of the resource related to this operation. E.g. \"presentations/submissions/\u003cuuid\u003e\"","type":"string"},"result":{"description":"Populated if Done == true.","allOf":[{"$ref":"#/definitions/pkg_server_router.OperationResult"}]}}},"pkg_server_router.OperationResult":{"type":"object","properties":{"error":{"description":"Populated when there was an error with the operation.","type":"string"},"response":{"description":"Populated iff Error == \"\". The type should be specified in the calling APIs documentation."}}},"pkg_server_router.ResolveDIDResponse":{"type":"object","properties":{"didDocument":{"$ref":"#/definitions/did.Document"},"didDocumentMetadata":{"$ref":"#/definitions/resolution.DocumentMetadata"},"didResolutionMetadata":{"$ref":"#/definitions/resolution.Metadata"}}},"pkg_server_router.ReviewApplicationRequest":{"type":"object","properties":{"approved":{"type":"boolean"},"credentialOverrides":{"description":"Overrides to apply to the credentials that will be created. Keys are the ID that corresponds to an\nOutputDescriptor.ID from the manifest.","type":"object","additionalProperties":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.CredentialOverride"}},"reason":{"type":"string"}}},"pkg_server_router.ReviewSubmissionRequest":{"type":"object","required":["approved"],"properties":{"approved":{"type":"boolean"},"reason":{"type":"string"}}},"pkg_server_router.ReviewSubmissionResponse":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"pkg_server_router.RevokeKeyResponse":{"type":"object","properties":{"id":{"type":"string"}}},"pkg_server_router.StoreKeyRequest":{"type":"object","required":["base58PrivateKey","controller","id","type"],"properties":{"base58PrivateKey":{"description":"Base58 encoding of the bytes that result from marshalling the private key using golang's implementation.","type":"string"},"controller":{"description":"See https://www.w3.org/TR/did-core/#did-controller","type":"string"},"id":{"description":"The ` + "`" + `id` + "`" + ` field is the unique identifier for this object. If set to a resolvable DID, the ssi-service will use\nthe private key encoded in the ` + "`" + `PrivateKeyBase58` + "`" + ` field of this object to sign objects issued or authored by this\nDID; otherwise, it will only be used to identify this object.","type":"string"},"type":{"description":"Identifies the cryptographic algorithm family used with the key.\nOne of the following: \"Ed25519\", \"X25519\", \"secp256k1\", \"P-224\", \"P-256\", \"P-384\", \"P-521\", \"RSA\".","allOf":[{"$ref":"#/definitions/crypto.KeyType"}]}}},"pkg_server_router.SubmitApplicationRequest":{"type":"object","required":["applicationJwt"],"properties":{"applicationJwt":{"description":"Contains the following properties:\nApplication manifestsdk.CredentialApplication ` + "`" + `json:\"credential_application\" validate:\"required\"` + "`" + `\nCredentials []interface{} ` + "`" + `json:\"vcs\" validate:\"required\"` + "`" + `","type":"string"}}},"pkg_server_router.SubmitApplicationResponse":{"type":"object","properties":{"credential_response":{"$ref":"#/definitions/manifest.CredentialResponse"},"responseJwt":{"type":"string"},"verifiableCredentials":{"description":"this is an any type to union Data Integrity and JWT style VCs","type":"array","items":{}}}},"pkg_server_router.UpdateCredentialStatusRequest":{"type":"object","properties":{"revoked":{"description":"The new revoked status of this credential. The status will be saved in the encodedList of the StatusList2021\ncredential associated with this VC.","type":"boolean"},"suspended":{"type":"boolean"}}},"pkg_server_router.UpdateCredentialStatusResponse":{"type":"object","properties":{"revoked":{"description":"The updated status of this credential.","type":"boolean"},"suspended":{"type":"boolean"}}},"pkg_server_router.VerifyCredentialRequest":{"type":"object","properties":{"credential":{"description":"A credential secured via data integrity. Must have the \"proof\" property set.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"A JWT that encodes a credential.","type":"string"}}},"pkg_server_router.VerifyCredentialResponse":{"type":"object","properties":{"reason":{"description":"The reason why this credential couldn't be verified.","type":"string"},"verified":{"description":"Whether the credential was verified.","type":"boolean"}}},"rendering.ColorResource":{"type":"object","properties":{"color":{"description":"a HEX string color value (e.g. #00000)","type":"string"}}},"rendering.DataDisplay":{"type":"object","properties":{"description":{"$ref":"#/definitions/rendering.DisplayMappingObject"},"properties":{"type":"array","items":{"$ref":"#/definitions/rendering.LabeledDisplayMappingObject"}},"subtitle":{"$ref":"#/definitions/rendering.DisplayMappingObject"},"title":{"$ref":"#/definitions/rendering.DisplayMappingObject"}}},"rendering.DisplayMappingObject":{"type":"object","properties":{"fallback":{"type":"string"},"path":{"description":"Ifa path is present it must be an array of JSON Path string expressions\nand the schema property must also be present.","type":"array","items":{"type":"string"}},"schema":{"$ref":"#/definitions/rendering.DisplayMappingSchema"},"text":{"description":"If path is not present, the text value is required with no other properties","type":"string"}}},"rendering.DisplayMappingSchema":{"type":"object","required":["type"],"properties":{"format":{"description":"Must be present if the value of the type property is \"string\"","allOf":[{"$ref":"#/definitions/rendering.SchemaFormat"}]},"type":{"$ref":"#/definitions/rendering.SchemaType"}}},"rendering.EntityStyleDescriptor":{"type":"object","properties":{"background":{"$ref":"#/definitions/rendering.ColorResource"},"hero":{"$ref":"#/definitions/rendering.ImageResource"},"text":{"$ref":"#/definitions/rendering.ColorResource"},"thumbnail":{"$ref":"#/definitions/rendering.ImageResource"}}},"rendering.ImageResource":{"type":"object","required":["uri"],"properties":{"alt":{"description":"Describes the alternate text for a logo image","type":"string"},"uri":{"description":"Must be a valid URI string to an image resource","type":"string"}}},"rendering.LabeledDisplayMappingObject":{"type":"object","required":["label"],"properties":{"fallback":{"type":"string"},"label":{"type":"string"},"path":{"description":"Ifa path is present it must be an array of JSON Path string expressions\nand the schema property must also be present.","type":"array","items":{"type":"string"}},"schema":{"$ref":"#/definitions/rendering.DisplayMappingSchema"},"text":{"description":"If path is not present, the text value is required with no other properties","type":"string"}}},"rendering.SchemaFormat":{"type":"string","enum":["date-time","time","date","email","idn-email","hostname","idn-hostname","ipv4","ipv6","uri","uri-reference","iri","iri-reference"],"x-enum-varnames":["DateTimeFormat","TimeFormat","DateFormat","EmailFormat","IDNEmailFormat","HostnameFormat","IDNHostnameFormat","IPV4Format","IPV6Format","URIFormat","URIReferenceFormat","IRIFormat","IRIReferenceFormat"]},"rendering.SchemaType":{"type":"string","enum":["string","boolean","number","integer"],"x-enum-varnames":["StringType","BooleanType","NumberType","IntegerType"]},"resolution.DocumentMetadata":{"type":"object","properties":{"canonicalId":{"type":"string"},"created":{"type":"string"},"deactivated":{"type":"boolean"},"equivalentId":{"type":"string"},"nextUpdate":{"type":"string"},"nextVersionId":{"type":"string"},"updated":{"type":"string"},"versionId":{"type":"string"}}},"resolution.Error":{"type":"object","properties":{"code":{"type":"string"},"invalidDid":{"type":"boolean"},"notFound":{"type":"boolean"},"representationNotSupported":{"type":"boolean"}}},"resolution.Metadata":{"type":"object","properties":{"contentType":{"type":"string"},"error":{"$ref":"#/definitions/resolution.Error"}}},"schema.JSONSchema":{"type":"object","additionalProperties":{}},"schema.VCJSONSchemaType":{"type":"string","enum":["CredentialSchema2023","JsonSchema2023"],"x-enum-varnames":["CredentialSchema2023Type","JSONSchema2023Type"]},"time.Duration":{"type":"integer","enum":[-9223372036854775808,9223372036854775807,1,1000,1000000,1000000000,60000000000,3600000000000],"x-enum-varnames":["minDuration","maxDuration","Nanosecond","Microsecond","Millisecond","Second","Minute","Hour"]}}}` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ diff --git a/doc/swagger.yaml b/doc/swagger.yaml index 20f7a69fa..da6eda737 100644 --- a/doc/swagger.yaml +++ b/doc/swagger.yaml @@ -1961,8 +1961,9 @@ paths: get: consumes: - application/json - description: Checks for the presence of a query parameter and calls the associated - filtered get method. Only one parameter is allowed to be specified. + description: Checks for the presence of an optional query parameter and calls + the associated filtered get method. Only one optional parameter is allowed + to be specified. parameters: - description: The issuer id example: did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp diff --git a/pkg/server/router/credential.go b/pkg/server/router/credential.go index 9550c3ac7..4fcac1613 100644 --- a/pkg/server/router/credential.go +++ b/pkg/server/router/credential.go @@ -397,7 +397,7 @@ type ListCredentialsResponse struct { // ListCredentials godoc // // @Summary List Credentials -// @Description Checks for the presence of a query parameter and calls the associated filtered get method. Only one parameter is allowed to be specified. +// @Description Checks for the presence of an optional query parameter and calls the associated filtered get method. Only one optional parameter is allowed to be specified. // @Tags CredentialAPI // @Accept json // @Produce json @@ -413,7 +413,7 @@ func (cr CredentialRouter) ListCredentials(c *gin.Context) { schema := framework.GetQueryValue(c, SchemaParam) subject := framework.GetQueryValue(c, SubjectParam) - errMsg := "must use one of the following query parameters: issuer, subject, schema" + errMsg := "must use only one of the following optional query parameters: issuer, subject, schema" // check if there are multiple parameters set, which is not allowed if (issuer != nil && subject != nil) || (issuer != nil && schema != nil) || (subject != nil && schema != nil) { @@ -421,22 +421,39 @@ func (cr CredentialRouter) ListCredentials(c *gin.Context) { return } + if issuer == nil && schema == nil && subject == nil { + cr.listCredentials(c) + return + } if issuer != nil { - cr.getCredentialsByIssuer(c, *issuer) + cr.listCredentialsByIssuer(c, *issuer) return } if subject != nil { - cr.getCredentialsBySubject(c, *subject) + cr.listCredentialsBySubject(c, *subject) return } if schema != nil { - cr.getCredentialsBySchema(c, *schema) + cr.listCredentialsBySchema(c, *schema) return } + framework.LoggingRespondErrMsg(c, errMsg, http.StatusBadRequest) } -func (cr CredentialRouter) getCredentialsByIssuer(c *gin.Context, issuer string) { +func (cr CredentialRouter) listCredentials(c *gin.Context) { + gotCredentials, err := cr.service.ListCredentials(c) + if err != nil { + errMsg := fmt.Sprintf("could not get credentials") + framework.LoggingRespondErrWithMsg(c, err, errMsg, http.StatusInternalServerError) + return + } + + resp := ListCredentialsResponse{Credentials: gotCredentials.Credentials} + framework.Respond(c, resp, http.StatusOK) +} + +func (cr CredentialRouter) listCredentialsByIssuer(c *gin.Context, issuer string) { gotCredentials, err := cr.service.ListCredentialsByIssuer(c, credential.ListCredentialByIssuerRequest{Issuer: issuer}) if err != nil { errMsg := fmt.Sprintf("could not get credentials for issuer: %s", util.SanitizeLog(issuer)) @@ -449,7 +466,7 @@ func (cr CredentialRouter) getCredentialsByIssuer(c *gin.Context, issuer string) return } -func (cr CredentialRouter) getCredentialsBySubject(c *gin.Context, subject string) { +func (cr CredentialRouter) listCredentialsBySubject(c *gin.Context, subject string) { gotCredentials, err := cr.service.ListCredentialsBySubject(c, credential.ListCredentialBySubjectRequest{Subject: subject}) if err != nil { errMsg := fmt.Sprintf("could not get credentials for subject: %s", util.SanitizeLog(subject)) @@ -461,7 +478,7 @@ func (cr CredentialRouter) getCredentialsBySubject(c *gin.Context, subject strin framework.Respond(c, resp, http.StatusOK) } -func (cr CredentialRouter) getCredentialsBySchema(c *gin.Context, schema string) { +func (cr CredentialRouter) listCredentialsBySchema(c *gin.Context, schema string) { gotCredentials, err := cr.service.ListCredentialsBySchema(c, credential.ListCredentialBySchemaRequest{Schema: schema}) if err != nil { errMsg := fmt.Sprintf("could not get credentials for schema: %s", util.SanitizeLog(schema)) diff --git a/pkg/server/server_credential_test.go b/pkg/server/server_credential_test.go index 4ce785681..80790e220 100644 --- a/pkg/server/server_credential_test.go +++ b/pkg/server/server_credential_test.go @@ -372,6 +372,63 @@ func TestCredentialAPI(t *testing.T) { assert.Equal(tt, resp.Credential.CredentialSchema.ID, getCredsResp.Credentials[0].Credential.CredentialSchema.ID) }) + t.Run("Get Credential No Param", func(tt *testing.T) { + bolt := setupTestDB(tt) + require.NotEmpty(tt, bolt) + + keyStoreService := testKeyStoreService(tt, bolt) + didService := testDIDService(tt, bolt, keyStoreService) + schemaService := testSchemaService(tt, bolt, keyStoreService, didService) + credRouter := testCredentialRouter(tt, bolt, keyStoreService, didService, schemaService) + + w := httptest.NewRecorder() + + issuerDID, err := didService.CreateDIDByMethod(context.Background(), did.CreateDIDRequest{ + Method: didsdk.KeyMethod, + KeyType: crypto.Ed25519, + }) + assert.NoError(tt, err) + assert.NotEmpty(tt, issuerDID) + + createCredRequest := router.CreateCredentialRequest{ + Issuer: issuerDID.DID.ID, + IssuerKID: issuerDID.DID.VerificationMethod[0].ID, + Subject: "did:abc:456", + Data: map[string]any{ + "firstName": "Jack", + "lastName": "Dorsey", + }, + Expiry: time.Now().Add(24 * time.Hour).Format(time.RFC3339), + } + requestValue := newRequestValue(tt, createCredRequest) + req := httptest.NewRequest(http.MethodPut, "https://ssi-service.com/v1/credentials", requestValue) + c := newRequestContext(w, req) + credRouter.CreateCredential(c) + assert.True(tt, util.Is2xxResponse(w.Code)) + + var resp router.CreateCredentialResponse + err = json.NewDecoder(w.Body).Decode(&resp) + assert.NoError(tt, err) + assert.NotEmpty(tt, resp.CredentialJWT) + + // reset the http recorder + w = httptest.NewRecorder() + + // get credential by issuer id + req = httptest.NewRequest(http.MethodGet, "https://ssi-service.com/v1/credentials", nil) + c = newRequestContext(w, req) + credRouter.ListCredentials(c) + assert.True(tt, util.Is2xxResponse(w.Code)) + + var getCredsResp router.ListCredentialsResponse + err = json.NewDecoder(w.Body).Decode(&getCredsResp) + assert.NoError(tt, err) + assert.NotEmpty(tt, getCredsResp) + + assert.Len(tt, getCredsResp.Credentials, 1) + assert.Equal(tt, resp.Credential.ID, getCredsResp.Credentials[0].ID) + }) + t.Run("Test Get Credential By Issuer", func(tt *testing.T) { bolt := setupTestDB(tt) require.NotEmpty(tt, bolt) diff --git a/pkg/service/credential/service.go b/pkg/service/credential/service.go index 621eebd0a..14cfe2e29 100644 --- a/pkg/service/credential/service.go +++ b/pkg/service/credential/service.go @@ -329,10 +329,34 @@ func (s Service) GetCredential(ctx context.Context, request GetCredentialRequest return &response, nil } +func (s Service) ListCredentials(ctx context.Context) (*ListCredentialsResponse, error) { + logrus.Debugf("listing credential(s) ") + + gotCreds, err := s.storage.ListCredentials(ctx) + if err != nil { + return nil, sdkutil.LoggingErrorMsgf(err, "could not list credential(s)") + } + + creds := make([]credint.Container, 0, len(gotCreds)) + for _, cred := range gotCreds { + container := credint.Container{ + ID: cred.CredentialID, + Credential: cred.Credential, + CredentialJWT: cred.CredentialJWT, + Revoked: cred.Revoked, + Suspended: cred.Suspended, + } + creds = append(creds, container) + } + + response := ListCredentialsResponse{Credentials: creds} + return &response, nil +} + func (s Service) ListCredentialsByIssuer(ctx context.Context, request ListCredentialByIssuerRequest) (*ListCredentialsResponse, error) { logrus.Debugf("listing credential(s) for issuer: %s", util.SanitizeLog(request.Issuer)) - gotCreds, err := s.storage.GetCredentialsByIssuer(ctx, request.Issuer) + gotCreds, err := s.storage.ListCredentialsByIssuer(ctx, request.Issuer) if err != nil { return nil, sdkutil.LoggingErrorMsgf(err, "could not list credential(s) for issuer: %s", request.Issuer) } @@ -356,7 +380,7 @@ func (s Service) ListCredentialsByIssuer(ctx context.Context, request ListCreden func (s Service) ListCredentialsBySubject(ctx context.Context, request ListCredentialBySubjectRequest) (*ListCredentialsResponse, error) { logrus.Debugf("listing credential(s) for subject: %s", util.SanitizeLog(request.Subject)) - gotCreds, err := s.storage.GetCredentialsBySubject(ctx, request.Subject) + gotCreds, err := s.storage.ListCredentialsBySubject(ctx, request.Subject) if err != nil { return nil, sdkutil.LoggingErrorMsgf(err, "could not list credential(s) for subject: %s", request.Subject) } diff --git a/pkg/service/credential/storage.go b/pkg/service/credential/storage.go index ac66e0320..f8f7aee55 100644 --- a/pkg/service/credential/storage.go +++ b/pkg/service/credential/storage.go @@ -242,11 +242,11 @@ func (cs *Storage) GetStatusListCredential(ctx context.Context, id string) (*Sto } if len(storedCreds) == 0 { - logrus.Warnf("no credentials able to be retrieved for id: %s", id) + logrus.Infof("no credentials able to be retrieved for id: %s", id) } if len(storedCreds) > 1 { - logrus.Warnf("there should only be status list credential per tripple, bad state") + logrus.Error("there should only be status list credential per tripple, bad state") } return &storedCreds[0], nil @@ -346,14 +346,44 @@ func (cs *Storage) getCredential(ctx context.Context, id string, namespace strin return &stored, nil } +// ListCredentials gets all credentials stored with a prefix key +// The method is greedy, meaning if multiple values are found...and some fail during processing, we will +// return only the successful values and log an error for the failures. +func (cs *Storage) ListCredentials(ctx context.Context) ([]StoredCredential, error) { + keys, err := cs.db.ReadAllKeys(ctx, credentialNamespace) + if err != nil { + return nil, sdkutil.LoggingErrorMsgf(err, "could not read credential storage") + } + + var storedCreds []StoredCredential + for _, key := range keys { + credBytes, err := cs.db.Read(ctx, credentialNamespace, key) + if err != nil { + logrus.WithError(err).Errorf("could not read credential with key: %s", key) + } else { + var cred StoredCredential + if err = json.Unmarshal(credBytes, &cred); err != nil { + logrus.WithError(err).Errorf("unmarshalling credential with key: %s", key) + } + storedCreds = append(storedCreds, cred) + } + } + + if len(storedCreds) == 0 { + logrus.Info("no credentials able to be retrieved") + } + + return storedCreds, nil +} + // Note: this is a lazy implementation. Optimizations are to be had by adjusting prefix // queries, and nested buckets. It is not intended that bolt is run in production, or at any scale, // so this is not much of a concern. -// GetCredentialsByIssuer gets all credentials stored with a prefix key containing the issuer value +// ListCredentialsByIssuer gets all credentials stored with a prefix key containing the issuer value // The method is greedy, meaning if multiple values are found and some fail during processing, we will // return only the successful values and log an error for the failures. -func (cs *Storage) GetCredentialsByIssuer(ctx context.Context, issuer string) ([]StoredCredential, error) { +func (cs *Storage) ListCredentialsByIssuer(ctx context.Context, issuer string) ([]StoredCredential, error) { keys, err := cs.db.ReadAllKeys(ctx, credentialNamespace) if err != nil { return nil, sdkutil.LoggingErrorMsgf(err, "could not read credential storage while searching for creds for issuer: %s", issuer) @@ -386,16 +416,16 @@ func (cs *Storage) GetCredentialsByIssuer(ctx context.Context, issuer string) ([ } if len(storedCreds) == 0 { - logrus.Warnf("no credentials able to be retrieved for issuer: %s", issuerKeys) + logrus.Infof("no credentials able to be retrieved for issuer: %s", issuerKeys) } return storedCreds, nil } -// GetCredentialsBySubject gets all credentials stored with a prefix key containing the subject value +// ListCredentialsBySubject gets all credentials stored with a prefix key containing the subject value // The method is greedy, meaning if multiple values are found...and some fail during processing, we will // return only the successful values and log an error for the failures. -func (cs *Storage) GetCredentialsBySubject(ctx context.Context, subject string) ([]StoredCredential, error) { +func (cs *Storage) ListCredentialsBySubject(ctx context.Context, subject string) ([]StoredCredential, error) { keys, err := cs.db.ReadAllKeys(ctx, credentialNamespace) if err != nil { return nil, sdkutil.LoggingErrorMsgf(err, "could not read credential storage while searching for creds for subject: %s", subject) @@ -429,7 +459,7 @@ func (cs *Storage) GetCredentialsBySubject(ctx context.Context, subject string) } if len(storedCreds) == 0 { - logrus.Warnf("no credentials able to be retrieved for subject: %s", subjectKeys) + logrus.Infof("no credentials able to be retrieved for subject: %s", subjectKeys) } return storedCreds, nil @@ -473,7 +503,7 @@ func (cs *Storage) GetCredentialsBySchema(ctx context.Context, schema string) ([ } if len(storedCreds) == 0 { - logrus.Warnf("no credentials able to be retrieved for schema: %s", schemaKeys) + logrus.Infof("no credentials able to be retrieved for schema: %s", schemaKeys) } return storedCreds, nil @@ -523,7 +553,7 @@ func (cs *Storage) GetStatusListCredentialsByIssuerSchemaPurpose(ctx context.Con } if len(storedCreds) == 0 { - logrus.Warnf("no credentials able to be retrieved for issuer: %s", issuerSchemaKeys) + logrus.Infof("no credentials able to be retrieved for issuer: %s", issuerSchemaKeys) } return storedCreds, nil @@ -564,7 +594,7 @@ func (cs *Storage) getCredentialsByIssuerAndSchema(ctx context.Context, issuer s } if len(storedCreds) == 0 { - logrus.Warnf("no credentials able to be retrieved for issuer: %s", issuerSchemaKeys) + logrus.Infof("no credentials able to be retrieved for issuer: %s", issuerSchemaKeys) } return storedCreds, nil From d348c10418fa1ede22d6b1d67c9223ca4abcba88 Mon Sep 17 00:00:00 2001 From: Andres Uribe Date: Tue, 6 Jun 2023 14:46:51 -0500 Subject: [PATCH 2/3] Credential manifests can be created with a definition ID (#509) * Added the ability to specify a presentation definition by ID when creating the manifest. * Better names * spec * Backwards compat * Spec * Rename * spec --- doc/docs.go | 2 +- doc/swagger.yaml | 34 ++- pkg/server/router/manifest.go | 58 +++-- pkg/server/router/manifest_test.go | 329 ++++++++++++++++------------ pkg/server/router/testutils_test.go | 15 +- pkg/server/server_test.go | 32 +-- pkg/service/manifest/model/model.go | 25 ++- pkg/service/manifest/service.go | 38 +++- pkg/service/service.go | 8 +- 9 files changed, 339 insertions(+), 202 deletions(-) diff --git a/doc/docs.go b/doc/docs.go index c92190341..7258f2e48 100644 --- a/doc/docs.go +++ b/doc/docs.go @@ -5,7 +5,7 @@ package doc import "github.com/swaggo/swag/v2" const docTemplate = `{ - "schemes": {{ marshal .Schemes }},"swagger":"2.0","info":{"description":"{{escape .Description}}","title":"{{.Title}}","contact":{"name":"TBD","url":"https://github.com/TBD54566975/ssi-service/issues","email":"tbd-developer@squareup.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"version":"{{.Version}}"},"host":"{{.Host}}","basePath":"{{.BasePath}}","paths":{"/health":{"get":{"description":"Health is a simple handler that always responds with a 200 OK","consumes":["application/json"],"produces":["application/json"],"tags":["HealthCheck"],"summary":"Health Check","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetHealthCheckResponse"}}}}},"/readiness":{"get":{"description":"Readiness runs a number of application specific checks to see if all the relied upon services are\nhealthy.","consumes":["application/json"],"produces":["application/json"],"tags":["Readiness"],"summary":"Readiness","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetReadinessResponse"}}}}},"/v1/credentials":{"get":{"description":"Checks for the presence of an optional query parameter and calls the associated filtered get method. Only one optional parameter is allowed to be specified.","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"List Credentials","parameters":[{"type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp","description":"The issuer id","name":"issuer","in":"query"},{"type":"string","description":"The credentialSchema.id value to filter by","name":"schema","in":"query"},{"type":"string","description":"The credentialSubject.id value to filter by","name":"subject","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListCredentialsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create a verifiable credential","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Create Credential","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateCredentialRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/status/{id}":{"get":{"description":"Get credential status list by id.","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential Status List","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialStatusListResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/verification":{"put":{"description":"Verify a given credential by its id. The system does the following levels of verification:\n1. Makes sure the credential has a valid signature\n2. Makes sure the credential has is not expired\n3. Makes sure the credential complies with the VC Data Model\n4. If the credential has a schema, makes sure its data complies with the schema","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Verify Credential","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.VerifyCredentialRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.VerifyCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/{id}":{"get":{"description":"Get credential by id","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"delete":{"description":"Delete credential by ID","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Delete Credentials","parameters":[{"type":"string","description":"ID of the credential to delete","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/{id}/status":{"get":{"description":"Get credential status by id","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential Status","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialStatusResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Update a credential's status","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Update Credential Status","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.UpdateCredentialStatusRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.UpdateCredentialStatusResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/dids":{"get":{"description":"Get the list of supported DID methods","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"List DID Methods","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDIDMethodsResponse"}}}}},"/v1/dids/resolver/{id}":{"get":{"description":"Resolve a DID that may not be stored in this service","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Resolve a DID","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ResolveDIDResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/dids/{method}":{"get":{"description":"List DIDs by method. Checks for an optional \"deleted=true\" query parameter, which exclusively returns DIDs that have been \"Soft Deleted\".","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"List DIDs","parameters":[{"type":"boolean","description":"When true, returns soft-deleted DIDs. Otherwise, returns DIDs that have not been soft-deleted. Default is false.","name":"deleted","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDIDsByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Creates a fully custodial DID document with the given method. The document created is stored internally\nand can be retrieved using the GetOperation. Method dependent registration (for example, DID web\nregistration) is left up to the clients of this API. The private key(s) created by the method are stored\ninternally never leave the service boundary.","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Create DID Document","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodRequest"}},{"type":"string","description":"Method","name":"method","in":"path","required":true}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/dids/{method}/{id}":{"get":{"description":"Get DID by method","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Get DID","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodRequest"}},{"type":"string","description":"Method","name":"method","in":"path","required":true},{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetDIDByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"When this is called with the correct did method and id it will flip the softDelete flag to true for the db entry.\nA user can still get the did if they know the DID ID, and the did keys will still exist, but this did will not show up in the ListDIDsByMethod call\nThis facilitates a clean SSI-Service Admin UI but not leave any hanging VCs with inaccessible hanging DIDs.\nSoft Deletes DID by method","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Soft Delete DID","parameters":[{"type":"string","description":"Method","name":"method","in":"path","required":true},{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/issuancetemplates":{"put":{"description":"Create issuance template","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Create issuance template","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateIssuanceTemplateRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/issuancetemplates/{id}":{"get":{"description":"Get an issuance template by its id","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Get issuance template","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete issuance template by ID","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Delete issuance template","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/keys":{"put":{"description":"Stores a key to be used by the service","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Store Key","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.StoreKeyRequest"}}],"responses":{"201":{"description":"Created"},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/keys/{id}":{"get":{"description":"Get details about a stored key","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Get Details For Key","parameters":[{"type":"string","description":"ID of the key to get","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetKeyDetailsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Marks the stored key as being revoked, along with the timestamps of when it was revoked. NB: the key can still be used for signing. This will likely be addressed before v1 is released.","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Revoke Key","parameters":[{"type":"string","description":"ID of the key to revoke","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.RevokeKeyResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests":{"get":{"description":"Checks for the presence of a query parameter and calls the associated filtered get method","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"List manifests","parameters":[{"type":"string","description":"string issuer","name":"issuer","in":"query"},{"type":"string","description":"string schema","name":"schema","in":"query"},{"type":"string","description":"string subject","name":"subject","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create manifest","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Create manifest","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications":{"get":{"description":"List all the existing applications.","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"List applications","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListApplicationsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Submit a credential application in response to a credential manifest. The request body is expected to","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Submit application","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.SubmitApplicationRequest"}}],"responses":{"201":{"description":"Operation with a SubmitApplicationResponse type in the ` + "`" + `result.response` + "`" + ` field.","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications/{id}":{"get":{"description":"Get application by id","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Get application","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetApplicationResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete application by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Delete applications","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications/{id}/review":{"put":{"description":"Reviewing an application either fulfills or denies the credential.","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Reviews an application","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.ReviewApplicationRequest"}}],"responses":{"201":{"description":"Credential Response","schema":{"$ref":"#/definitions/pkg_server_router.SubmitApplicationResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/requests":{"get":{"description":"Lists all the existing credential manifest requests","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"List Credential Manifest Requests","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestRequestsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create manifest request from an existing credential manifest.","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Create Manifest Request Request","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/requests/{id}":{"get":{"description":"Get a manifest request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Get Manifest Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetManifestRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a manifest request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Delete Manifest Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/responses":{"get":{"description":"Lists all responses","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"List responses","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListResponsesResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/responses/{id}":{"get":{"description":"Get response by id","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"Get response","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetResponseResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"delete":{"description":"Delete response by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"Delete responses","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/{id}":{"get":{"description":"Get a credential manifest by its id","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Get manifest","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete manifest by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Delete manifests","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations":{"get":{"description":"List operations according to the request","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"List operations","parameters":[{"type":"string","description":"The name of the parent's resource. For example: ` + "`" + `?parent=/presentation/submissions` + "`" + `","name":"parent","in":"query"},{"type":"string","description":"A standard filter expression conforming to https://google.aip.dev/160. For example: ` + "`" + `?filter=done=","name":"filter","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListOperationsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations/cancel/{id}":{"get":{"description":"Cancels an ongoing operation, if possible.","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"Cancel an ongoing operation","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations/{id}":{"get":{"description":"Get operation by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"Get an operation","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/definitions":{"get":{"description":"Lists all the existing presentation definitions","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"List Presentation Definitions","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDefinitionsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create presentation definition","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Create PresentationDefinition","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreatePresentationDefinitionRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreatePresentationDefinitionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/definitions/{id}":{"get":{"description":"Get a presentation definition by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Get PresentationDefinition","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetPresentationDefinitionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a presentation definition by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Delete PresentationDefinition","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/requests":{"get":{"description":"Lists all the existing presentation requests","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"List Presentation Requests","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListPresentationRequestsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create presentation request from an existing presentation definition.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Create Presentation Request","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateRequestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/requests/{id}":{"get":{"description":"Get a presentation request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Get Presentation Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a presentation request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Delete PresentationRequest","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/submissions":{"get":{"description":"List existing submissions according to a filtering query. The ` + "`" + `filter` + "`" + ` field follows the syntax described in https://google.aip.dev/160.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"List Submissions","parameters":[{"type":"string","description":"A standard filter expression conforming to https://google.aip.dev/160. For example: ` + "`" + `?filter=status=","name":"filter","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Creates a submission in this server ready to be reviewed.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Create Submission","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateSubmissionRequest"}}],"responses":{"201":{"description":"The type of response is Submission once the operation has finished.","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/submissions/{id}":{"get":{"description":"Get a submission by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Get Submission","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/presentations/submissions/{id}/review":{"put":{"description":"Reviews a pending submission. After this method is called, the operation with ` + "`" + `id==presentations/submissions/{submission_id}` + "`" + ` will be updated with the result of this invocation.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Review a pending submission","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.ReviewSubmissionRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ReviewSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/schemas":{"get":{"description":"List schemas","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"List Schemas","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListSchemasResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create schema","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Create Schema","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateSchemaRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateSchemaResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/schemas/{id}":{"get":{"description":"Get a schema by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Get Schema","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetSchemaResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a schema by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Delete Schema","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/webhooks":{"get":{"description":"Lists all webhooks","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"List Webhooks","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListWebhooksResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create webhook","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Create Webhook","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateWebhookRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateWebhookResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/webhooks/nouns":{"get":{"description":"Get supported nouns for webhook generation","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Supported Nouns","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedNounsResponse"}}}}},"/v1/webhooks/verbs":{"get":{"description":"Get supported verbs for webhook generation","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Supported Verbs","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedVerbsResponse"}}}}},"/v1/webhooks/{noun}/{verb}":{"get":{"description":"Get a webhook by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Webhook","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListWebhookResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/webhooks/{noun}/{verb}/{url}":{"delete":{"description":"Delete a webhook by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Delete Webhook","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}}},"definitions":{"credential.CredentialSchema":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string"}}},"credential.CredentialSubject":{"type":"object","additionalProperties":{}},"credential.Prohibition":{"type":"object","properties":{"action":{"type":"array","items":{"type":"string"}},"assignee":{"type":"string"},"assigner":{"type":"string"},"target":{"type":"string"}}},"credential.RefreshService":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string"}}},"credential.TermsOfUse":{"type":"object","properties":{"id":{"type":"string"},"profile":{"type":"string"},"prohibition":{"type":"array","items":{"$ref":"#/definitions/credential.Prohibition"}},"type":{"type":"string"}}},"credential.VerifiableCredential":{"type":"object","required":["@context","credentialSubject","issuanceDate","issuer","type"],"properties":{"@context":{"description":"Either a string or set of strings"},"credentialSchema":{"$ref":"#/definitions/credential.CredentialSchema"},"credentialStatus":{},"credentialSubject":{"description":"This is where the subject's ID *may* be present","allOf":[{"$ref":"#/definitions/credential.CredentialSubject"}]},"evidence":{"type":"array","items":{}},"expirationDate":{"type":"string"},"id":{"type":"string"},"issuanceDate":{"description":"https://www.w3.org/TR/xmlschema11-2/#dateTimes","type":"string"},"issuer":{"description":"either a URI or an object containing an ` + "`" + `id` + "`" + ` property."},"proof":{"description":"For embedded proof support\nProof is a digital signature over a credential https://www.w3.org/TR/2021/REC-vc-data-model-20211109/#proofs-signatures"},"refreshService":{"$ref":"#/definitions/credential.RefreshService"},"termsOfUse":{"type":"array","items":{"$ref":"#/definitions/credential.TermsOfUse"}},"type":{"description":"Either a string or a set of strings https://www.w3.org/TR/2021/REC-vc-data-model-20211109/#types"}}},"credential.VerifiablePresentation":{"type":"object","required":["type"],"properties":{"@context":{"description":"Either a string or set of strings"},"holder":{"type":"string"},"id":{"type":"string"},"presentation_submission":{"description":"an optional field as a part of https://identity.foundation/presentation-exchange/#embed-targets"},"proof":{},"type":{},"verifiableCredential":{"description":"Verifiable credential could be our object model, a JWT, or any other valid credential representation","type":"array","items":{}}}},"crypto.KeyType":{"type":"string","enum":["Ed25519","X25519","secp256k1","secp256k1-ECDSA","P-224","P-256","P-384","P-521","RSA","BLS12381G1","BLS12381G2","Dilithium2","Dilithium3","Dilithium5"],"x-enum-varnames":["Ed25519","X25519","SECP256k1","SECP256k1ECDSA","P224","P256","P384","P521","RSA","BLS12381G1","BLS12381G2","Dilithium2","Dilithium3","Dilithium5"]},"crypto.SignatureAlgorithm":{"type":"string","enum":["EdDSA","ES256K","ES256","ES384","PS256","Dilithium2","Dilithium3","Dilithium5"],"x-enum-varnames":["EdDSA","ES256K","ES256","ES384","PS256","Dilithium2Sig","Dilithium3Sig","Dilithium5Sig"]},"did.Document":{"type":"object","properties":{"@context":{},"alsoKnownAs":{"type":"string"},"assertionMethod":{"type":"array","items":{}},"authentication":{"type":"array","items":{}},"capabilityDelegation":{"type":"array","items":{}},"capabilityInvocation":{"type":"array","items":{}},"controller":{"type":"string"},"id":{"description":"As per https://www.w3.org/TR/did-core/#did-subject intermediate representations of DID Documents do not\nrequire an ID property. The provided test vectors demonstrate IRs. As such, the property is optional.","type":"string"},"keyAgreement":{"type":"array","items":{}},"service":{"type":"array","items":{"$ref":"#/definitions/github_com_TBD54566975_ssi-sdk_did.Service"}},"verificationMethod":{"type":"array","items":{"$ref":"#/definitions/did.VerificationMethod"}}}},"did.Method":{"type":"string","enum":["key","peer","pkh","web","ion","jwk"],"x-enum-varnames":["KeyMethod","PeerMethod","PKHMethod","WebMethod","IONMethod","JWKMethod"]},"did.VerificationMethod":{"type":"object","required":["controller","id","type"],"properties":{"blockchainAccountId":{"description":"for PKH DIDs - https://github.com/w3c-ccg/did-pkh/blob/90b28ad3c18d63822a8aab3c752302aa64fc9382/did-pkh-method-draft.md","type":"string"},"controller":{"type":"string"},"id":{"type":"string"},"publicKeyBase58":{"type":"string"},"publicKeyJwk":{"description":"must conform to https://datatracker.ietf.org/doc/html/rfc7517","allOf":[{"$ref":"#/definitions/jwx.PublicKeyJWK"}]},"publicKeyMultibase":{"description":"https://datatracker.ietf.org/doc/html/draft-multiformats-multibase-03","type":"string"},"type":{"type":"string"}}},"exchange.ClaimFormat":{"type":"object","properties":{"jwt":{"$ref":"#/definitions/exchange.JWTType"},"jwt_vc":{"$ref":"#/definitions/exchange.JWTType"},"jwt_vp":{"$ref":"#/definitions/exchange.JWTType"},"ldp":{"$ref":"#/definitions/exchange.LDPType"},"ldp_vc":{"$ref":"#/definitions/exchange.LDPType"},"ldp_vp":{"$ref":"#/definitions/exchange.LDPType"}}},"exchange.Constraints":{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/definitions/exchange.Field"}},"is_holder":{"type":"array","items":{"$ref":"#/definitions/exchange.RelationalConstraint"}},"limit_disclosure":{"$ref":"#/definitions/exchange.Preference"},"same_subject":{"type":"array","items":{"$ref":"#/definitions/exchange.RelationalConstraint"}},"statuses":{"description":"https://identity.foundation/presentation-exchange/#credential-status-constraint-feature","allOf":[{"$ref":"#/definitions/exchange.CredentialStatus"}]},"subject_is_issuer":{"description":"https://identity.foundation/presentation-exchange/#relational-constraint-feature","allOf":[{"$ref":"#/definitions/exchange.Preference"}]}}},"exchange.CredentialStatus":{"type":"object","properties":{"active":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}},"revoked":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}},"suspended":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}}}},"exchange.Field":{"type":"object","required":["path"],"properties":{"filter":{"$ref":"#/definitions/exchange.Filter"},"id":{"type":"string"},"intent_to_retain":{"description":"https://identity.foundation/presentation-exchange/spec/v2.0.0/#retention-feature","type":"boolean"},"name":{"type":"string"},"optional":{"type":"boolean"},"path":{"type":"array","items":{"type":"string"}},"predicate":{"description":"If a predicate property is present, filter must be too\nhttps://identity.foundation/presentation-exchange/#predicate-feature","allOf":[{"$ref":"#/definitions/exchange.Preference"}]},"purpose":{"type":"string"}}},"exchange.Filter":{"type":"object","properties":{"additionalProperties":{"type":"boolean"},"allOf":{},"const":{},"enum":{"type":"array","items":{}},"exclusiveMaximum":{},"exclusiveMinimum":{},"format":{"type":"string"},"maxLength":{"type":"integer"},"maximum":{},"minLength":{"type":"integer"},"minimum":{},"not":{},"oneOf":{},"pattern":{"type":"string"},"properties":{},"required":{"type":"array","items":{"type":"string"}},"type":{"type":"string"}}},"exchange.InputDescriptor":{"type":"object","required":["constraints","id"],"properties":{"constraints":{"$ref":"#/definitions/exchange.Constraints"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"group":{"description":"Must match a grouping strings listed in the ` + "`" + `from` + "`" + ` values of a submission requirement rule","type":"array","items":{"type":"string"}},"id":{"description":"Must be unique within the Presentation Definition","type":"string"},"name":{"type":"string"},"purpose":{"description":"Purpose for which claim's data is being requested","type":"string"}}},"exchange.JWTType":{"type":"object","required":["alg"],"properties":{"alg":{"type":"array","items":{"$ref":"#/definitions/crypto.SignatureAlgorithm"}}}},"exchange.LDPType":{"type":"object","required":["proof_type"],"properties":{"proof_type":{"type":"array","items":{"type":"string"}}}},"exchange.Preference":{"type":"string","enum":["required","preferred","allowed","disallowed"],"x-enum-varnames":["Required","Preferred","Allowed","Disallowed"]},"exchange.PresentationDefinition":{"type":"object","required":["id","input_descriptors"],"properties":{"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"frame":{"description":"https://identity.foundation/presentation-exchange/#json-ld-framing-feature"},"id":{"type":"string"},"input_descriptors":{"type":"array","items":{"$ref":"#/definitions/exchange.InputDescriptor"}},"name":{"type":"string"},"purpose":{"type":"string"},"submission_requirements":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}}}},"exchange.PresentationSubmission":{"type":"object","required":["definition_id","descriptor_map","id"],"properties":{"definition_id":{"type":"string"},"descriptor_map":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}},"id":{"type":"string"}}},"exchange.RelationalConstraint":{"type":"object","required":["directive","field_id"],"properties":{"directive":{"$ref":"#/definitions/exchange.Preference"},"field_id":{"type":"array","items":{"type":"string"}}}},"exchange.Selection":{"type":"string","enum":["all","pick"],"x-enum-varnames":["All","Pick"]},"exchange.SubmissionDescriptor":{"type":"object","required":["format","id","path"],"properties":{"format":{"type":"string"},"id":{"description":"Must match the ` + "`" + `id` + "`" + ` property of the corresponding input descriptor","type":"string"},"path":{"type":"string"},"path_nested":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}}},"exchange.SubmissionRequirement":{"type":"object","required":["rule"],"properties":{"count":{"type":"integer","minimum":1},"from":{"type":"string"},"from_nested":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}},"max":{"type":"integer"},"min":{"type":"integer"},"name":{"type":"string"},"purpose":{"type":"string"},"rule":{"$ref":"#/definitions/exchange.Selection"}}},"github_com_TBD54566975_ssi-sdk_did.Service":{"type":"object","required":["id","serviceEndpoint","type"],"properties":{"accept":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"routingKeys":{"type":"array","items":{"type":"string"}},"serviceEndpoint":{"description":"A string, map, or set composed of one or more strings and/or maps\nAll string values must be valid URIs"},"type":{"type":"string"}}},"github_com_tbd54566975_ssi-service_internal_credential.Container":{"type":"object","properties":{"credential":{"description":"Verifiable Credential in the ` + "`" + `application/vc+ld+json` + "`" + ` format. The credential is secured with an external proof\nusing JWS. In other words, the ` + "`" + `proof` + "`" + ` field is not present. See ` + "`" + `credentialJwt` + "`" + ` for the secured Verifiable\nCredential.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"JWT representation of ` + "`" + `credential` + "`" + `, secured with an external proof signed by ` + "`" + `issuerKid` + "`" + `.","type":"string"},"id":{"description":"Credential ID","type":"string"},"issuerKid":{"description":"The KID of the private key used to sign ` + "`" + `credentialJwt` + "`" + `.","type":"string"},"revoked":{"description":"Whether this credential is currently revoked.","type":"boolean"},"suspended":{"description":"Whether this credential is currently suspended.","type":"boolean"}}},"github_com_tbd54566975_ssi-service_pkg_service_framework.Status":{"type":"object","properties":{"message":{"description":"When ` + "`" + `status` + "`" + ` is ` + "`" + `\"not_ready\"` + "`" + `, message contains an explanation of why it's not ready.","type":"string"},"status":{"description":"Enum of the status.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.StatusState"}]}}},"github_com_tbd54566975_ssi-service_pkg_service_framework.StatusState":{"type":"string","enum":["ready","not_ready"],"x-enum-varnames":["StatusReady","StatusNotReady"]},"github_com_tbd54566975_ssi-service_pkg_service_issuance.ClaimTemplates":{"type":"object","additionalProperties":{}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate":{"type":"object","properties":{"credentialInputDescriptor":{"description":"Optional.\nWhen present, it's the ID of the input descriptor in the application. Corresponds to one of the\nPresentationDefinition.InputDescriptors[].ID in the credential manifest. When creating a credential, the base\ndata will be populated from the provided submission that matches this ID.\nWhen absent, there will be no base data for the credentials created. Additionally, no JSON path strings in\nClaimTemplates.Data will be resolved.","type":"string"},"data":{"description":"Data that will be used to determine credential claims.\nValues may be json path like strings, or any other JSON primitive. Each entry will be used to come up with a\nclaim about the credentialSubject in the credential that will be issued.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.ClaimTemplates"}]},"expiry":{"description":"Parameter to determine the expiry of the credential.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.TimeLike"}]},"id":{"description":"ID corresponding to an OutputDescriptor.ID from the manifest.","type":"string"},"revocable":{"description":"Whether the credentials created should be revocable.","type":"boolean"},"schema":{"description":"ID of the CredentialSchema to be used for the issued credential.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.Template":{"type":"object","required":["credentialManifest","issuer","issuerKid"],"properties":{"credentialManifest":{"description":"ID of the credential manifest that this template corresponds to.","type":"string"},"credentials":{"description":"Info required to create a credential from a credential application.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate"}},"id":{"description":"ID of this template.","type":"string"},"issuer":{"description":"ID of the issuer that will be issuance the credentials.","type":"string"},"issuerKid":{"description":"ID of the key that will be used to sign the credentials.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.TimeLike":{"type":"object","properties":{"duration":{"description":"For a fixed offset from when it was issued.","allOf":[{"$ref":"#/definitions/time.Duration"}]},"time":{"description":"For fixed time in the future.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_manifest_model.CredentialOverride":{"type":"object","properties":{"data":{"description":"Data that will be used to determine credential claims.","type":"object","additionalProperties":{}},"expiry":{"description":"Parameter to determine the expiry of the credential.","type":"string"},"revocable":{"description":"Whether the credentials created should be revocable.","type":"boolean"}}},"github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request":{"type":"object","required":["expiration","issuerId","issuerKid","manifestId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3.","type":"array","items":{"type":"string"}},"credentialManifestJwt":{"description":"CredentialManifestJWT is a JWT token with a \"presentation_definition\" claim within it. The\nvalue of the field named \"presentation_definition.id\" matches PresentationDefinitionID.\nThis is an output only field.","type":"string"},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4","type":"string"},"id":{"description":"ID for this request. It matches the \"jti\" claim in the JWT.\nThis is an output only field.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID used to sign the JWT.","type":"string"},"manifestId":{"description":"ID of the credential manifest used for this request.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request":{"type":"object","required":["expiration","issuerId","issuerKid","presentationDefinitionId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3.","type":"array","items":{"type":"string"}},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4","type":"string"},"id":{"description":"ID for this request. It matches the \"jti\" claim in the JWT.\nThis is an output only field.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID used to sign the JWT.","type":"string"},"presentationDefinitionId":{"description":"ID of the presentation definition used for this request.","type":"string"},"presentationRequestJwt":{"description":"PresentationDefinitionJWT is a JWT token with a \"presentation_definition\" claim within it. The\nvalue of the field named \"presentation_definition.id\" matches PresentationDefinitionID.\nThis is an output only field.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Submission":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedNounsResponse":{"type":"object","properties":{"nouns":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"}}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedVerbsResponse":{"type":"object","properties":{"verbs":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun":{"type":"string","enum":["Credential","DID","Manifest","SchemaID","Presentation","Application","Submission"],"x-enum-varnames":["Credential","DID","Manifest","Schema","Presentation","Application","Submission"]},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb":{"type":"string","enum":["Create","Delete"],"x-enum-varnames":["Create","Delete"]},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook":{"type":"object","required":["noun","urls","verb"],"properties":{"noun":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"},"urls":{"type":"array","items":{"type":"string"}},"verb":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}}},"jwx.PublicKeyJWK":{"type":"object","required":["kty"],"properties":{"alg":{"type":"string"},"crv":{"type":"string"},"e":{"type":"string"},"key_ops":{"type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"n":{"type":"string"},"use":{"type":"string"},"x":{"type":"string"},"y":{"type":"string"}}},"manifest.CredentialApplication":{"type":"object","required":["format","id","manifest_id","spec_version"],"properties":{"applicant":{"type":"string"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"id":{"type":"string"},"manifest_id":{"type":"string"},"presentation_submission":{"description":"Must be present if the corresponding manifest contains a presentation_definition","allOf":[{"$ref":"#/definitions/exchange.PresentationSubmission"}]},"spec_version":{"type":"string"}}},"manifest.CredentialManifest":{"type":"object","required":["id","issuer","output_descriptors","spec_version"],"properties":{"description":{"type":"string"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"id":{"type":"string"},"issuer":{"$ref":"#/definitions/manifest.Issuer"},"name":{"type":"string"},"output_descriptors":{"type":"array","items":{"$ref":"#/definitions/manifest.OutputDescriptor"}},"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"},"spec_version":{"type":"string"}}},"manifest.CredentialResponse":{"type":"object","required":["id","manifest_id","spec_version"],"properties":{"applicant":{"type":"string"},"application_id":{"type":"string"},"denial":{"type":"object","required":["reason"],"properties":{"input_descriptors":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"}}},"fulfillment":{"type":"object","required":["descriptor_map"],"properties":{"descriptor_map":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}}}},"id":{"type":"string"},"manifest_id":{"type":"string"},"spec_version":{"type":"string"}}},"manifest.Issuer":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"styles":{"description":"an object or URI as defined by the DIF Entity Styles specification\nhttps://identity.foundation/wallet-rendering/#entity-styles","allOf":[{"$ref":"#/definitions/rendering.EntityStyleDescriptor"}]}}},"manifest.OutputDescriptor":{"type":"object","required":["id","schema"],"properties":{"description":{"type":"string"},"display":{"description":"both below: an object or URI as defined by the DIF Entity Styles specification","allOf":[{"$ref":"#/definitions/rendering.DataDisplay"}]},"id":{"description":"Must be unique within a manifest","type":"string"},"name":{"type":"string"},"schema":{"type":"string"},"styles":{"$ref":"#/definitions/rendering.EntityStyleDescriptor"}}},"pkg_server_router.CreateCredentialRequest":{"type":"object","required":["data","issuer","issuerKid","subject"],"properties":{"@context":{"description":"A context is optional. If not present, we'll apply default, required context values.","type":"string"},"data":{"description":"Claims about the subject. The keys should be predicates (e.g. \"alumniOf\"), and the values can be any object.","type":"object","additionalProperties":{"type":"string"},"example":{"alumniOf":"did_for_uni"}},"expiry":{"description":"Optional. Corresponds to ` + "`" + `expirationDate` + "`" + ` in https://www.w3.org/TR/vc-data-model/#expiration.","type":"string","example":"2020-01-01T19:23:24Z"},"issuer":{"description":"The issuer id.","type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"issuerKid":{"description":"The KID used to sign the credential.","type":"string","example":"#z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"revocable":{"description":"Whether this credential can be revoked. When true, the created VC will have the \"credentialStatus\"\nproperty set.","type":"boolean"},"schemaId":{"description":"A schema ID is optional. If present, we'll attempt to look it up and validate the data against it.","type":"string"},"subject":{"description":"The subject id.","type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"suspendable":{"description":"Whether this credential can be suspended. When true, the created VC will have the \"credentialStatus\"\nproperty set.","type":"boolean"}}},"pkg_server_router.CreateCredentialResponse":{"type":"object","properties":{"credential":{"description":"Verifiable Credential in the ` + "`" + `application/vc+ld+json` + "`" + ` format. The credential is secured with an external proof\nusing JWS. In other words, the ` + "`" + `proof` + "`" + ` field is not present. See ` + "`" + `credentialJwt` + "`" + ` for the secured Verifiable\nCredential.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"JWT representation of ` + "`" + `credential` + "`" + `, secured with an external proof signed by ` + "`" + `issuerKid` + "`" + `.","type":"string"},"id":{"description":"Credential ID","type":"string"},"issuerKid":{"description":"The KID of the private key used to sign ` + "`" + `credentialJwt` + "`" + `.","type":"string"},"revoked":{"description":"Whether this credential is currently revoked.","type":"boolean"},"suspended":{"description":"Whether this credential is currently suspended.","type":"boolean"}}},"pkg_server_router.CreateDIDByMethodRequest":{"type":"object","required":["keyType"],"properties":{"keyType":{"description":"Identifies the cryptographic algorithm family to use when generating this key.\nOne of the following: \"Ed25519\", \"X25519\", \"secp256k1\", \"P-224\",\"P-256\",\"P-384\", \"P-521\", \"RSA\"","allOf":[{"$ref":"#/definitions/crypto.KeyType"}]},"options":{"description":"Options for creating the DID. Implementation dependent on the method."}}},"pkg_server_router.CreateDIDByMethodResponse":{"type":"object","properties":{"did":{"$ref":"#/definitions/did.Document"}}},"pkg_server_router.CreateIssuanceTemplateRequest":{"type":"object","required":["credentialManifest","issuer","issuerKid"],"properties":{"credentialManifest":{"description":"ID of the credential manifest that this template corresponds to.","type":"string"},"credentials":{"description":"Info required to create a credential from a credential application.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate"}},"id":{"description":"ID of this template.","type":"string"},"issuer":{"description":"ID of the issuer that will be issuance the credentials.","type":"string"},"issuerKid":{"description":"ID of the key that will be used to sign the credentials.","type":"string"}}},"pkg_server_router.CreateManifestRequest":{"type":"object","required":["format","issuerDid","issuerKid","outputDescriptors"],"properties":{"description":{"type":"string"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"issuerDid":{"type":"string"},"issuerKid":{"type":"string"},"issuerName":{"type":"string"},"name":{"type":"string"},"outputDescriptors":{"type":"array","items":{"$ref":"#/definitions/manifest.OutputDescriptor"}},"presentationDefinition":{"$ref":"#/definitions/exchange.PresentationDefinition"}}},"pkg_server_router.CreateManifestRequestRequest":{"type":"object","required":["credentialManifestId","issuerId","issuerKid"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3\nOptional","type":"array","items":{"type":"string"}},"credentialManifestId":{"description":"ID of the credential manifest to use for this request.","type":"string"},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4\nOptional. When not specified, the request will be valid for a default duration.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition. The DID must have been previously created with the DID API,\nor the PrivateKey must have been added independently.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID will be used to sign an envelope that contains\nthe created presentation definition.","type":"string"}}},"pkg_server_router.CreateManifestRequestResponse":{"type":"object","properties":{"manifestRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}},"pkg_server_router.CreateManifestResponse":{"type":"object","properties":{"credential_manifest":{"$ref":"#/definitions/manifest.CredentialManifest"}}},"pkg_server_router.CreatePresentationDefinitionRequest":{"type":"object","required":["inputDescriptors"],"properties":{"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"inputDescriptors":{"type":"array","items":{"$ref":"#/definitions/exchange.InputDescriptor"}},"name":{"type":"string"},"purpose":{"type":"string"},"submissionRequirements":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}}}},"pkg_server_router.CreatePresentationDefinitionResponse":{"type":"object","properties":{"presentationDefinitionJwt":{"description":"Signed envelope that contains the PresentationDefinition created using the privateKey of the author of the\ndefinition.","type":"string"},"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"}}},"pkg_server_router.CreateRequestRequest":{"type":"object","required":["issuerId","issuerKid","presentationDefinitionId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3\nOptional","type":"array","items":{"type":"string"}},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4\nOptional. When not specified, the request will be valid for a default duration.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition. The DID must have been previously created with the DID API,\nor the PrivateKey must have been added independently.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID will be used to sign an envelope that contains\nthe created presentation definition.","type":"string"},"presentationDefinitionId":{"description":"ID of the presentation definition to use for this request.","type":"string"}}},"pkg_server_router.CreateRequestResponse":{"type":"object","properties":{"presentationRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}},"pkg_server_router.CreateSchemaRequest":{"type":"object","required":["issuer","issuerKid","name","schema"],"properties":{"description":{"description":"Description is an optional human-readable description for a schema","type":"string"},"issuer":{"description":"Issuer represents the DID of the issuer for the schema if it's signed. Required if intending to sign the\nschema as a credential using CredentialSchema2023.","type":"string"},"issuerKid":{"description":"IssuerKID represents the KID of the issuer's private key to sign the schema. Required if intending to sign the\nschema as a credential using CredentialSchema2023.","type":"string"},"name":{"description":"Name is a human-readable name for a schema","type":"string"},"schema":{"description":"Schema represents the JSON schema for the credential schema\nIf the schema has an $id field, it will be overwritten with an ID the service generates.\nThe schema must be against draft 2020-12, 2019-09, or 7.","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]}}},"pkg_server_router.CreateSchemaResponse":{"type":"object","required":["type"],"properties":{"credentialSchema":{"description":"CredentialSchema is the JWT schema for the credential, returned when the type is CredentialSchema2023","type":"string"},"id":{"description":"ID is the URL of for resolution of the schema","type":"string"},"schema":{"description":"Schema is the JSON schema for the credential, returned when the type is JsonSchema2023","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]},"type":{"description":"Type is the type of schema such as ` + "`" + `JsonSchema2023` + "`" + ` or ` + "`" + `CredentialSchema2023` + "`" + `","allOf":[{"$ref":"#/definitions/schema.VCJSONSchemaType"}]}}},"pkg_server_router.CreateSubmissionRequest":{"type":"object","required":["submissionJwt"],"properties":{"submissionJwt":{"description":"A Verifiable Presentation that's encoded as a JWT.\nVerifiable Presentation are described in https://www.w3.org/TR/vc-data-model/#presentations-0\nJWT encoding of the Presentation as described in https://www.w3.org/TR/vc-data-model/#presentations-0","type":"string"}}},"pkg_server_router.CreateWebhookRequest":{"type":"object","required":["noun","url","verb"],"properties":{"noun":{"description":"The noun (entity) for the new webhook.eg: Credential","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"}]},"url":{"description":"The URL to post the output of this request to Noun.Verb action to.","type":"string"},"verb":{"description":"The verb for the new webhook.eg: Create","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}]}}},"pkg_server_router.CreateWebhookResponse":{"type":"object","properties":{"webhook":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook"}}},"pkg_server_router.GetApplicationResponse":{"type":"object","properties":{"application":{"$ref":"#/definitions/manifest.CredentialApplication"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialResponse":{"type":"object","properties":{"credential":{"$ref":"#/definitions/credential.VerifiableCredential"},"credentialJwt":{"type":"string"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialStatusListResponse":{"type":"object","properties":{"credential":{"description":"Credential where type includes \"VerifiableCredential\" and \"StatusList2021\".","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"The JWT signed with the associated issuer's private key.","type":"string"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialStatusResponse":{"type":"object","properties":{"revoked":{"description":"Whether the credential has been revoked.","type":"boolean"},"suspended":{"description":"Whether the credential has been suspended.","type":"boolean"}}},"pkg_server_router.GetDIDByMethodResponse":{"type":"object","properties":{"did":{"$ref":"#/definitions/did.Document"}}},"pkg_server_router.GetHealthCheckResponse":{"type":"object","properties":{"status":{"description":"Status is always equal to ` + "`" + `OK` + "`" + `.","type":"string"}}},"pkg_server_router.GetKeyDetailsResponse":{"type":"object","properties":{"controller":{"type":"string"},"createdAt":{"description":"Represents the time at which the key was created. Encoded according to RFC3339.","type":"string"},"id":{"type":"string"},"publicKeyJwk":{"description":"The public key in JWK format according to RFC7517. This public key is associated with the private\nkey with the associated ID.","allOf":[{"$ref":"#/definitions/jwx.PublicKeyJWK"}]},"type":{"$ref":"#/definitions/crypto.KeyType"}}},"pkg_server_router.GetManifestRequestResponse":{"type":"object","properties":{"manifestRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}},"pkg_server_router.GetPresentationDefinitionResponse":{"type":"object","properties":{"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"}}},"pkg_server_router.GetReadinessResponse":{"type":"object","properties":{"serviceStatuses":{"description":"A map from the name of the service to the status of that current service.","type":"object","additionalProperties":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.Status"}},"status":{"description":"Overall status of the ssi service.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.Status"}]}}},"pkg_server_router.GetRequestResponse":{"type":"object","properties":{"presentationRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}},"pkg_server_router.GetResponseResponse":{"type":"object","properties":{"credential_response":{"$ref":"#/definitions/manifest.CredentialResponse"},"responseJwt":{"type":"string"},"verifiableCredentials":{"description":"this is an interface type to union Data Integrity and JWT style VCs"}}},"pkg_server_router.GetSchemaResponse":{"type":"object","required":["type"],"properties":{"credentialSchema":{"description":"CredentialSchema is the JWT schema for the credential, returned when the type is CredentialSchema2023","type":"string"},"id":{"description":"ID is the URL of for resolution of the schema","type":"string"},"schema":{"description":"Schema is the JSON schema for the credential, returned when the type is JsonSchema2023","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]},"type":{"description":"Type is the type of schema such as ` + "`" + `JsonSchema2023` + "`" + ` or ` + "`" + `CredentialSchema2023` + "`" + `","allOf":[{"$ref":"#/definitions/schema.VCJSONSchemaType"}]}}},"pkg_server_router.GetSubmissionResponse":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"pkg_server_router.ListApplicationsResponse":{"type":"object","properties":{"applications":{"type":"array","items":{"$ref":"#/definitions/manifest.CredentialApplication"}}}},"pkg_server_router.ListCredentialsResponse":{"type":"object","properties":{"credentials":{"description":"Array of credentials that match the query parameters.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_internal_credential.Container"}}}},"pkg_server_router.ListDIDMethodsResponse":{"type":"object","properties":{"method":{"type":"array","items":{"$ref":"#/definitions/did.Method"}}}},"pkg_server_router.ListDIDsByMethodResponse":{"type":"object","properties":{"dids":{"type":"array","items":{"$ref":"#/definitions/did.Document"}}}},"pkg_server_router.ListDefinitionsResponse":{"type":"object","properties":{"definitions":{"type":"array","items":{"$ref":"#/definitions/exchange.PresentationDefinition"}}}},"pkg_server_router.ListIssuanceTemplatesResponse":{"type":"object","properties":{"issuanceTemplates":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}}}},"pkg_server_router.ListManifestRequestsResponse":{"type":"object","properties":{"manifestRequests":{"description":"The manifest requests matching the query.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}}},"pkg_server_router.ListManifestResponse":{"type":"object","properties":{"credential_manifest":{"$ref":"#/definitions/manifest.CredentialManifest"},"id":{"type":"string"}}},"pkg_server_router.ListManifestsResponse":{"type":"object","properties":{"manifests":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.ListManifestResponse"}}}},"pkg_server_router.ListOperationsResponse":{"type":"object","properties":{"operations":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.Operation"}}}},"pkg_server_router.ListPresentationRequestsResponse":{"type":"object","properties":{"presentationRequests":{"description":"The presentation requests matching the query.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}}},"pkg_server_router.ListResponsesResponse":{"type":"object","properties":{"responses":{"type":"array","items":{"$ref":"#/definitions/manifest.CredentialResponse"}}}},"pkg_server_router.ListSchemasResponse":{"type":"object","properties":{"schemas":{"description":"Schemas is the list of all schemas the service holds","type":"array","items":{"$ref":"#/definitions/pkg_server_router.GetSchemaResponse"}}}},"pkg_server_router.ListSubmissionResponse":{"type":"object","properties":{"submissions":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Submission"}}}},"pkg_server_router.ListWebhookResponse":{"type":"object","properties":{"webhook":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook"}}},"pkg_server_router.ListWebhooksResponse":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.ListWebhookResponse"}}}},"pkg_server_router.Operation":{"type":"object","required":["done","id"],"properties":{"done":{"description":"Whether this operation has finished.","type":"boolean"},"id":{"description":"The name of the resource related to this operation. E.g. \"presentations/submissions/\u003cuuid\u003e\"","type":"string"},"result":{"description":"Populated if Done == true.","allOf":[{"$ref":"#/definitions/pkg_server_router.OperationResult"}]}}},"pkg_server_router.OperationResult":{"type":"object","properties":{"error":{"description":"Populated when there was an error with the operation.","type":"string"},"response":{"description":"Populated iff Error == \"\". The type should be specified in the calling APIs documentation."}}},"pkg_server_router.ResolveDIDResponse":{"type":"object","properties":{"didDocument":{"$ref":"#/definitions/did.Document"},"didDocumentMetadata":{"$ref":"#/definitions/resolution.DocumentMetadata"},"didResolutionMetadata":{"$ref":"#/definitions/resolution.Metadata"}}},"pkg_server_router.ReviewApplicationRequest":{"type":"object","properties":{"approved":{"type":"boolean"},"credentialOverrides":{"description":"Overrides to apply to the credentials that will be created. Keys are the ID that corresponds to an\nOutputDescriptor.ID from the manifest.","type":"object","additionalProperties":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.CredentialOverride"}},"reason":{"type":"string"}}},"pkg_server_router.ReviewSubmissionRequest":{"type":"object","required":["approved"],"properties":{"approved":{"type":"boolean"},"reason":{"type":"string"}}},"pkg_server_router.ReviewSubmissionResponse":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"pkg_server_router.RevokeKeyResponse":{"type":"object","properties":{"id":{"type":"string"}}},"pkg_server_router.StoreKeyRequest":{"type":"object","required":["base58PrivateKey","controller","id","type"],"properties":{"base58PrivateKey":{"description":"Base58 encoding of the bytes that result from marshalling the private key using golang's implementation.","type":"string"},"controller":{"description":"See https://www.w3.org/TR/did-core/#did-controller","type":"string"},"id":{"description":"The ` + "`" + `id` + "`" + ` field is the unique identifier for this object. If set to a resolvable DID, the ssi-service will use\nthe private key encoded in the ` + "`" + `PrivateKeyBase58` + "`" + ` field of this object to sign objects issued or authored by this\nDID; otherwise, it will only be used to identify this object.","type":"string"},"type":{"description":"Identifies the cryptographic algorithm family used with the key.\nOne of the following: \"Ed25519\", \"X25519\", \"secp256k1\", \"P-224\", \"P-256\", \"P-384\", \"P-521\", \"RSA\".","allOf":[{"$ref":"#/definitions/crypto.KeyType"}]}}},"pkg_server_router.SubmitApplicationRequest":{"type":"object","required":["applicationJwt"],"properties":{"applicationJwt":{"description":"Contains the following properties:\nApplication manifestsdk.CredentialApplication ` + "`" + `json:\"credential_application\" validate:\"required\"` + "`" + `\nCredentials []interface{} ` + "`" + `json:\"vcs\" validate:\"required\"` + "`" + `","type":"string"}}},"pkg_server_router.SubmitApplicationResponse":{"type":"object","properties":{"credential_response":{"$ref":"#/definitions/manifest.CredentialResponse"},"responseJwt":{"type":"string"},"verifiableCredentials":{"description":"this is an any type to union Data Integrity and JWT style VCs","type":"array","items":{}}}},"pkg_server_router.UpdateCredentialStatusRequest":{"type":"object","properties":{"revoked":{"description":"The new revoked status of this credential. The status will be saved in the encodedList of the StatusList2021\ncredential associated with this VC.","type":"boolean"},"suspended":{"type":"boolean"}}},"pkg_server_router.UpdateCredentialStatusResponse":{"type":"object","properties":{"revoked":{"description":"The updated status of this credential.","type":"boolean"},"suspended":{"type":"boolean"}}},"pkg_server_router.VerifyCredentialRequest":{"type":"object","properties":{"credential":{"description":"A credential secured via data integrity. Must have the \"proof\" property set.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"A JWT that encodes a credential.","type":"string"}}},"pkg_server_router.VerifyCredentialResponse":{"type":"object","properties":{"reason":{"description":"The reason why this credential couldn't be verified.","type":"string"},"verified":{"description":"Whether the credential was verified.","type":"boolean"}}},"rendering.ColorResource":{"type":"object","properties":{"color":{"description":"a HEX string color value (e.g. #00000)","type":"string"}}},"rendering.DataDisplay":{"type":"object","properties":{"description":{"$ref":"#/definitions/rendering.DisplayMappingObject"},"properties":{"type":"array","items":{"$ref":"#/definitions/rendering.LabeledDisplayMappingObject"}},"subtitle":{"$ref":"#/definitions/rendering.DisplayMappingObject"},"title":{"$ref":"#/definitions/rendering.DisplayMappingObject"}}},"rendering.DisplayMappingObject":{"type":"object","properties":{"fallback":{"type":"string"},"path":{"description":"Ifa path is present it must be an array of JSON Path string expressions\nand the schema property must also be present.","type":"array","items":{"type":"string"}},"schema":{"$ref":"#/definitions/rendering.DisplayMappingSchema"},"text":{"description":"If path is not present, the text value is required with no other properties","type":"string"}}},"rendering.DisplayMappingSchema":{"type":"object","required":["type"],"properties":{"format":{"description":"Must be present if the value of the type property is \"string\"","allOf":[{"$ref":"#/definitions/rendering.SchemaFormat"}]},"type":{"$ref":"#/definitions/rendering.SchemaType"}}},"rendering.EntityStyleDescriptor":{"type":"object","properties":{"background":{"$ref":"#/definitions/rendering.ColorResource"},"hero":{"$ref":"#/definitions/rendering.ImageResource"},"text":{"$ref":"#/definitions/rendering.ColorResource"},"thumbnail":{"$ref":"#/definitions/rendering.ImageResource"}}},"rendering.ImageResource":{"type":"object","required":["uri"],"properties":{"alt":{"description":"Describes the alternate text for a logo image","type":"string"},"uri":{"description":"Must be a valid URI string to an image resource","type":"string"}}},"rendering.LabeledDisplayMappingObject":{"type":"object","required":["label"],"properties":{"fallback":{"type":"string"},"label":{"type":"string"},"path":{"description":"Ifa path is present it must be an array of JSON Path string expressions\nand the schema property must also be present.","type":"array","items":{"type":"string"}},"schema":{"$ref":"#/definitions/rendering.DisplayMappingSchema"},"text":{"description":"If path is not present, the text value is required with no other properties","type":"string"}}},"rendering.SchemaFormat":{"type":"string","enum":["date-time","time","date","email","idn-email","hostname","idn-hostname","ipv4","ipv6","uri","uri-reference","iri","iri-reference"],"x-enum-varnames":["DateTimeFormat","TimeFormat","DateFormat","EmailFormat","IDNEmailFormat","HostnameFormat","IDNHostnameFormat","IPV4Format","IPV6Format","URIFormat","URIReferenceFormat","IRIFormat","IRIReferenceFormat"]},"rendering.SchemaType":{"type":"string","enum":["string","boolean","number","integer"],"x-enum-varnames":["StringType","BooleanType","NumberType","IntegerType"]},"resolution.DocumentMetadata":{"type":"object","properties":{"canonicalId":{"type":"string"},"created":{"type":"string"},"deactivated":{"type":"boolean"},"equivalentId":{"type":"string"},"nextUpdate":{"type":"string"},"nextVersionId":{"type":"string"},"updated":{"type":"string"},"versionId":{"type":"string"}}},"resolution.Error":{"type":"object","properties":{"code":{"type":"string"},"invalidDid":{"type":"boolean"},"notFound":{"type":"boolean"},"representationNotSupported":{"type":"boolean"}}},"resolution.Metadata":{"type":"object","properties":{"contentType":{"type":"string"},"error":{"$ref":"#/definitions/resolution.Error"}}},"schema.JSONSchema":{"type":"object","additionalProperties":{}},"schema.VCJSONSchemaType":{"type":"string","enum":["CredentialSchema2023","JsonSchema2023"],"x-enum-varnames":["CredentialSchema2023Type","JSONSchema2023Type"]},"time.Duration":{"type":"integer","enum":[-9223372036854775808,9223372036854775807,1,1000,1000000,1000000000,60000000000,3600000000000],"x-enum-varnames":["minDuration","maxDuration","Nanosecond","Microsecond","Millisecond","Second","Minute","Hour"]}}}` + "schemes": {{ marshal .Schemes }},"swagger":"2.0","info":{"description":"{{escape .Description}}","title":"{{.Title}}","contact":{"name":"TBD","url":"https://github.com/TBD54566975/ssi-service/issues","email":"tbd-developer@squareup.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"version":"{{.Version}}"},"host":"{{.Host}}","basePath":"{{.BasePath}}","paths":{"/health":{"get":{"description":"Health is a simple handler that always responds with a 200 OK","consumes":["application/json"],"produces":["application/json"],"tags":["HealthCheck"],"summary":"Health Check","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetHealthCheckResponse"}}}}},"/readiness":{"get":{"description":"Readiness runs a number of application specific checks to see if all the relied upon services are\nhealthy.","consumes":["application/json"],"produces":["application/json"],"tags":["Readiness"],"summary":"Readiness","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetReadinessResponse"}}}}},"/v1/credentials":{"get":{"description":"Checks for the presence of an optional query parameter and calls the associated filtered get method. Only one optional parameter is allowed to be specified.","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"List Credentials","parameters":[{"type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp","description":"The issuer id","name":"issuer","in":"query"},{"type":"string","description":"The credentialSchema.id value to filter by","name":"schema","in":"query"},{"type":"string","description":"The credentialSubject.id value to filter by","name":"subject","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListCredentialsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create a verifiable credential","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Create Credential","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateCredentialRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/status/{id}":{"get":{"description":"Get credential status list by id.","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential Status List","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialStatusListResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/verification":{"put":{"description":"Verify a given credential by its id. The system does the following levels of verification:\n1. Makes sure the credential has a valid signature\n2. Makes sure the credential has is not expired\n3. Makes sure the credential complies with the VC Data Model\n4. If the credential has a schema, makes sure its data complies with the schema","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Verify Credential","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.VerifyCredentialRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.VerifyCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/{id}":{"get":{"description":"Get credential by id","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"delete":{"description":"Delete credential by ID","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Delete Credentials","parameters":[{"type":"string","description":"ID of the credential to delete","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/credentials/{id}/status":{"get":{"description":"Get credential status by id","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Get Credential Status","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetCredentialStatusResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Update a credential's status","consumes":["application/json"],"produces":["application/json"],"tags":["CredentialAPI"],"summary":"Update Credential Status","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.UpdateCredentialStatusRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.UpdateCredentialStatusResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/dids":{"get":{"description":"Get the list of supported DID methods","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"List DID Methods","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDIDMethodsResponse"}}}}},"/v1/dids/resolver/{id}":{"get":{"description":"Resolve a DID that may not be stored in this service","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Resolve a DID","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ResolveDIDResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/dids/{method}":{"get":{"description":"List DIDs by method. Checks for an optional \"deleted=true\" query parameter, which exclusively returns DIDs that have been \"Soft Deleted\".","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"List DIDs","parameters":[{"type":"boolean","description":"When true, returns soft-deleted DIDs. Otherwise, returns DIDs that have not been soft-deleted. Default is false.","name":"deleted","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDIDsByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Creates a fully custodial DID document with the given method. The document created is stored internally\nand can be retrieved using the GetOperation. Method dependent registration (for example, DID web\nregistration) is left up to the clients of this API. The private key(s) created by the method are stored\ninternally never leave the service boundary.","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Create DID Document","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodRequest"}},{"type":"string","description":"Method","name":"method","in":"path","required":true}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/dids/{method}/{id}":{"get":{"description":"Get DID by method","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Get DID","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateDIDByMethodRequest"}},{"type":"string","description":"Method","name":"method","in":"path","required":true},{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetDIDByMethodResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"When this is called with the correct did method and id it will flip the softDelete flag to true for the db entry.\nA user can still get the did if they know the DID ID, and the did keys will still exist, but this did will not show up in the ListDIDsByMethod call\nThis facilitates a clean SSI-Service Admin UI but not leave any hanging VCs with inaccessible hanging DIDs.\nSoft Deletes DID by method","consumes":["application/json"],"produces":["application/json"],"tags":["DecentralizedIdentityAPI"],"summary":"Soft Delete DID","parameters":[{"type":"string","description":"Method","name":"method","in":"path","required":true},{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/issuancetemplates":{"put":{"description":"Create issuance template","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Create issuance template","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateIssuanceTemplateRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/issuancetemplates/{id}":{"get":{"description":"Get an issuance template by its id","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Get issuance template","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete issuance template by ID","consumes":["application/json"],"produces":["application/json"],"tags":["IssuanceAPI"],"summary":"Delete issuance template","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/keys":{"put":{"description":"Stores a key to be used by the service","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Store Key","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.StoreKeyRequest"}}],"responses":{"201":{"description":"Created"},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/keys/{id}":{"get":{"description":"Get details about a stored key","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Get Details For Key","parameters":[{"type":"string","description":"ID of the key to get","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetKeyDetailsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Marks the stored key as being revoked, along with the timestamps of when it was revoked. NB: the key can still be used for signing. This will likely be addressed before v1 is released.","consumes":["application/json"],"produces":["application/json"],"tags":["KeyStoreAPI"],"summary":"Revoke Key","parameters":[{"type":"string","description":"ID of the key to revoke","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.RevokeKeyResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests":{"get":{"description":"Checks for the presence of a query parameter and calls the associated filtered get method","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"List manifests","parameters":[{"type":"string","description":"string issuer","name":"issuer","in":"query"},{"type":"string","description":"string schema","name":"schema","in":"query"},{"type":"string","description":"string subject","name":"subject","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create manifest. Most fields map to the definitions from https://identity.foundation/credential-manifest/#general-composition.","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Create manifest","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications":{"get":{"description":"List all the existing applications.","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"List applications","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListApplicationsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Submit a credential application in response to a credential manifest. The request body is expected to","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Submit application","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.SubmitApplicationRequest"}}],"responses":{"201":{"description":"Operation with a SubmitApplicationResponse type in the ` + "`" + `result.response` + "`" + ` field.","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications/{id}":{"get":{"description":"Get application by id","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Get application","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetApplicationResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete application by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Delete applications","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/applications/{id}/review":{"put":{"description":"Reviewing an application either fulfills or denies the credential.","consumes":["application/json"],"produces":["application/json"],"tags":["ApplicationAPI"],"summary":"Reviews an application","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.ReviewApplicationRequest"}}],"responses":{"201":{"description":"Credential Response","schema":{"$ref":"#/definitions/pkg_server_router.SubmitApplicationResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/requests":{"get":{"description":"Lists all the existing credential manifest requests","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"List Credential Manifest Requests","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestRequestsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create manifest request from an existing credential manifest.","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Create Manifest Request Request","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateManifestRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/requests/{id}":{"get":{"description":"Get a manifest request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Get Manifest Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetManifestRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a manifest request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Delete Manifest Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/responses":{"get":{"description":"Lists all responses","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"List responses","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListResponsesResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/responses/{id}":{"get":{"description":"Get response by id","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"Get response","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetResponseResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"delete":{"description":"Delete response by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ResponseAPI"],"summary":"Delete responses","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/manifests/{id}":{"get":{"description":"Get a credential manifest by its id","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Get manifest","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListManifestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete manifest by ID","consumes":["application/json"],"produces":["application/json"],"tags":["ManifestAPI"],"summary":"Delete manifests","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations":{"get":{"description":"List operations according to the request","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"List operations","parameters":[{"type":"string","description":"The name of the parent's resource. For example: ` + "`" + `?parent=/presentation/submissions` + "`" + `","name":"parent","in":"query"},{"type":"string","description":"A standard filter expression conforming to https://google.aip.dev/160. For example: ` + "`" + `?filter=done=","name":"filter","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListOperationsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations/cancel/{id}":{"get":{"description":"Cancels an ongoing operation, if possible.","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"Cancel an ongoing operation","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/operations/{id}":{"get":{"description":"Get operation by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["OperationAPI"],"summary":"Get an operation","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/definitions":{"get":{"description":"Lists all the existing presentation definitions","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"List Presentation Definitions","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListDefinitionsResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create presentation definition","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Create PresentationDefinition","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreatePresentationDefinitionRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreatePresentationDefinitionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/definitions/{id}":{"get":{"description":"Get a presentation definition by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Get PresentationDefinition","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetPresentationDefinitionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a presentation definition by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationDefinitionAPI"],"summary":"Delete PresentationDefinition","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/requests":{"get":{"description":"Lists all the existing presentation requests","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"List Presentation Requests","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListPresentationRequestsResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create presentation request from an existing presentation definition.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Create Presentation Request","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateRequestRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/requests/{id}":{"get":{"description":"Get a presentation request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Get Presentation Request","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetRequestResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a presentation request by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationRequestAPI"],"summary":"Delete PresentationRequest","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/submissions":{"get":{"description":"List existing submissions according to a filtering query. The ` + "`" + `filter` + "`" + ` field follows the syntax described in https://google.aip.dev/160.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"List Submissions","parameters":[{"type":"string","description":"A standard filter expression conforming to https://google.aip.dev/160. For example: ` + "`" + `?filter=status=","name":"filter","in":"query"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Creates a submission in this server ready to be reviewed.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Create Submission","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateSubmissionRequest"}}],"responses":{"201":{"description":"The type of response is Submission once the operation has finished.","schema":{"$ref":"#/definitions/pkg_server_router.Operation"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/presentations/submissions/{id}":{"get":{"description":"Get a submission by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Get Submission","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/presentations/submissions/{id}/review":{"put":{"description":"Reviews a pending submission. After this method is called, the operation with ` + "`" + `id==presentations/submissions/{submission_id}` + "`" + ` will be updated with the result of this invocation.","consumes":["application/json"],"produces":["application/json"],"tags":["PresentationSubmissionAPI"],"summary":"Review a pending submission","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.ReviewSubmissionRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ReviewSubmissionResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/schemas":{"get":{"description":"List schemas","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"List Schemas","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListSchemasResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create schema","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Create Schema","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateSchemaRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateSchemaResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/schemas/{id}":{"get":{"description":"Get a schema by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Get Schema","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.GetSchemaResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}},"delete":{"description":"Delete a schema by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["SchemaAPI"],"summary":"Delete Schema","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/webhooks":{"get":{"description":"Lists all webhooks","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"List Webhooks","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListWebhooksResponse"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}},"put":{"description":"Create webhook","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Create Webhook","parameters":[{"description":"request body","name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/pkg_server_router.CreateWebhookRequest"}}],"responses":{"201":{"description":"Created","schema":{"$ref":"#/definitions/pkg_server_router.CreateWebhookResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}},"/v1/webhooks/nouns":{"get":{"description":"Get supported nouns for webhook generation","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Supported Nouns","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedNounsResponse"}}}}},"/v1/webhooks/verbs":{"get":{"description":"Get supported verbs for webhook generation","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Supported Verbs","responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedVerbsResponse"}}}}},"/v1/webhooks/{noun}/{verb}":{"get":{"description":"Get a webhook by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Get Webhook","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/pkg_server_router.ListWebhookResponse"}},"400":{"description":"Bad request","schema":{"type":"string"}}}}},"/v1/webhooks/{noun}/{verb}/{url}":{"delete":{"description":"Delete a webhook by its ID","consumes":["application/json"],"produces":["application/json"],"tags":["WebhookAPI"],"summary":"Delete Webhook","parameters":[{"type":"string","description":"ID","name":"id","in":"path","required":true}],"responses":{"204":{"description":"No Content","schema":{"type":"string"}},"400":{"description":"Bad request","schema":{"type":"string"}},"500":{"description":"Internal server error","schema":{"type":"string"}}}}}},"definitions":{"credential.CredentialSchema":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string"}}},"credential.CredentialSubject":{"type":"object","additionalProperties":{}},"credential.Prohibition":{"type":"object","properties":{"action":{"type":"array","items":{"type":"string"}},"assignee":{"type":"string"},"assigner":{"type":"string"},"target":{"type":"string"}}},"credential.RefreshService":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string"}}},"credential.TermsOfUse":{"type":"object","properties":{"id":{"type":"string"},"profile":{"type":"string"},"prohibition":{"type":"array","items":{"$ref":"#/definitions/credential.Prohibition"}},"type":{"type":"string"}}},"credential.VerifiableCredential":{"type":"object","required":["@context","credentialSubject","issuanceDate","issuer","type"],"properties":{"@context":{"description":"Either a string or set of strings"},"credentialSchema":{"$ref":"#/definitions/credential.CredentialSchema"},"credentialStatus":{},"credentialSubject":{"description":"This is where the subject's ID *may* be present","allOf":[{"$ref":"#/definitions/credential.CredentialSubject"}]},"evidence":{"type":"array","items":{}},"expirationDate":{"type":"string"},"id":{"type":"string"},"issuanceDate":{"description":"https://www.w3.org/TR/xmlschema11-2/#dateTimes","type":"string"},"issuer":{"description":"either a URI or an object containing an ` + "`" + `id` + "`" + ` property."},"proof":{"description":"For embedded proof support\nProof is a digital signature over a credential https://www.w3.org/TR/2021/REC-vc-data-model-20211109/#proofs-signatures"},"refreshService":{"$ref":"#/definitions/credential.RefreshService"},"termsOfUse":{"type":"array","items":{"$ref":"#/definitions/credential.TermsOfUse"}},"type":{"description":"Either a string or a set of strings https://www.w3.org/TR/2021/REC-vc-data-model-20211109/#types"}}},"credential.VerifiablePresentation":{"type":"object","required":["type"],"properties":{"@context":{"description":"Either a string or set of strings"},"holder":{"type":"string"},"id":{"type":"string"},"presentation_submission":{"description":"an optional field as a part of https://identity.foundation/presentation-exchange/#embed-targets"},"proof":{},"type":{},"verifiableCredential":{"description":"Verifiable credential could be our object model, a JWT, or any other valid credential representation","type":"array","items":{}}}},"crypto.KeyType":{"type":"string","enum":["Ed25519","X25519","secp256k1","secp256k1-ECDSA","P-224","P-256","P-384","P-521","RSA","BLS12381G1","BLS12381G2","Dilithium2","Dilithium3","Dilithium5"],"x-enum-varnames":["Ed25519","X25519","SECP256k1","SECP256k1ECDSA","P224","P256","P384","P521","RSA","BLS12381G1","BLS12381G2","Dilithium2","Dilithium3","Dilithium5"]},"crypto.SignatureAlgorithm":{"type":"string","enum":["EdDSA","ES256K","ES256","ES384","PS256","Dilithium2","Dilithium3","Dilithium5"],"x-enum-varnames":["EdDSA","ES256K","ES256","ES384","PS256","Dilithium2Sig","Dilithium3Sig","Dilithium5Sig"]},"did.Document":{"type":"object","properties":{"@context":{},"alsoKnownAs":{"type":"string"},"assertionMethod":{"type":"array","items":{}},"authentication":{"type":"array","items":{}},"capabilityDelegation":{"type":"array","items":{}},"capabilityInvocation":{"type":"array","items":{}},"controller":{"type":"string"},"id":{"description":"As per https://www.w3.org/TR/did-core/#did-subject intermediate representations of DID Documents do not\nrequire an ID property. The provided test vectors demonstrate IRs. As such, the property is optional.","type":"string"},"keyAgreement":{"type":"array","items":{}},"service":{"type":"array","items":{"$ref":"#/definitions/github_com_TBD54566975_ssi-sdk_did.Service"}},"verificationMethod":{"type":"array","items":{"$ref":"#/definitions/did.VerificationMethod"}}}},"did.Method":{"type":"string","enum":["key","peer","pkh","web","ion","jwk"],"x-enum-varnames":["KeyMethod","PeerMethod","PKHMethod","WebMethod","IONMethod","JWKMethod"]},"did.VerificationMethod":{"type":"object","required":["controller","id","type"],"properties":{"blockchainAccountId":{"description":"for PKH DIDs - https://github.com/w3c-ccg/did-pkh/blob/90b28ad3c18d63822a8aab3c752302aa64fc9382/did-pkh-method-draft.md","type":"string"},"controller":{"type":"string"},"id":{"type":"string"},"publicKeyBase58":{"type":"string"},"publicKeyJwk":{"description":"must conform to https://datatracker.ietf.org/doc/html/rfc7517","allOf":[{"$ref":"#/definitions/jwx.PublicKeyJWK"}]},"publicKeyMultibase":{"description":"https://datatracker.ietf.org/doc/html/draft-multiformats-multibase-03","type":"string"},"type":{"type":"string"}}},"exchange.ClaimFormat":{"type":"object","properties":{"jwt":{"$ref":"#/definitions/exchange.JWTType"},"jwt_vc":{"$ref":"#/definitions/exchange.JWTType"},"jwt_vp":{"$ref":"#/definitions/exchange.JWTType"},"ldp":{"$ref":"#/definitions/exchange.LDPType"},"ldp_vc":{"$ref":"#/definitions/exchange.LDPType"},"ldp_vp":{"$ref":"#/definitions/exchange.LDPType"}}},"exchange.Constraints":{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/definitions/exchange.Field"}},"is_holder":{"type":"array","items":{"$ref":"#/definitions/exchange.RelationalConstraint"}},"limit_disclosure":{"$ref":"#/definitions/exchange.Preference"},"same_subject":{"type":"array","items":{"$ref":"#/definitions/exchange.RelationalConstraint"}},"statuses":{"description":"https://identity.foundation/presentation-exchange/#credential-status-constraint-feature","allOf":[{"$ref":"#/definitions/exchange.CredentialStatus"}]},"subject_is_issuer":{"description":"https://identity.foundation/presentation-exchange/#relational-constraint-feature","allOf":[{"$ref":"#/definitions/exchange.Preference"}]}}},"exchange.CredentialStatus":{"type":"object","properties":{"active":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}},"revoked":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}},"suspended":{"type":"object","properties":{"directive":{"$ref":"#/definitions/exchange.Preference"}}}}},"exchange.Field":{"type":"object","required":["path"],"properties":{"filter":{"$ref":"#/definitions/exchange.Filter"},"id":{"type":"string"},"intent_to_retain":{"description":"https://identity.foundation/presentation-exchange/spec/v2.0.0/#retention-feature","type":"boolean"},"name":{"type":"string"},"optional":{"type":"boolean"},"path":{"type":"array","items":{"type":"string"}},"predicate":{"description":"If a predicate property is present, filter must be too\nhttps://identity.foundation/presentation-exchange/#predicate-feature","allOf":[{"$ref":"#/definitions/exchange.Preference"}]},"purpose":{"type":"string"}}},"exchange.Filter":{"type":"object","properties":{"additionalProperties":{"type":"boolean"},"allOf":{},"const":{},"enum":{"type":"array","items":{}},"exclusiveMaximum":{},"exclusiveMinimum":{},"format":{"type":"string"},"maxLength":{"type":"integer"},"maximum":{},"minLength":{"type":"integer"},"minimum":{},"not":{},"oneOf":{},"pattern":{"type":"string"},"properties":{},"required":{"type":"array","items":{"type":"string"}},"type":{"type":"string"}}},"exchange.InputDescriptor":{"type":"object","required":["constraints","id"],"properties":{"constraints":{"$ref":"#/definitions/exchange.Constraints"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"group":{"description":"Must match a grouping strings listed in the ` + "`" + `from` + "`" + ` values of a submission requirement rule","type":"array","items":{"type":"string"}},"id":{"description":"Must be unique within the Presentation Definition","type":"string"},"name":{"type":"string"},"purpose":{"description":"Purpose for which claim's data is being requested","type":"string"}}},"exchange.JWTType":{"type":"object","required":["alg"],"properties":{"alg":{"type":"array","items":{"$ref":"#/definitions/crypto.SignatureAlgorithm"}}}},"exchange.LDPType":{"type":"object","required":["proof_type"],"properties":{"proof_type":{"type":"array","items":{"type":"string"}}}},"exchange.Preference":{"type":"string","enum":["required","preferred","allowed","disallowed"],"x-enum-varnames":["Required","Preferred","Allowed","Disallowed"]},"exchange.PresentationDefinition":{"type":"object","required":["id","input_descriptors"],"properties":{"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"frame":{"description":"https://identity.foundation/presentation-exchange/#json-ld-framing-feature"},"id":{"type":"string"},"input_descriptors":{"type":"array","items":{"$ref":"#/definitions/exchange.InputDescriptor"}},"name":{"type":"string"},"purpose":{"type":"string"},"submission_requirements":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}}}},"exchange.PresentationSubmission":{"type":"object","required":["definition_id","descriptor_map","id"],"properties":{"definition_id":{"type":"string"},"descriptor_map":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}},"id":{"type":"string"}}},"exchange.RelationalConstraint":{"type":"object","required":["directive","field_id"],"properties":{"directive":{"$ref":"#/definitions/exchange.Preference"},"field_id":{"type":"array","items":{"type":"string"}}}},"exchange.Selection":{"type":"string","enum":["all","pick"],"x-enum-varnames":["All","Pick"]},"exchange.SubmissionDescriptor":{"type":"object","required":["format","id","path"],"properties":{"format":{"type":"string"},"id":{"description":"Must match the ` + "`" + `id` + "`" + ` property of the corresponding input descriptor","type":"string"},"path":{"type":"string"},"path_nested":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}}},"exchange.SubmissionRequirement":{"type":"object","required":["rule"],"properties":{"count":{"type":"integer","minimum":1},"from":{"type":"string"},"from_nested":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}},"max":{"type":"integer"},"min":{"type":"integer"},"name":{"type":"string"},"purpose":{"type":"string"},"rule":{"$ref":"#/definitions/exchange.Selection"}}},"github_com_TBD54566975_ssi-sdk_did.Service":{"type":"object","required":["id","serviceEndpoint","type"],"properties":{"accept":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"routingKeys":{"type":"array","items":{"type":"string"}},"serviceEndpoint":{"description":"A string, map, or set composed of one or more strings and/or maps\nAll string values must be valid URIs"},"type":{"type":"string"}}},"github_com_tbd54566975_ssi-service_internal_credential.Container":{"type":"object","properties":{"credential":{"description":"Verifiable Credential in the ` + "`" + `application/vc+ld+json` + "`" + ` format. The credential is secured with an external proof\nusing JWS. In other words, the ` + "`" + `proof` + "`" + ` field is not present. See ` + "`" + `credentialJwt` + "`" + ` for the secured Verifiable\nCredential.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"JWT representation of ` + "`" + `credential` + "`" + `, secured with an external proof signed by ` + "`" + `issuerKid` + "`" + `.","type":"string"},"id":{"description":"Credential ID","type":"string"},"issuerKid":{"description":"The KID of the private key used to sign ` + "`" + `credentialJwt` + "`" + `.","type":"string"},"revoked":{"description":"Whether this credential is currently revoked.","type":"boolean"},"suspended":{"description":"Whether this credential is currently suspended.","type":"boolean"}}},"github_com_tbd54566975_ssi-service_pkg_service_framework.Status":{"type":"object","properties":{"message":{"description":"When ` + "`" + `status` + "`" + ` is ` + "`" + `\"not_ready\"` + "`" + `, message contains an explanation of why it's not ready.","type":"string"},"status":{"description":"Enum of the status.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.StatusState"}]}}},"github_com_tbd54566975_ssi-service_pkg_service_framework.StatusState":{"type":"string","enum":["ready","not_ready"],"x-enum-varnames":["StatusReady","StatusNotReady"]},"github_com_tbd54566975_ssi-service_pkg_service_issuance.ClaimTemplates":{"type":"object","additionalProperties":{}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate":{"type":"object","properties":{"credentialInputDescriptor":{"description":"Optional.\nWhen present, it's the ID of the input descriptor in the application. Corresponds to one of the\nPresentationDefinition.InputDescriptors[].ID in the credential manifest. When creating a credential, the base\ndata will be populated from the provided submission that matches this ID.\nWhen absent, there will be no base data for the credentials created. Additionally, no JSON path strings in\nClaimTemplates.Data will be resolved.","type":"string"},"data":{"description":"Data that will be used to determine credential claims.\nValues may be json path like strings, or any other JSON primitive. Each entry will be used to come up with a\nclaim about the credentialSubject in the credential that will be issued.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.ClaimTemplates"}]},"expiry":{"description":"Parameter to determine the expiry of the credential.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.TimeLike"}]},"id":{"description":"ID corresponding to an OutputDescriptor.ID from the manifest.","type":"string"},"revocable":{"description":"Whether the credentials created should be revocable.","type":"boolean"},"schema":{"description":"ID of the CredentialSchema to be used for the issued credential.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.Template":{"type":"object","required":["credentialManifest","issuer","issuerKid"],"properties":{"credentialManifest":{"description":"ID of the credential manifest that this template corresponds to.","type":"string"},"credentials":{"description":"Info required to create a credential from a credential application.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate"}},"id":{"description":"ID of this template.","type":"string"},"issuer":{"description":"ID of the issuer that will be issuance the credentials.","type":"string"},"issuerKid":{"description":"ID of the key that will be used to sign the credentials.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_issuance.TimeLike":{"type":"object","properties":{"duration":{"description":"For a fixed offset from when it was issued.","allOf":[{"$ref":"#/definitions/time.Duration"}]},"time":{"description":"For fixed time in the future.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_manifest_model.CredentialOverride":{"type":"object","properties":{"data":{"description":"Data that will be used to determine credential claims.","type":"object","additionalProperties":{}},"expiry":{"description":"Parameter to determine the expiry of the credential.","type":"string"},"revocable":{"description":"Whether the credentials created should be revocable.","type":"boolean"}}},"github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request":{"type":"object","required":["expiration","issuerId","issuerKid","manifestId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3.","type":"array","items":{"type":"string"}},"credentialManifestJwt":{"description":"CredentialManifestJWT is a JWT token with a \"presentation_definition\" claim within it. The\nvalue of the field named \"presentation_definition.id\" matches PresentationDefinitionID.\nThis is an output only field.","type":"string"},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4","type":"string"},"id":{"description":"ID for this request. It matches the \"jti\" claim in the JWT.\nThis is an output only field.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID used to sign the JWT.","type":"string"},"manifestId":{"description":"ID of the credential manifest used for this request.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request":{"type":"object","required":["expiration","issuerId","issuerKid","presentationDefinitionId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3.","type":"array","items":{"type":"string"}},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4","type":"string"},"id":{"description":"ID for this request. It matches the \"jti\" claim in the JWT.\nThis is an output only field.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID used to sign the JWT.","type":"string"},"presentationDefinitionId":{"description":"ID of the presentation definition used for this request.","type":"string"},"presentationRequestJwt":{"description":"PresentationDefinitionJWT is a JWT token with a \"presentation_definition\" claim within it. The\nvalue of the field named \"presentation_definition.id\" matches PresentationDefinitionID.\nThis is an output only field.","type":"string"}}},"github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Submission":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedNounsResponse":{"type":"object","properties":{"nouns":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"}}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.GetSupportedVerbsResponse":{"type":"object","properties":{"verbs":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}}}},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun":{"type":"string","enum":["Credential","DID","Manifest","SchemaID","Presentation","Application","Submission"],"x-enum-varnames":["Credential","DID","Manifest","Schema","Presentation","Application","Submission"]},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb":{"type":"string","enum":["Create","Delete"],"x-enum-varnames":["Create","Delete"]},"github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook":{"type":"object","required":["noun","urls","verb"],"properties":{"noun":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"},"urls":{"type":"array","items":{"type":"string"}},"verb":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}}},"jwx.PublicKeyJWK":{"type":"object","required":["kty"],"properties":{"alg":{"type":"string"},"crv":{"type":"string"},"e":{"type":"string"},"key_ops":{"type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"n":{"type":"string"},"use":{"type":"string"},"x":{"type":"string"},"y":{"type":"string"}}},"manifest.CredentialApplication":{"type":"object","required":["format","id","manifest_id","spec_version"],"properties":{"applicant":{"type":"string"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"id":{"type":"string"},"manifest_id":{"type":"string"},"presentation_submission":{"description":"Must be present if the corresponding manifest contains a presentation_definition","allOf":[{"$ref":"#/definitions/exchange.PresentationSubmission"}]},"spec_version":{"type":"string"}}},"manifest.CredentialManifest":{"type":"object","required":["id","issuer","output_descriptors","spec_version"],"properties":{"description":{"type":"string"},"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"id":{"type":"string"},"issuer":{"$ref":"#/definitions/manifest.Issuer"},"name":{"type":"string"},"output_descriptors":{"type":"array","items":{"$ref":"#/definitions/manifest.OutputDescriptor"}},"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"},"spec_version":{"type":"string"}}},"manifest.CredentialResponse":{"type":"object","required":["id","manifest_id","spec_version"],"properties":{"applicant":{"type":"string"},"application_id":{"type":"string"},"denial":{"type":"object","required":["reason"],"properties":{"input_descriptors":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"}}},"fulfillment":{"type":"object","required":["descriptor_map"],"properties":{"descriptor_map":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionDescriptor"}}}},"id":{"type":"string"},"manifest_id":{"type":"string"},"spec_version":{"type":"string"}}},"manifest.Issuer":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"styles":{"description":"an object or URI as defined by the DIF Entity Styles specification\nhttps://identity.foundation/wallet-rendering/#entity-styles","allOf":[{"$ref":"#/definitions/rendering.EntityStyleDescriptor"}]}}},"manifest.OutputDescriptor":{"type":"object","required":["id","schema"],"properties":{"description":{"type":"string"},"display":{"description":"both below: an object or URI as defined by the DIF Entity Styles specification","allOf":[{"$ref":"#/definitions/rendering.DataDisplay"}]},"id":{"description":"Must be unique within a manifest","type":"string"},"name":{"type":"string"},"schema":{"type":"string"},"styles":{"$ref":"#/definitions/rendering.EntityStyleDescriptor"}}},"pkg_server_router.CreateCredentialRequest":{"type":"object","required":["data","issuer","issuerKid","subject"],"properties":{"@context":{"description":"A context is optional. If not present, we'll apply default, required context values.","type":"string"},"data":{"description":"Claims about the subject. The keys should be predicates (e.g. \"alumniOf\"), and the values can be any object.","type":"object","additionalProperties":{"type":"string"},"example":{"alumniOf":"did_for_uni"}},"expiry":{"description":"Optional. Corresponds to ` + "`" + `expirationDate` + "`" + ` in https://www.w3.org/TR/vc-data-model/#expiration.","type":"string","example":"2020-01-01T19:23:24Z"},"issuer":{"description":"The issuer id.","type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"issuerKid":{"description":"The KID used to sign the credential.","type":"string","example":"#z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"revocable":{"description":"Whether this credential can be revoked. When true, the created VC will have the \"credentialStatus\"\nproperty set.","type":"boolean"},"schemaId":{"description":"A schema ID is optional. If present, we'll attempt to look it up and validate the data against it.","type":"string"},"subject":{"description":"The subject id.","type":"string","example":"did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"},"suspendable":{"description":"Whether this credential can be suspended. When true, the created VC will have the \"credentialStatus\"\nproperty set.","type":"boolean"}}},"pkg_server_router.CreateCredentialResponse":{"type":"object","properties":{"credential":{"description":"Verifiable Credential in the ` + "`" + `application/vc+ld+json` + "`" + ` format. The credential is secured with an external proof\nusing JWS. In other words, the ` + "`" + `proof` + "`" + ` field is not present. See ` + "`" + `credentialJwt` + "`" + ` for the secured Verifiable\nCredential.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"JWT representation of ` + "`" + `credential` + "`" + `, secured with an external proof signed by ` + "`" + `issuerKid` + "`" + `.","type":"string"},"id":{"description":"Credential ID","type":"string"},"issuerKid":{"description":"The KID of the private key used to sign ` + "`" + `credentialJwt` + "`" + `.","type":"string"},"revoked":{"description":"Whether this credential is currently revoked.","type":"boolean"},"suspended":{"description":"Whether this credential is currently suspended.","type":"boolean"}}},"pkg_server_router.CreateDIDByMethodRequest":{"type":"object","required":["keyType"],"properties":{"keyType":{"description":"Identifies the cryptographic algorithm family to use when generating this key.\nOne of the following: \"Ed25519\", \"X25519\", \"secp256k1\", \"P-224\",\"P-256\",\"P-384\", \"P-521\", \"RSA\"","allOf":[{"$ref":"#/definitions/crypto.KeyType"}]},"options":{"description":"Options for creating the DID. Implementation dependent on the method."}}},"pkg_server_router.CreateDIDByMethodResponse":{"type":"object","properties":{"did":{"$ref":"#/definitions/did.Document"}}},"pkg_server_router.CreateIssuanceTemplateRequest":{"type":"object","required":["credentialManifest","issuer","issuerKid"],"properties":{"credentialManifest":{"description":"ID of the credential manifest that this template corresponds to.","type":"string"},"credentials":{"description":"Info required to create a credential from a credential application.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.CredentialTemplate"}},"id":{"description":"ID of this template.","type":"string"},"issuer":{"description":"ID of the issuer that will be issuance the credentials.","type":"string"},"issuerKid":{"description":"ID of the key that will be used to sign the credentials.","type":"string"}}},"pkg_server_router.CreateManifestRequest":{"type":"object","required":["format","issuerDid","issuerKid","outputDescriptors"],"properties":{"description":{"description":"Explains what the Manifest in question is generally offering in exchange for meeting its requirements.\nOptional.","type":"string"},"format":{"description":"Formats that the issuer can support when issuing the credential. At least one needs to be set. We currently only\nsupport ` + "`" + `jwt_vc` + "`" + ` for issuance. See https://identity.foundation/claim-format-registry/#registry for the definition.\nTODO: support different claim formats https://github.com/TBD54566975/ssi-service/issues/96","allOf":[{"$ref":"#/definitions/exchange.ClaimFormat"}]},"issuerDid":{"description":"DID that identifies who the issuer of the credential(s) will be.\nRequired.","type":"string"},"issuerKid":{"description":"The KID of the private key that will be used when signing issued credentials.\nRequired.","type":"string"},"issuerName":{"description":"Human-readable name the Issuer wishes to be recognized by.\nOptional.","type":"string"},"name":{"description":"Summarizing title for the Manifest in question.\nOptional.","type":"string"},"outputDescriptors":{"description":"Array of objects as defined in https://identity.foundation/credential-manifest/#output-descriptor.","type":"array","items":{"$ref":"#/definitions/manifest.OutputDescriptor"}},"presentationDefinition":{"description":"value of the presentation definition to use. Must be empty if ` + "`" + `id` + "`" + ` is present.","allOf":[{"$ref":"#/definitions/exchange.PresentationDefinition"}]},"presentationDefinitionId":{"description":"id of the presentation definition created with PresentationDefinitionAPI. Must be empty if ` + "`" + `value` + "`" + ` is present.","type":"string"}}},"pkg_server_router.CreateManifestRequestRequest":{"type":"object","required":["credentialManifestId","issuerId","issuerKid"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3\nOptional","type":"array","items":{"type":"string"}},"credentialManifestId":{"description":"ID of the credential manifest to use for this request.","type":"string"},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4\nOptional. When not specified, the request will be valid for a default duration.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition. The DID must have been previously created with the DID API,\nor the PrivateKey must have been added independently.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID will be used to sign an envelope that contains\nthe created presentation definition.","type":"string"}}},"pkg_server_router.CreateManifestRequestResponse":{"type":"object","properties":{"manifestRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}},"pkg_server_router.CreateManifestResponse":{"type":"object","properties":{"credential_manifest":{"$ref":"#/definitions/manifest.CredentialManifest"}}},"pkg_server_router.CreatePresentationDefinitionRequest":{"type":"object","required":["inputDescriptors"],"properties":{"format":{"$ref":"#/definitions/exchange.ClaimFormat"},"inputDescriptors":{"type":"array","items":{"$ref":"#/definitions/exchange.InputDescriptor"}},"name":{"type":"string"},"purpose":{"type":"string"},"submissionRequirements":{"type":"array","items":{"$ref":"#/definitions/exchange.SubmissionRequirement"}}}},"pkg_server_router.CreatePresentationDefinitionResponse":{"type":"object","properties":{"presentationDefinitionJwt":{"description":"Signed envelope that contains the PresentationDefinition created using the privateKey of the author of the\ndefinition.","type":"string"},"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"}}},"pkg_server_router.CreateRequestRequest":{"type":"object","required":["issuerId","issuerKid","presentationDefinitionId"],"properties":{"audience":{"description":"Audience as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3\nOptional","type":"array","items":{"type":"string"}},"expiration":{"description":"Expiration as defined in https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.4\nOptional. When not specified, the request will be valid for a default duration.","type":"string"},"issuerId":{"description":"DID of the issuer of this presentation definition. The DID must have been previously created with the DID API,\nor the PrivateKey must have been added independently.","type":"string"},"issuerKid":{"description":"The privateKey associated with the KID will be used to sign an envelope that contains\nthe created presentation definition.","type":"string"},"presentationDefinitionId":{"description":"ID of the presentation definition to use for this request.","type":"string"}}},"pkg_server_router.CreateRequestResponse":{"type":"object","properties":{"presentationRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}},"pkg_server_router.CreateSchemaRequest":{"type":"object","required":["issuer","issuerKid","name","schema"],"properties":{"description":{"description":"Description is an optional human-readable description for a schema","type":"string"},"issuer":{"description":"Issuer represents the DID of the issuer for the schema if it's signed. Required if intending to sign the\nschema as a credential using CredentialSchema2023.","type":"string"},"issuerKid":{"description":"IssuerKID represents the KID of the issuer's private key to sign the schema. Required if intending to sign the\nschema as a credential using CredentialSchema2023.","type":"string"},"name":{"description":"Name is a human-readable name for a schema","type":"string"},"schema":{"description":"Schema represents the JSON schema for the credential schema\nIf the schema has an $id field, it will be overwritten with an ID the service generates.\nThe schema must be against draft 2020-12, 2019-09, or 7.","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]}}},"pkg_server_router.CreateSchemaResponse":{"type":"object","required":["type"],"properties":{"credentialSchema":{"description":"CredentialSchema is the JWT schema for the credential, returned when the type is CredentialSchema2023","type":"string"},"id":{"description":"ID is the URL of for resolution of the schema","type":"string"},"schema":{"description":"Schema is the JSON schema for the credential, returned when the type is JsonSchema2023","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]},"type":{"description":"Type is the type of schema such as ` + "`" + `JsonSchema2023` + "`" + ` or ` + "`" + `CredentialSchema2023` + "`" + `","allOf":[{"$ref":"#/definitions/schema.VCJSONSchemaType"}]}}},"pkg_server_router.CreateSubmissionRequest":{"type":"object","required":["submissionJwt"],"properties":{"submissionJwt":{"description":"A Verifiable Presentation that's encoded as a JWT.\nVerifiable Presentation are described in https://www.w3.org/TR/vc-data-model/#presentations-0\nJWT encoding of the Presentation as described in https://www.w3.org/TR/vc-data-model/#presentations-0","type":"string"}}},"pkg_server_router.CreateWebhookRequest":{"type":"object","required":["noun","url","verb"],"properties":{"noun":{"description":"The noun (entity) for the new webhook.eg: Credential","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Noun"}]},"url":{"description":"The URL to post the output of this request to Noun.Verb action to.","type":"string"},"verb":{"description":"The verb for the new webhook.eg: Create","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Verb"}]}}},"pkg_server_router.CreateWebhookResponse":{"type":"object","properties":{"webhook":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook"}}},"pkg_server_router.GetApplicationResponse":{"type":"object","properties":{"application":{"$ref":"#/definitions/manifest.CredentialApplication"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialResponse":{"type":"object","properties":{"credential":{"$ref":"#/definitions/credential.VerifiableCredential"},"credentialJwt":{"type":"string"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialStatusListResponse":{"type":"object","properties":{"credential":{"description":"Credential where type includes \"VerifiableCredential\" and \"StatusList2021\".","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"The JWT signed with the associated issuer's private key.","type":"string"},"id":{"type":"string"}}},"pkg_server_router.GetCredentialStatusResponse":{"type":"object","properties":{"revoked":{"description":"Whether the credential has been revoked.","type":"boolean"},"suspended":{"description":"Whether the credential has been suspended.","type":"boolean"}}},"pkg_server_router.GetDIDByMethodResponse":{"type":"object","properties":{"did":{"$ref":"#/definitions/did.Document"}}},"pkg_server_router.GetHealthCheckResponse":{"type":"object","properties":{"status":{"description":"Status is always equal to ` + "`" + `OK` + "`" + `.","type":"string"}}},"pkg_server_router.GetKeyDetailsResponse":{"type":"object","properties":{"controller":{"type":"string"},"createdAt":{"description":"Represents the time at which the key was created. Encoded according to RFC3339.","type":"string"},"id":{"type":"string"},"publicKeyJwk":{"description":"The public key in JWK format according to RFC7517. This public key is associated with the private\nkey with the associated ID.","allOf":[{"$ref":"#/definitions/jwx.PublicKeyJWK"}]},"type":{"$ref":"#/definitions/crypto.KeyType"}}},"pkg_server_router.GetManifestRequestResponse":{"type":"object","properties":{"manifestRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}},"pkg_server_router.GetPresentationDefinitionResponse":{"type":"object","properties":{"presentation_definition":{"$ref":"#/definitions/exchange.PresentationDefinition"}}},"pkg_server_router.GetReadinessResponse":{"type":"object","properties":{"serviceStatuses":{"description":"A map from the name of the service to the status of that current service.","type":"object","additionalProperties":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.Status"}},"status":{"description":"Overall status of the ssi service.","allOf":[{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_framework.Status"}]}}},"pkg_server_router.GetRequestResponse":{"type":"object","properties":{"presentationRequest":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}},"pkg_server_router.GetResponseResponse":{"type":"object","properties":{"credential_response":{"$ref":"#/definitions/manifest.CredentialResponse"},"responseJwt":{"type":"string"},"verifiableCredentials":{"description":"this is an interface type to union Data Integrity and JWT style VCs"}}},"pkg_server_router.GetSchemaResponse":{"type":"object","required":["type"],"properties":{"credentialSchema":{"description":"CredentialSchema is the JWT schema for the credential, returned when the type is CredentialSchema2023","type":"string"},"id":{"description":"ID is the URL of for resolution of the schema","type":"string"},"schema":{"description":"Schema is the JSON schema for the credential, returned when the type is JsonSchema2023","allOf":[{"$ref":"#/definitions/schema.JSONSchema"}]},"type":{"description":"Type is the type of schema such as ` + "`" + `JsonSchema2023` + "`" + ` or ` + "`" + `CredentialSchema2023` + "`" + `","allOf":[{"$ref":"#/definitions/schema.VCJSONSchemaType"}]}}},"pkg_server_router.GetSubmissionResponse":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"pkg_server_router.ListApplicationsResponse":{"type":"object","properties":{"applications":{"type":"array","items":{"$ref":"#/definitions/manifest.CredentialApplication"}}}},"pkg_server_router.ListCredentialsResponse":{"type":"object","properties":{"credentials":{"description":"Array of credentials that match the query parameters.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_internal_credential.Container"}}}},"pkg_server_router.ListDIDMethodsResponse":{"type":"object","properties":{"method":{"type":"array","items":{"$ref":"#/definitions/did.Method"}}}},"pkg_server_router.ListDIDsByMethodResponse":{"type":"object","properties":{"dids":{"type":"array","items":{"$ref":"#/definitions/did.Document"}}}},"pkg_server_router.ListDefinitionsResponse":{"type":"object","properties":{"definitions":{"type":"array","items":{"$ref":"#/definitions/exchange.PresentationDefinition"}}}},"pkg_server_router.ListIssuanceTemplatesResponse":{"type":"object","properties":{"issuanceTemplates":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_issuance.Template"}}}},"pkg_server_router.ListManifestRequestsResponse":{"type":"object","properties":{"manifestRequests":{"description":"The manifest requests matching the query.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.Request"}}}},"pkg_server_router.ListManifestResponse":{"type":"object","properties":{"credential_manifest":{"$ref":"#/definitions/manifest.CredentialManifest"},"id":{"type":"string"}}},"pkg_server_router.ListManifestsResponse":{"type":"object","properties":{"manifests":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.ListManifestResponse"}}}},"pkg_server_router.ListOperationsResponse":{"type":"object","properties":{"operations":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.Operation"}}}},"pkg_server_router.ListPresentationRequestsResponse":{"type":"object","properties":{"presentationRequests":{"description":"The presentation requests matching the query.","type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Request"}}}},"pkg_server_router.ListResponsesResponse":{"type":"object","properties":{"responses":{"type":"array","items":{"$ref":"#/definitions/manifest.CredentialResponse"}}}},"pkg_server_router.ListSchemasResponse":{"type":"object","properties":{"schemas":{"description":"Schemas is the list of all schemas the service holds","type":"array","items":{"$ref":"#/definitions/pkg_server_router.GetSchemaResponse"}}}},"pkg_server_router.ListSubmissionResponse":{"type":"object","properties":{"submissions":{"type":"array","items":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_presentation_model.Submission"}}}},"pkg_server_router.ListWebhookResponse":{"type":"object","properties":{"webhook":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_webhook.Webhook"}}},"pkg_server_router.ListWebhooksResponse":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/definitions/pkg_server_router.ListWebhookResponse"}}}},"pkg_server_router.Operation":{"type":"object","required":["done","id"],"properties":{"done":{"description":"Whether this operation has finished.","type":"boolean"},"id":{"description":"The name of the resource related to this operation. E.g. \"presentations/submissions/\u003cuuid\u003e\"","type":"string"},"result":{"description":"Populated if Done == true.","allOf":[{"$ref":"#/definitions/pkg_server_router.OperationResult"}]}}},"pkg_server_router.OperationResult":{"type":"object","properties":{"error":{"description":"Populated when there was an error with the operation.","type":"string"},"response":{"description":"Populated iff Error == \"\". The type should be specified in the calling APIs documentation."}}},"pkg_server_router.ResolveDIDResponse":{"type":"object","properties":{"didDocument":{"$ref":"#/definitions/did.Document"},"didDocumentMetadata":{"$ref":"#/definitions/resolution.DocumentMetadata"},"didResolutionMetadata":{"$ref":"#/definitions/resolution.Metadata"}}},"pkg_server_router.ReviewApplicationRequest":{"type":"object","properties":{"approved":{"type":"boolean"},"credentialOverrides":{"description":"Overrides to apply to the credentials that will be created. Keys are the ID that corresponds to an\nOutputDescriptor.ID from the manifest.","type":"object","additionalProperties":{"$ref":"#/definitions/github_com_tbd54566975_ssi-service_pkg_service_manifest_model.CredentialOverride"}},"reason":{"type":"string"}}},"pkg_server_router.ReviewSubmissionRequest":{"type":"object","required":["approved"],"properties":{"approved":{"type":"boolean"},"reason":{"type":"string"}}},"pkg_server_router.ReviewSubmissionResponse":{"type":"object","required":["status"],"properties":{"reason":{"description":"The reason why the submission was approved or denied.","type":"string"},"status":{"description":"One of {` + "`" + `pending` + "`" + `, ` + "`" + `approved` + "`" + `, ` + "`" + `denied` + "`" + `, ` + "`" + `cancelled` + "`" + `}.","type":"string"},"verifiablePresentation":{"description":"The verifiable presentation containing the presentation_submission along with the credentials presented.","allOf":[{"$ref":"#/definitions/credential.VerifiablePresentation"}]}}},"pkg_server_router.RevokeKeyResponse":{"type":"object","properties":{"id":{"type":"string"}}},"pkg_server_router.StoreKeyRequest":{"type":"object","required":["base58PrivateKey","controller","id","type"],"properties":{"base58PrivateKey":{"description":"Base58 encoding of the bytes that result from marshalling the private key using golang's implementation.","type":"string"},"controller":{"description":"See https://www.w3.org/TR/did-core/#did-controller","type":"string"},"id":{"description":"The ` + "`" + `id` + "`" + ` field is the unique identifier for this object. If set to a resolvable DID, the ssi-service will use\nthe private key encoded in the ` + "`" + `PrivateKeyBase58` + "`" + ` field of this object to sign objects issued or authored by this\nDID; otherwise, it will only be used to identify this object.","type":"string"},"type":{"description":"Identifies the cryptographic algorithm family used with the key.\nOne of the following: \"Ed25519\", \"X25519\", \"secp256k1\", \"P-224\", \"P-256\", \"P-384\", \"P-521\", \"RSA\".","allOf":[{"$ref":"#/definitions/crypto.KeyType"}]}}},"pkg_server_router.SubmitApplicationRequest":{"type":"object","required":["applicationJwt"],"properties":{"applicationJwt":{"description":"Contains the following properties:\nApplication manifestsdk.CredentialApplication ` + "`" + `json:\"credential_application\" validate:\"required\"` + "`" + `\nCredentials []interface{} ` + "`" + `json:\"vcs\" validate:\"required\"` + "`" + `","type":"string"}}},"pkg_server_router.SubmitApplicationResponse":{"type":"object","properties":{"credential_response":{"$ref":"#/definitions/manifest.CredentialResponse"},"responseJwt":{"type":"string"},"verifiableCredentials":{"description":"this is an any type to union Data Integrity and JWT style VCs","type":"array","items":{}}}},"pkg_server_router.UpdateCredentialStatusRequest":{"type":"object","properties":{"revoked":{"description":"The new revoked status of this credential. The status will be saved in the encodedList of the StatusList2021\ncredential associated with this VC.","type":"boolean"},"suspended":{"type":"boolean"}}},"pkg_server_router.UpdateCredentialStatusResponse":{"type":"object","properties":{"revoked":{"description":"The updated status of this credential.","type":"boolean"},"suspended":{"type":"boolean"}}},"pkg_server_router.VerifyCredentialRequest":{"type":"object","properties":{"credential":{"description":"A credential secured via data integrity. Must have the \"proof\" property set.","allOf":[{"$ref":"#/definitions/credential.VerifiableCredential"}]},"credentialJwt":{"description":"A JWT that encodes a credential.","type":"string"}}},"pkg_server_router.VerifyCredentialResponse":{"type":"object","properties":{"reason":{"description":"The reason why this credential couldn't be verified.","type":"string"},"verified":{"description":"Whether the credential was verified.","type":"boolean"}}},"rendering.ColorResource":{"type":"object","properties":{"color":{"description":"a HEX string color value (e.g. #00000)","type":"string"}}},"rendering.DataDisplay":{"type":"object","properties":{"description":{"$ref":"#/definitions/rendering.DisplayMappingObject"},"properties":{"type":"array","items":{"$ref":"#/definitions/rendering.LabeledDisplayMappingObject"}},"subtitle":{"$ref":"#/definitions/rendering.DisplayMappingObject"},"title":{"$ref":"#/definitions/rendering.DisplayMappingObject"}}},"rendering.DisplayMappingObject":{"type":"object","properties":{"fallback":{"type":"string"},"path":{"description":"Ifa path is present it must be an array of JSON Path string expressions\nand the schema property must also be present.","type":"array","items":{"type":"string"}},"schema":{"$ref":"#/definitions/rendering.DisplayMappingSchema"},"text":{"description":"If path is not present, the text value is required with no other properties","type":"string"}}},"rendering.DisplayMappingSchema":{"type":"object","required":["type"],"properties":{"format":{"description":"Must be present if the value of the type property is \"string\"","allOf":[{"$ref":"#/definitions/rendering.SchemaFormat"}]},"type":{"$ref":"#/definitions/rendering.SchemaType"}}},"rendering.EntityStyleDescriptor":{"type":"object","properties":{"background":{"$ref":"#/definitions/rendering.ColorResource"},"hero":{"$ref":"#/definitions/rendering.ImageResource"},"text":{"$ref":"#/definitions/rendering.ColorResource"},"thumbnail":{"$ref":"#/definitions/rendering.ImageResource"}}},"rendering.ImageResource":{"type":"object","required":["uri"],"properties":{"alt":{"description":"Describes the alternate text for a logo image","type":"string"},"uri":{"description":"Must be a valid URI string to an image resource","type":"string"}}},"rendering.LabeledDisplayMappingObject":{"type":"object","required":["label"],"properties":{"fallback":{"type":"string"},"label":{"type":"string"},"path":{"description":"Ifa path is present it must be an array of JSON Path string expressions\nand the schema property must also be present.","type":"array","items":{"type":"string"}},"schema":{"$ref":"#/definitions/rendering.DisplayMappingSchema"},"text":{"description":"If path is not present, the text value is required with no other properties","type":"string"}}},"rendering.SchemaFormat":{"type":"string","enum":["date-time","time","date","email","idn-email","hostname","idn-hostname","ipv4","ipv6","uri","uri-reference","iri","iri-reference"],"x-enum-varnames":["DateTimeFormat","TimeFormat","DateFormat","EmailFormat","IDNEmailFormat","HostnameFormat","IDNHostnameFormat","IPV4Format","IPV6Format","URIFormat","URIReferenceFormat","IRIFormat","IRIReferenceFormat"]},"rendering.SchemaType":{"type":"string","enum":["string","boolean","number","integer"],"x-enum-varnames":["StringType","BooleanType","NumberType","IntegerType"]},"resolution.DocumentMetadata":{"type":"object","properties":{"canonicalId":{"type":"string"},"created":{"type":"string"},"deactivated":{"type":"boolean"},"equivalentId":{"type":"string"},"nextUpdate":{"type":"string"},"nextVersionId":{"type":"string"},"updated":{"type":"string"},"versionId":{"type":"string"}}},"resolution.Error":{"type":"object","properties":{"code":{"type":"string"},"invalidDid":{"type":"boolean"},"notFound":{"type":"boolean"},"representationNotSupported":{"type":"boolean"}}},"resolution.Metadata":{"type":"object","properties":{"contentType":{"type":"string"},"error":{"$ref":"#/definitions/resolution.Error"}}},"schema.JSONSchema":{"type":"object","additionalProperties":{}},"schema.VCJSONSchemaType":{"type":"string","enum":["CredentialSchema2023","JsonSchema2023"],"x-enum-varnames":["CredentialSchema2023Type","JSONSchema2023Type"]},"time.Duration":{"type":"integer","enum":[-9223372036854775808,9223372036854775807,1,1000,1000000,1000000000,60000000000,3600000000000],"x-enum-varnames":["minDuration","maxDuration","Nanosecond","Microsecond","Millisecond","Second","Minute","Hour"]}}}` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ diff --git a/doc/swagger.yaml b/doc/swagger.yaml index da6eda737..27bf2a257 100644 --- a/doc/swagger.yaml +++ b/doc/swagger.yaml @@ -1073,23 +1073,51 @@ definitions: pkg_server_router.CreateManifestRequest: properties: description: + description: |- + Explains what the Manifest in question is generally offering in exchange for meeting its requirements. + Optional. type: string format: - $ref: '#/definitions/exchange.ClaimFormat' + allOf: + - $ref: '#/definitions/exchange.ClaimFormat' + description: |- + Formats that the issuer can support when issuing the credential. At least one needs to be set. We currently only + support `jwt_vc` for issuance. See https://identity.foundation/claim-format-registry/#registry for the definition. + TODO: support different claim formats https://github.com/TBD54566975/ssi-service/issues/96 issuerDid: + description: |- + DID that identifies who the issuer of the credential(s) will be. + Required. type: string issuerKid: + description: |- + The KID of the private key that will be used when signing issued credentials. + Required. type: string issuerName: + description: |- + Human-readable name the Issuer wishes to be recognized by. + Optional. type: string name: + description: |- + Summarizing title for the Manifest in question. + Optional. type: string outputDescriptors: + description: Array of objects as defined in https://identity.foundation/credential-manifest/#output-descriptor. items: $ref: '#/definitions/manifest.OutputDescriptor' type: array presentationDefinition: - $ref: '#/definitions/exchange.PresentationDefinition' + allOf: + - $ref: '#/definitions/exchange.PresentationDefinition' + description: value of the presentation definition to use. Must be empty if + `id` is present. + presentationDefinitionId: + description: id of the presentation definition created with PresentationDefinitionAPI. + Must be empty if `value` is present. + type: string required: - format - issuerDid @@ -2591,7 +2619,7 @@ paths: put: consumes: - application/json - description: Create manifest + description: Create manifest. Most fields map to the definitions from https://identity.foundation/credential-manifest/#general-composition. parameters: - description: request body in: body diff --git a/pkg/server/router/manifest.go b/pkg/server/router/manifest.go index 6cd4af93d..ff34971a2 100644 --- a/pkg/server/router/manifest.go +++ b/pkg/server/router/manifest.go @@ -44,26 +44,50 @@ func NewManifestRouter(s svcframework.Service) (*ManifestRouter, error) { // CreateManifestRequest is the request body for creating a manifest, which populates all remaining fields // and builds a well-formed manifest object. type CreateManifestRequest struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - IssuerDID string `json:"issuerDid" validate:"required"` - IssuerKID string `json:"issuerKid" validate:"required"` - IssuerName *string `json:"issuerName,omitempty"` - ClaimFormat *exchange.ClaimFormat `json:"format" validate:"required,dive"` - OutputDescriptors []manifestsdk.OutputDescriptor `json:"outputDescriptors" validate:"required,dive"` - PresentationDefinition *exchange.PresentationDefinition `json:"presentationDefinition,omitempty" validate:"omitempty,dive"` + // Summarizing title for the Manifest in question. + // Optional. + Name *string `json:"name,omitempty"` + + // Explains what the Manifest in question is generally offering in exchange for meeting its requirements. + // Optional. + Description *string `json:"description,omitempty"` + + // DID that identifies who the issuer of the credential(s) will be. + // Required. + IssuerDID string `json:"issuerDid" validate:"required"` + + // The KID of the private key that will be used when signing issued credentials. + // Required. + IssuerKID string `json:"issuerKid" validate:"required"` + + // Human-readable name the Issuer wishes to be recognized by. + // Optional. + IssuerName *string `json:"issuerName,omitempty"` + + // Formats that the issuer can support when issuing the credential. At least one needs to be set. We currently only + // support `jwt_vc` for issuance. See https://identity.foundation/claim-format-registry/#registry for the definition. + // TODO: support different claim formats https://github.com/TBD54566975/ssi-service/issues/96 + ClaimFormat *exchange.ClaimFormat `json:"format" validate:"required,dive"` + + // Array of objects as defined in https://identity.foundation/credential-manifest/#output-descriptor. + OutputDescriptors []manifestsdk.OutputDescriptor `json:"outputDescriptors" validate:"required,dive"` + + // Describes what proofs are required in order to issue this credential. When present, only `id` or `value` may be + // populated, but not both. + // Optional. + *model.PresentationDefinitionRef } func (c CreateManifestRequest) ToServiceRequest() model.CreateManifestRequest { return model.CreateManifestRequest{ - Name: c.Name, - Description: c.Description, - IssuerDID: c.IssuerDID, - IssuerKID: c.IssuerKID, - IssuerName: c.IssuerName, - OutputDescriptors: c.OutputDescriptors, - ClaimFormat: c.ClaimFormat, - PresentationDefinition: c.PresentationDefinition, + Name: c.Name, + Description: c.Description, + IssuerDID: c.IssuerDID, + IssuerKID: c.IssuerKID, + IssuerName: c.IssuerName, + OutputDescriptors: c.OutputDescriptors, + ClaimFormat: c.ClaimFormat, + PresentationDefinitionRef: c.PresentationDefinitionRef, } } @@ -74,7 +98,7 @@ type CreateManifestResponse struct { // CreateManifest godoc // // @Summary Create manifest -// @Description Create manifest +// @Description Create manifest. Most fields map to the definitions from https://identity.foundation/credential-manifest/#general-composition. // @Tags ManifestAPI // @Accept json // @Produce json diff --git a/pkg/server/router/manifest_test.go b/pkg/server/router/manifest_test.go index 36ee1a7ab..519096567 100644 --- a/pkg/server/router/manifest_test.go +++ b/pkg/server/router/manifest_test.go @@ -12,17 +12,15 @@ import ( "github.com/TBD54566975/ssi-sdk/did/key" "github.com/google/uuid" "github.com/stretchr/testify/assert" - - "github.com/tbd54566975/ssi-service/pkg/service/common" - - "github.com/tbd54566975/ssi-service/pkg/service/manifest/model" - "github.com/tbd54566975/ssi-service/pkg/service/operation/storage" - credmodel "github.com/tbd54566975/ssi-service/internal/credential" "github.com/tbd54566975/ssi-service/internal/keyaccess" + "github.com/tbd54566975/ssi-service/pkg/service/common" "github.com/tbd54566975/ssi-service/pkg/service/credential" "github.com/tbd54566975/ssi-service/pkg/service/did" "github.com/tbd54566975/ssi-service/pkg/service/framework" + "github.com/tbd54566975/ssi-service/pkg/service/manifest/model" + "github.com/tbd54566975/ssi-service/pkg/service/operation/storage" + presmodel "github.com/tbd54566975/ssi-service/pkg/service/presentation/model" "github.com/tbd54566975/ssi-service/pkg/service/schema" ) @@ -50,136 +48,181 @@ func TestManifestRouter(t *testing.T) { didService := testDIDService(tt, bolt, keyStoreService) schemaService := testSchemaService(tt, bolt, keyStoreService, didService) credentialService := testCredentialService(tt, bolt, keyStoreService, didService, schemaService) - manifestService := testManifestService(tt, bolt, keyStoreService, didService, credentialService) + presentationService := testPresentationDefinitionService(tt, bolt, didService, schemaService, keyStoreService) + manifestService := testManifestService(tt, bolt, keyStoreService, didService, credentialService, presentationService) assert.NotEmpty(tt, manifestService) - // check type and status - assert.Equal(tt, framework.Manifest, manifestService.Type()) - assert.Equal(tt, framework.StatusReady, manifestService.Status().Status) - - // create issuer and applicant DIDs - createDIDRequest := did.CreateDIDRequest{ - Method: didsdk.KeyMethod, - KeyType: crypto.Ed25519, - } - issuerDID, err := didService.CreateDIDByMethod(context.Background(), createDIDRequest) - assert.NoError(tt, err) - assert.NotEmpty(tt, issuerDID) - - applicantPrivKey, applicantDIDKey, err := key.GenerateDIDKey(crypto.Ed25519) - assert.NoError(tt, err) - assert.NotEmpty(tt, applicantPrivKey) - assert.NotEmpty(tt, applicantDIDKey) - - applicantDID, err := applicantDIDKey.Expand() - assert.NoError(tt, err) - assert.NotEmpty(tt, applicantDID) - - // create a schema for the creds to be issued against - licenseSchema := map[string]any{ - "$schema": "https://json-schema.org/draft-07/schema", - "type": "object", - "properties": map[string]any{ - "credentialSubject": map[string]any{ - "type": "object", - "properties": map[string]any{ - "id": map[string]any{ - "type": "string", - }, - "licenseType": map[string]any{ - "type": "string", + tt.Run("CreateManifest with presentation ID and value error", func(ttt *testing.T) { + defID := "an ID I know" + createManifestRequest := getValidManifestRequest("issuerDID", "issuerKID", "schemaID") + createManifestRequest.PresentationDefinitionRef.ID = &defID + + _, err := manifestService.CreateManifest(context.Background(), createManifestRequest) + + assert.Error(ttt, err) + assert.ErrorContains(ttt, err, `only one of "id" and "value" can be provided`) + }) + + tt.Run("CreateManifest with bad presentation ID returns error", func(ttt *testing.T) { + defID := "a bad ID" + createManifestRequest := getValidManifestRequest("issuerDID", "issuerKID", "schemaID") + createManifestRequest.PresentationDefinitionRef = &model.PresentationDefinitionRef{ + ID: &defID, + } + + _, err := manifestService.CreateManifest(context.Background(), createManifestRequest) + + assert.Error(ttt, err) + assert.ErrorContains(ttt, err, "presentation definition not found") + }) + + tt.Run("CreateManifest with presentation ID returns manifest", func(ttt *testing.T) { + definition := createPresentationDefinition(ttt) + resp, err := presentationService.CreatePresentationDefinition(context.Background(), presmodel.CreatePresentationDefinitionRequest{ + PresentationDefinition: *definition, + }) + assert.NoError(ttt, err) + assert.NotEmpty(ttt, resp) + + createManifestRequest := getValidManifestRequest("issuerDID", "issuerKID", "schemaID") + createManifestRequest.PresentationDefinitionRef = &model.PresentationDefinitionRef{ + ID: &resp.PresentationDefinition.ID, + } + manifest, err := manifestService.CreateManifest(context.Background(), createManifestRequest) + + assert.NoError(ttt, err) + assert.Equal(ttt, resp.PresentationDefinition, *manifest.Manifest.PresentationDefinition) + }) + + tt.Run("multiple behaviors", func(ttt *testing.T) { + // check type and status + assert.Equal(ttt, framework.Manifest, manifestService.Type()) + assert.Equal(ttt, framework.StatusReady, manifestService.Status().Status) + + // create issuer and applicant DIDs + createDIDRequest := did.CreateDIDRequest{ + Method: didsdk.KeyMethod, + KeyType: crypto.Ed25519, + } + issuerDID, err := didService.CreateDIDByMethod(context.Background(), createDIDRequest) + assert.NoError(ttt, err) + assert.NotEmpty(ttt, issuerDID) + + applicantPrivKey, applicantDIDKey, err := key.GenerateDIDKey(crypto.Ed25519) + assert.NoError(ttt, err) + assert.NotEmpty(ttt, applicantPrivKey) + assert.NotEmpty(ttt, applicantDIDKey) + + applicantDID, err := applicantDIDKey.Expand() + assert.NoError(ttt, err) + assert.NotEmpty(ttt, applicantDID) + + // create a schema for the creds to be issued against + licenseSchema := map[string]any{ + "$schema": "https://json-schema.org/draft-07/schema", + "type": "object", + "properties": map[string]any{ + "credentialSubject": map[string]any{ + "type": "object", + "properties": map[string]any{ + "id": map[string]any{ + "type": "string", + }, + "licenseType": map[string]any{ + "type": "string", + }, }, + "required": []any{"licenseType", "id"}, }, - "required": []any{"licenseType", "id"}, }, - }, - } - kid := issuerDID.DID.VerificationMethod[0].ID - createdSchema, err := schemaService.CreateSchema(context.Background(), schema.CreateSchemaRequest{Issuer: issuerDID.DID.ID, IssuerKID: kid, Name: "license schema", Schema: licenseSchema}) - assert.NoError(tt, err) - assert.NotEmpty(tt, createdSchema) - - // issue a credential against the schema to the subject, from the issuer - createdCred, err := credentialService.CreateCredential(context.Background(), credential.CreateCredentialRequest{ - Issuer: issuerDID.DID.ID, - IssuerKID: kid, - Subject: applicantDID.ID, - SchemaID: createdSchema.ID, - Data: map[string]any{"licenseType": "WA-DL-CLASS-A"}, - }) - assert.NoError(tt, err) - assert.NotEmpty(tt, createdCred) - - // good manifest request, which asks for a single verifiable credential in the VC-JWT format - createManifestRequest := getValidManifestRequest(issuerDID.DID.ID, kid, createdSchema.ID) - createdManifest, err := manifestService.CreateManifest(context.Background(), createManifestRequest) - assert.NoError(tt, err) - assert.NotEmpty(tt, createdManifest) - - manifestRequestRequest := getValidManifestRequestRequest(issuerDID, kid, createdManifest) - manifestRequest, err := manifestService.CreateRequest(context.Background(), manifestRequestRequest) - assert.NoError(tt, err) - assert.Equal(tt, createdManifest.Manifest.ID, manifestRequest.ManifestID) - assert.NotEmpty(tt, manifestRequest.CredentialManifestJWT.String()) - - got, err := manifestService.GetRequest(context.Background(), &model.GetRequestRequest{ID: manifestRequest.ID}) - assert.NoError(t, err) - assert.Equal(t, manifestRequest, got) - - err = manifestService.DeleteRequest(context.Background(), model.DeleteRequestRequest{ID: manifestRequest.ID}) - assert.NoError(t, err) - - _, err = manifestService.GetRequest(context.Background(), &model.GetRequestRequest{ID: manifestRequest.ID}) - assert.Error(t, err) - assert.ErrorContains(t, err, "request not found") - - verificationResponse, err := manifestService.VerifyManifest(context.Background(), model.VerifyManifestRequest{ManifestJWT: manifestRequest.CredentialManifestJWT}) - assert.NoError(tt, err) - assert.NotEmpty(tt, verificationResponse) - assert.True(tt, verificationResponse.Verified) - - m := createdManifest.Manifest - assert.NotEmpty(tt, m) - - // good application request - containers := []credmodel.Container{{ - ID: createdCred.ID, - CredentialJWT: createdCred.CredentialJWT, - }} - applicationRequest := getValidApplicationRequest(m.ID, m.PresentationDefinition.ID, m.PresentationDefinition.InputDescriptors[0].ID, containers) - - // sign application - signer, err := keyaccess.NewJWKKeyAccess(applicantDID.ID, applicantDID.VerificationMethod[0].ID, applicantPrivKey) - assert.NoError(tt, err) - signed, err := signer.SignJSON(applicationRequest) - assert.NoError(tt, err) - - submitApplicationRequest := SubmitApplicationRequest{ApplicationJWT: *signed} - sar, err := submitApplicationRequest.toServiceRequest() - assert.NoError(tt, err) - createdApplicationResponseOp, err := manifestService.ProcessApplicationSubmission(context.Background(), *sar) - assert.NoError(tt, err) - assert.False(tt, createdApplicationResponseOp.Done) - - createdApplicationResponse, err := manifestService.ReviewApplication(context.Background(), model.ReviewApplicationRequest{ - ID: storage.StatusObjectID(createdApplicationResponseOp.ID), - Approved: true, - Reason: "ApprovalMan is here", - CredentialOverrides: map[string]model.CredentialOverride{ - "id1": { - Data: map[string]any{"licenseType": "Class D"}, - }, - "id2": { - Data: map[string]any{"licenseType": "Class D"}, + } + kid := issuerDID.DID.VerificationMethod[0].ID + createdSchema, err := schemaService.CreateSchema(context.Background(), schema.CreateSchemaRequest{Issuer: issuerDID.DID.ID, IssuerKID: kid, Name: "license schema", Schema: licenseSchema}) + assert.NoError(ttt, err) + assert.NotEmpty(ttt, createdSchema) + + // issue a credential against the schema to the subject, from the issuer + createdCred, err := credentialService.CreateCredential(context.Background(), credential.CreateCredentialRequest{ + Issuer: issuerDID.DID.ID, + IssuerKID: kid, + Subject: applicantDID.ID, + SchemaID: createdSchema.ID, + Data: map[string]any{"licenseType": "WA-DL-CLASS-A"}, + }) + assert.NoError(ttt, err) + assert.NotEmpty(ttt, createdCred) + + // good manifest request, which asks for a single verifiable credential in the VC-JWT format + createManifestRequest := getValidManifestRequest(issuerDID.DID.ID, kid, createdSchema.ID) + createdManifest, err := manifestService.CreateManifest(context.Background(), createManifestRequest) + assert.NoError(ttt, err) + assert.NotEmpty(ttt, createdManifest) + + manifestRequestRequest := getValidManifestRequestRequest(issuerDID, kid, createdManifest) + manifestRequest, err := manifestService.CreateRequest(context.Background(), manifestRequestRequest) + assert.NoError(ttt, err) + assert.Equal(ttt, createdManifest.Manifest.ID, manifestRequest.ManifestID) + assert.NotEmpty(ttt, manifestRequest.CredentialManifestJWT.String()) + + got, err := manifestService.GetRequest(context.Background(), &model.GetRequestRequest{ID: manifestRequest.ID}) + assert.NoError(t, err) + assert.Equal(t, manifestRequest, got) + + err = manifestService.DeleteRequest(context.Background(), model.DeleteRequestRequest{ID: manifestRequest.ID}) + assert.NoError(t, err) + + _, err = manifestService.GetRequest(context.Background(), &model.GetRequestRequest{ID: manifestRequest.ID}) + assert.Error(t, err) + assert.ErrorContains(t, err, "request not found") + + verificationResponse, err := manifestService.VerifyManifest(context.Background(), model.VerifyManifestRequest{ManifestJWT: manifestRequest.CredentialManifestJWT}) + assert.NoError(ttt, err) + assert.NotEmpty(ttt, verificationResponse) + assert.True(ttt, verificationResponse.Verified) + + m := createdManifest.Manifest + assert.NotEmpty(ttt, m) + + // good application request + containers := []credmodel.Container{{ + ID: createdCred.ID, + CredentialJWT: createdCred.CredentialJWT, + }} + applicationRequest := getValidApplicationRequest(m.ID, m.PresentationDefinition.ID, m.PresentationDefinition.InputDescriptors[0].ID, containers) + + // sign application + signer, err := keyaccess.NewJWKKeyAccess(applicantDID.ID, applicantDID.VerificationMethod[0].ID, applicantPrivKey) + assert.NoError(ttt, err) + signed, err := signer.SignJSON(applicationRequest) + assert.NoError(ttt, err) + + submitApplicationRequest := SubmitApplicationRequest{ApplicationJWT: *signed} + sar, err := submitApplicationRequest.toServiceRequest() + assert.NoError(ttt, err) + createdApplicationResponseOp, err := manifestService.ProcessApplicationSubmission(context.Background(), *sar) + assert.NoError(ttt, err) + assert.False(ttt, createdApplicationResponseOp.Done) + + createdApplicationResponse, err := manifestService.ReviewApplication(context.Background(), model.ReviewApplicationRequest{ + ID: storage.StatusObjectID(createdApplicationResponseOp.ID), + Approved: true, + Reason: "ApprovalMan is here", + CredentialOverrides: map[string]model.CredentialOverride{ + "id1": { + Data: map[string]any{"licenseType": "Class D"}, + }, + "id2": { + Data: map[string]any{"licenseType": "Class D"}, + }, }, - }, + }) + assert.NoError(ttt, err) + assert.NotEmpty(ttt, createdManifest) + assert.NotEmpty(ttt, createdApplicationResponse.Response.ID) + assert.NotEmpty(ttt, createdApplicationResponse.Response.Fulfillment) + assert.Empty(ttt, createdApplicationResponse.Response.Denial) + assert.Equal(ttt, len(createManifestRequest.OutputDescriptors), len(createdApplicationResponse.Credentials)) }) - assert.NoError(tt, err) - assert.NotEmpty(tt, createdManifest) - assert.NotEmpty(tt, createdApplicationResponse.Response.ID) - assert.NotEmpty(tt, createdApplicationResponse.Response.Fulfillment) - assert.Empty(tt, createdApplicationResponse.Response.Denial) - assert.Equal(tt, len(createManifestRequest.OutputDescriptors), len(createdApplicationResponse.Credentials)) }) } @@ -205,21 +248,23 @@ func getValidManifestRequest(issuerDID, issuerKID, schemaID string) model.Create ClaimFormat: &exchange.ClaimFormat{ JWTVC: &exchange.JWTType{Alg: []crypto.SignatureAlgorithm{crypto.EdDSA}}, }, - PresentationDefinition: &exchange.PresentationDefinition{ - ID: "id123", - InputDescriptors: []exchange.InputDescriptor{ - { - ID: "license-type", - Constraints: &exchange.Constraints{ - Fields: []exchange.Field{ - { - Path: []string{"$.vc.credentialSubject.licenseType"}, + PresentationDefinitionRef: &model.PresentationDefinitionRef{ + PresentationDefinition: &exchange.PresentationDefinition{ + ID: "id123", + InputDescriptors: []exchange.InputDescriptor{ + { + ID: "license-type", + Constraints: &exchange.Constraints{ + Fields: []exchange.Field{ + { + Path: []string{"$.vc.credentialSubject.licenseType"}, + }, }, }, - }, - Format: &exchange.ClaimFormat{ - JWTVC: &exchange.JWTType{ - Alg: []crypto.SignatureAlgorithm{crypto.EdDSA}, + Format: &exchange.ClaimFormat{ + JWTVC: &exchange.JWTType{ + Alg: []crypto.SignatureAlgorithm{crypto.EdDSA}, + }, }, }, }, diff --git a/pkg/server/router/testutils_test.go b/pkg/server/router/testutils_test.go index 6befaff89..4d422b566 100644 --- a/pkg/server/router/testutils_test.go +++ b/pkg/server/router/testutils_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tbd54566975/ssi-service/pkg/service/presentation" "github.com/tbd54566975/ssi-service/pkg/testutil" @@ -64,10 +65,20 @@ func testCredentialService(t *testing.T, db storage.ServiceStorage, keyStore *ke return credentialService } -func testManifestService(t *testing.T, db storage.ServiceStorage, keyStore *keystore.Service, did *did.Service, credential *credential.Service) *manifest.Service { +func testPresentationDefinitionService(t *testing.T, db storage.ServiceStorage, didService *did.Service, schemaService *schema.Service, keyStoreService *keystore.Service) *presentation.Service { + cfg := config.PresentationServiceConfig{BaseServiceConfig: &config.BaseServiceConfig{ + Name: "presentation", + }} + svc, err := presentation.NewPresentationService(cfg, db, didService.GetResolver(), schemaService, keyStoreService) + require.NoError(t, err) + require.NotEmpty(t, svc) + return svc +} + +func testManifestService(t *testing.T, db storage.ServiceStorage, keyStore *keystore.Service, did *did.Service, credential *credential.Service, presentationSvc *presentation.Service) *manifest.Service { serviceConfig := config.ManifestServiceConfig{BaseServiceConfig: &config.BaseServiceConfig{Name: "manifest"}} // create a manifest service - manifestService, err := manifest.NewManifestService(serviceConfig, db, keyStore, did.GetResolver(), credential) + manifestService, err := manifest.NewManifestService(serviceConfig, db, keyStore, did.GetResolver(), credential, presentationSvc) require.NoError(t, err) require.NotEmpty(t, manifestService) return manifestService diff --git a/pkg/server/server_test.go b/pkg/server/server_test.go index 24146a455..a0c866ffb 100644 --- a/pkg/server/server_test.go +++ b/pkg/server/server_test.go @@ -129,25 +129,27 @@ func newRequestContextWithParams(w http.ResponseWriter, req *http.Request, param return c } -func getValidCreateManifestRequest(issuerDID, issuerKID, schemaID string) model.CreateManifestRequest { - return model.CreateManifestRequest{ +func getValidCreateManifestRequest(issuerDID, issuerKID, schemaID string) router.CreateManifestRequest { + return router.CreateManifestRequest{ IssuerDID: issuerDID, IssuerKID: issuerKID, ClaimFormat: &exchange.ClaimFormat{ JWTVC: &exchange.JWTType{Alg: []crypto.SignatureAlgorithm{crypto.EdDSA}}, }, - PresentationDefinition: &exchange.PresentationDefinition{ - ID: "valid-license-application", - InputDescriptors: []exchange.InputDescriptor{ - { - ID: "license-type", - Constraints: &exchange.Constraints{ - Fields: []exchange.Field{ - { - Path: []string{"$.vc.credentialSubject.licenseType"}, - Filter: &exchange.Filter{ - Type: "string", - Pattern: "Class D|Class M|Class V", + PresentationDefinitionRef: &model.PresentationDefinitionRef{ + PresentationDefinition: &exchange.PresentationDefinition{ + ID: "valid-license-application", + InputDescriptors: []exchange.InputDescriptor{ + { + ID: "license-type", + Constraints: &exchange.Constraints{ + Fields: []exchange.Field{ + { + Path: []string{"$.vc.credentialSubject.licenseType"}, + Filter: &exchange.Filter{ + Type: "string", + Pattern: "Class D|Class M|Class V", + }, }, }, }, @@ -304,7 +306,7 @@ func testCredentialRouter(t *testing.T, bolt storage.ServiceStorage, keyStore *k func testManifest(t *testing.T, db storage.ServiceStorage, keyStore *keystore.Service, did *did.Service, credential *credential.Service) (*router.ManifestRouter, *manifest.Service) { serviceConfig := config.ManifestServiceConfig{BaseServiceConfig: &config.BaseServiceConfig{Name: "manifest"}} // create a manifest service - manifestService, err := manifest.NewManifestService(serviceConfig, db, keyStore, did.GetResolver(), credential) + manifestService, err := manifest.NewManifestService(serviceConfig, db, keyStore, did.GetResolver(), credential, nil) require.NoError(t, err) require.NotEmpty(t, manifestService) diff --git a/pkg/service/manifest/model/model.go b/pkg/service/manifest/model/model.go index dd35e2473..1535ab70f 100644 --- a/pkg/service/manifest/model/model.go +++ b/pkg/service/manifest/model/model.go @@ -15,15 +15,14 @@ import ( // Manifest type CreateManifestRequest struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - IssuerDID string `json:"issuerDid" validate:"required"` - IssuerKID string `json:"issuerKid" validate:"required"` - IssuerName *string `json:"issuerName,omitempty"` - OutputDescriptors []manifestsdk.OutputDescriptor `json:"outputDescriptors" validate:"required,dive"` - ClaimFormat *exchange.ClaimFormat `json:"format" validate:"required,dive"` - // TODO: Allow for specifying the presentation definition only by id. https://github.com/TBD54566975/ssi-service/issues/491 - PresentationDefinition *exchange.PresentationDefinition `json:"presentationDefinition,omitempty" validate:"omitempty,dive"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + IssuerDID string `json:"issuerDid" validate:"required"` + IssuerKID string `json:"issuerKid" validate:"required"` + IssuerName *string `json:"issuerName,omitempty"` + OutputDescriptors []manifestsdk.OutputDescriptor `json:"outputDescriptors" validate:"required,dive"` + ClaimFormat *exchange.ClaimFormat `json:"format" validate:"required,dive"` + PresentationDefinitionRef *PresentationDefinitionRef `json:"presentationDefinitionRef,omitempty" validate:"omitempty,dive"` } type CreateManifestResponse struct { @@ -179,3 +178,11 @@ type Request struct { // This is an output only field. CredentialManifestJWT keyaccess.JWT `json:"credentialManifestJwt"` } + +type PresentationDefinitionRef struct { + // id of the presentation definition created with PresentationDefinitionAPI. Must be empty if `value` is present. + ID *string `json:"presentationDefinitionId"` + + // value of the presentation definition to use. Must be empty if `id` is present. + PresentationDefinition *exchange.PresentationDefinition `json:"presentationDefinition" validate:"omitempty,dive"` +} diff --git a/pkg/service/manifest/service.go b/pkg/service/manifest/service.go index d415bfebf..f51548a0b 100644 --- a/pkg/service/manifest/service.go +++ b/pkg/service/manifest/service.go @@ -4,6 +4,7 @@ import ( "context" "fmt" + "github.com/TBD54566975/ssi-sdk/credential/exchange" "github.com/TBD54566975/ssi-sdk/credential/manifest" "github.com/TBD54566975/ssi-sdk/did/resolution" errresp "github.com/TBD54566975/ssi-sdk/error" @@ -12,7 +13,6 @@ import ( "github.com/goccy/go-json" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "github.com/tbd54566975/ssi-service/config" credint "github.com/tbd54566975/ssi-service/internal/credential" "github.com/tbd54566975/ssi-service/internal/keyaccess" @@ -26,6 +26,8 @@ import ( "github.com/tbd54566975/ssi-service/pkg/service/operation" opcredential "github.com/tbd54566975/ssi-service/pkg/service/operation/credential" opstorage "github.com/tbd54566975/ssi-service/pkg/service/operation/storage" + "github.com/tbd54566975/ssi-service/pkg/service/presentation" + presmodel "github.com/tbd54566975/ssi-service/pkg/service/presentation/model" "github.com/tbd54566975/ssi-service/pkg/storage" ) @@ -38,9 +40,10 @@ type Service struct { config config.ManifestServiceConfig // external dependencies - keyStore *keystore.Service - didResolver resolution.Resolver - credential *credential.Service + keyStore *keystore.Service + presentationSvc *presentation.Service + didResolver resolution.Resolver + credential *credential.Service Clock clock.Clock reqStorage common.RequestStorage @@ -77,8 +80,7 @@ func (s Service) Config() config.ManifestServiceConfig { return s.config } -func NewManifestService(config config.ManifestServiceConfig, s storage.ServiceStorage, keyStore *keystore.Service, - didResolver resolution.Resolver, credential *credential.Service) (*Service, error) { +func NewManifestService(config config.ManifestServiceConfig, s storage.ServiceStorage, keyStore *keystore.Service, didResolver resolution.Resolver, credential *credential.Service, presentationSvc *presentation.Service) (*Service, error) { manifestStorage, err := manifeststg.NewManifestStorage(s) if err != nil { return nil, sdkutil.LoggingErrorMsg(err, "could not instantiate storage for the manifest service") @@ -102,6 +104,7 @@ func NewManifestService(config config.ManifestServiceConfig, s storage.ServiceSt credential: credential, Clock: clock.New(), reqStorage: requestStorage, + presentationSvc: presentationSvc, }, nil } @@ -156,12 +159,29 @@ func (s Service) CreateManifest(ctx context.Context, request model.CreateManifes request.OutputDescriptors, ) } - if request.PresentationDefinition != nil { - if err := builder.SetPresentationDefinition(*request.PresentationDefinition); err != nil { + if request.PresentationDefinitionRef != nil { + var pd *exchange.PresentationDefinition + if request.PresentationDefinitionRef.ID != nil && request.PresentationDefinitionRef.PresentationDefinition != nil { + return nil, errors.New(`only one of "id" and "value" can be provided`) + } + + if request.PresentationDefinitionRef.ID != nil { + resp, err := s.presentationSvc.GetPresentationDefinition(ctx, presmodel.GetPresentationDefinitionRequest{ID: *request.PresentationDefinitionRef.ID}) + if err != nil { + return nil, errors.Wrap(err, "getting presentation definition") + } + pd = &resp.PresentationDefinition + } + + if request.PresentationDefinitionRef.PresentationDefinition != nil { + pd = request.PresentationDefinitionRef.PresentationDefinition + } + + if err := builder.SetPresentationDefinition(*pd); err != nil { return nil, sdkutil.LoggingErrorMsgf( err, "could not set presentation definition<%+v> for manifest", - request.PresentationDefinition, + request.PresentationDefinitionRef, ) } } diff --git a/pkg/service/service.go b/pkg/service/service.go index 64852c5af..31aecf52d 100644 --- a/pkg/service/service.go +++ b/pkg/service/service.go @@ -115,14 +115,14 @@ func instantiateServices(config config.ServicesConfig) (*SSIService, error) { return nil, sdkutil.LoggingErrorMsg(err, "could not instantiate the credential service") } - manifestService, err := manifest.NewManifestService(config.ManifestConfig, storageProvider, keyStoreService, didResolver, credentialService) + presentationService, err := presentation.NewPresentationService(config.PresentationConfig, storageProvider, didResolver, schemaService, keyStoreService) if err != nil { - return nil, sdkutil.LoggingErrorMsg(err, "could not instantiate the manifest service") + return nil, sdkutil.LoggingErrorMsg(err, "could not instantiate the presentation service") } - presentationService, err := presentation.NewPresentationService(config.PresentationConfig, storageProvider, didResolver, schemaService, keyStoreService) + manifestService, err := manifest.NewManifestService(config.ManifestConfig, storageProvider, keyStoreService, didResolver, credentialService, presentationService) if err != nil { - return nil, sdkutil.LoggingErrorMsg(err, "could not instantiate the presentation service") + return nil, sdkutil.LoggingErrorMsg(err, "could not instantiate the manifest service") } operationService, err := operation.NewOperationService(storageProvider) From 2ba63e1d7ac32bef0999732e958a22a946ada2cc Mon Sep 17 00:00:00 2001 From: Andres Uribe Date: Wed, 7 Jun 2023 06:31:36 -0500 Subject: [PATCH 3/3] Fix spec when updating mod. (#516) --- magefile.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/magefile.go b/magefile.go index 7f3646bdd..5e2a32ecd 100644 --- a/magefile.go +++ b/magefile.go @@ -112,6 +112,12 @@ func Spec() error { return err } + // We need to download deps first as a workaround to https://github.com/TBD54566975/ssi-service/issues/515 + if err := sh.Run(Go, "mod", "download"); err != nil { + logrus.WithError(err).Error("failed to download dependencies") + return err + } + if err := sh.Run(swagCommand, "fmt", "-d", "pkg/server/router"); err != nil { logrus.WithError(err).Error("failed to format swagger docs") return err