UNPKG

@sphereon/ssi-sdk.issuance-branding

Version:

1 lines • 82.3 kB
{"version":3,"sources":["../plugin.schema.json","../src/index.ts","../src/agent/IssuanceBranding.ts"],"sourcesContent":["{\n \"IIssuanceBranding\": {\n \"components\": {\n \"schemas\": {\n \"IAddCredentialBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"vcHash\": {\n \"type\": \"string\"\n },\n \"localeBranding\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IBasicCredentialLocaleBranding\"\n }\n }\n },\n \"required\": [\"issuerCorrelationId\", \"vcHash\", \"localeBranding\"],\n \"additionalProperties\": false\n },\n \"IBasicCredentialLocaleBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"alias\": {\n \"type\": \"string\"\n },\n \"locale\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"logo\": {\n \"$ref\": \"#/components/schemas/IBasicImageAttributes\"\n },\n \"background\": {\n \"$ref\": \"#/components/schemas/IBasicBackgroundAttributes\"\n },\n \"text\": {\n \"$ref\": \"#/components/schemas/IBasicTextAttributes\"\n },\n \"claims\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IBasicCredentialClaim\"\n }\n }\n },\n \"additionalProperties\": false\n },\n \"IBasicImageAttributes\": {\n \"type\": \"object\",\n \"properties\": {\n \"uri\": {\n \"type\": \"string\"\n },\n \"dataUri\": {\n \"type\": \"string\"\n },\n \"mediaType\": {\n \"type\": \"string\"\n },\n \"alt\": {\n \"type\": \"string\"\n },\n \"dimensions\": {\n \"$ref\": \"#/components/schemas/IBasicImageDimensions\"\n }\n },\n \"additionalProperties\": false\n },\n \"IBasicImageDimensions\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"width\": {\n \"type\": \"number\"\n },\n \"height\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"height\", \"width\"]\n },\n \"IBasicBackgroundAttributes\": {\n \"type\": \"object\",\n \"properties\": {\n \"color\": {\n \"type\": \"string\"\n },\n \"image\": {\n \"$ref\": \"#/components/schemas/IBasicImageAttributes\"\n }\n },\n \"additionalProperties\": false\n },\n \"IBasicTextAttributes\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"color\": {\n \"type\": \"string\"\n }\n }\n },\n \"IBasicCredentialClaim\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"key\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"key\", \"name\"]\n },\n \"ICredentialBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"vcHash\": {\n \"type\": \"string\"\n },\n \"localeBranding\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialLocaleBranding\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"issuerCorrelationId\", \"vcHash\", \"localeBranding\", \"createdAt\", \"lastUpdatedAt\"],\n \"additionalProperties\": false\n },\n \"ICredentialLocaleBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"locale\": {\n \"type\": \"string\"\n },\n \"logo\": {\n \"$ref\": \"#/components/schemas/IImageAttributes\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"background\": {\n \"$ref\": \"#/components/schemas/IBackgroundAttributes\"\n },\n \"text\": {\n \"$ref\": \"#/components/schemas/ITextAttributes\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"claims\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialClaim\"\n }\n }\n },\n \"additionalProperties\": false,\n \"required\": [\"createdAt\", \"id\", \"lastUpdatedAt\"]\n },\n \"IImageAttributes\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"dataUri\": {\n \"type\": \"string\"\n },\n \"mediaType\": {\n \"type\": \"string\"\n },\n \"alt\": {\n \"type\": \"string\"\n },\n \"dimensions\": {\n \"$ref\": \"#/components/schemas/IImageDimensions\"\n }\n },\n \"required\": [\"id\"],\n \"additionalProperties\": false\n },\n \"IImageDimensions\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"width\": {\n \"type\": \"number\"\n },\n \"height\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"id\", \"width\", \"height\"],\n \"additionalProperties\": false\n },\n \"IBackgroundAttributes\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"color\": {\n \"type\": \"string\"\n },\n \"image\": {\n \"$ref\": \"#/components/schemas/IImageAttributes\"\n }\n },\n \"required\": [\"id\"],\n \"additionalProperties\": false\n },\n \"ITextAttributes\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"color\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\"],\n \"additionalProperties\": false\n },\n \"ICredentialClaim\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"key\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"key\", \"name\"],\n \"additionalProperties\": false\n },\n \"IAddCredentialLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"credentialBrandingId\": {\n \"type\": \"string\"\n },\n \"localeBranding\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IBasicCredentialLocaleBranding\"\n }\n }\n },\n \"required\": [\"credentialBrandingId\", \"localeBranding\"],\n \"additionalProperties\": false\n },\n \"IAddIssuerBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"localeBranding\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IBasicIssuerLocaleBranding\"\n }\n }\n },\n \"required\": [\"issuerCorrelationId\", \"localeBranding\"],\n \"additionalProperties\": false\n },\n \"IBasicIssuerLocaleBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"clientUri\": {\n \"type\": \"string\"\n },\n \"tosUri\": {\n \"type\": \"string\"\n },\n \"policyUri\": {\n \"type\": \"string\"\n },\n \"contacts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"locale\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"logo\": {\n \"$ref\": \"#/components/schemas/IBasicImageAttributes\"\n },\n \"background\": {\n \"$ref\": \"#/components/schemas/IBasicBackgroundAttributes\"\n },\n \"text\": {\n \"$ref\": \"#/components/schemas/IBasicTextAttributes\"\n }\n },\n \"additionalProperties\": false\n },\n \"IIssuerBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"localeBranding\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIssuerLocaleBranding\"\n }\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n },\n \"required\": [\"id\", \"issuerCorrelationId\", \"localeBranding\", \"createdAt\", \"lastUpdatedAt\"],\n \"additionalProperties\": false\n },\n \"IIssuerLocaleBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"locale\": {\n \"type\": \"string\"\n },\n \"logo\": {\n \"$ref\": \"#/components/schemas/IImageAttributes\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"background\": {\n \"$ref\": \"#/components/schemas/IBackgroundAttributes\"\n },\n \"text\": {\n \"$ref\": \"#/components/schemas/ITextAttributes\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"clientUri\": {\n \"type\": \"string\"\n },\n \"tosUri\": {\n \"type\": \"string\"\n },\n \"policyUri\": {\n \"type\": \"string\"\n },\n \"contacts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n },\n \"additionalProperties\": false,\n \"required\": [\"createdAt\", \"id\", \"lastUpdatedAt\"]\n },\n \"IAddIssuerLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"issuerBrandingId\": {\n \"type\": \"string\"\n },\n \"localeBranding\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IBasicIssuerLocaleBranding\"\n }\n }\n },\n \"required\": [\"issuerBrandingId\", \"localeBranding\"],\n \"additionalProperties\": false\n },\n \"ICredentialBrandingFromArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"localeBranding\": {\n \"$ref\": \"#/components/schemas/IBasicCredentialLocaleBranding\"\n }\n },\n \"required\": [\"localeBranding\"],\n \"additionalProperties\": false\n },\n \"IGetCredentialBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindCredentialBrandingArgs\"\n }\n },\n \"additionalProperties\": false\n },\n \"FindCredentialBrandingArgs\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialBrandingFilter\"\n }\n },\n \"ICredentialBrandingFilter\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"vcHash\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"localeBranding\": {\n \"$ref\": \"#/components/schemas/IPartialCredentialLocaleBranding\"\n }\n }\n },\n \"IPartialCredentialLocaleBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"locale\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"logo\": {\n \"$ref\": \"#/components/schemas/IPartialImageAttributes\"\n },\n \"background\": {\n \"$ref\": \"#/components/schemas/IPartialBackgroundAttributes\"\n },\n \"text\": {\n \"$ref\": \"#/components/schemas/IPartialTextAttributes\"\n },\n \"claims\": {\n \"$ref\": \"#/components/schemas/IPartialCredentialClaim\"\n }\n },\n \"additionalProperties\": false\n },\n \"IPartialImageAttributes\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"dataUri\": {\n \"type\": \"string\"\n },\n \"mediaType\": {\n \"type\": \"string\"\n },\n \"alt\": {\n \"type\": \"string\"\n },\n \"dimensions\": {\n \"$ref\": \"#/components/schemas/IPartialImageDimensions\"\n }\n },\n \"additionalProperties\": false\n },\n \"IPartialImageDimensions\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"width\": {\n \"type\": \"number\"\n },\n \"height\": {\n \"type\": \"number\"\n }\n }\n },\n \"IPartialBackgroundAttributes\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"color\": {\n \"type\": \"string\"\n },\n \"image\": {\n \"$ref\": \"#/components/schemas/IPartialImageAttributes\"\n }\n },\n \"additionalProperties\": false\n },\n \"IPartialTextAttributes\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"color\": {\n \"type\": \"string\"\n }\n }\n },\n \"IPartialCredentialClaim\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"key\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n }\n }\n },\n \"IGetCredentialLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindCredentialLocaleBrandingArgs\"\n }\n },\n \"additionalProperties\": false\n },\n \"FindCredentialLocaleBrandingArgs\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialLocaleBrandingFilter\"\n }\n },\n \"ICredentialLocaleBrandingFilter\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"locale\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"logo\": {\n \"$ref\": \"#/components/schemas/IPartialImageAttributes\"\n },\n \"background\": {\n \"$ref\": \"#/components/schemas/IPartialBackgroundAttributes\"\n },\n \"text\": {\n \"$ref\": \"#/components/schemas/IPartialTextAttributes\"\n },\n \"claims\": {\n \"$ref\": \"#/components/schemas/IPartialCredentialClaim\"\n },\n \"credentialBranding\": {\n \"$ref\": \"#/components/schemas/IPartialCredentialBranding\"\n }\n },\n \"additionalProperties\": false\n },\n \"IPartialCredentialBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"vcHash\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"localeBranding\": {\n \"$ref\": \"#/components/schemas/IPartialCredentialLocaleBranding\"\n }\n },\n \"additionalProperties\": false\n },\n \"IGetIssuerBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindIssuerBrandingArgs\"\n }\n },\n \"additionalProperties\": false\n },\n \"FindIssuerBrandingArgs\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIssuerBrandingFilter\"\n }\n },\n \"IIssuerBrandingFilter\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"localeBranding\": {\n \"$ref\": \"#/components/schemas/IPartialIssuerLocaleBranding\"\n }\n }\n },\n \"IPartialIssuerLocaleBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"clientUri\": {\n \"type\": \"string\"\n },\n \"tosUri\": {\n \"type\": \"string\"\n },\n \"policyUri\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"locale\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"logo\": {\n \"$ref\": \"#/components/schemas/IPartialImageAttributes\"\n },\n \"background\": {\n \"$ref\": \"#/components/schemas/IPartialBackgroundAttributes\"\n },\n \"text\": {\n \"$ref\": \"#/components/schemas/IPartialTextAttributes\"\n },\n \"contacts\": {\n \"type\": \"string\"\n }\n },\n \"additionalProperties\": false\n },\n \"IGetIssuerLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindIssuerLocaleBrandingArgs\"\n }\n },\n \"additionalProperties\": false\n },\n \"FindIssuerLocaleBrandingArgs\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIssuerLocaleBrandingFilter\"\n }\n },\n \"IIssuerLocaleBrandingFilter\": {\n \"type\": \"object\",\n \"properties\": {\n \"clientUri\": {\n \"type\": \"string\"\n },\n \"tosUri\": {\n \"type\": \"string\"\n },\n \"policyUri\": {\n \"type\": \"string\"\n },\n \"id\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"locale\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"logo\": {\n \"$ref\": \"#/components/schemas/IPartialImageAttributes\"\n },\n \"background\": {\n \"$ref\": \"#/components/schemas/IPartialBackgroundAttributes\"\n },\n \"text\": {\n \"$ref\": \"#/components/schemas/IPartialTextAttributes\"\n },\n \"contacts\": {\n \"type\": \"string\"\n },\n \"issuerBranding\": {\n \"$ref\": \"#/components/schemas/IPartialIssuerBranding\"\n }\n },\n \"additionalProperties\": false\n },\n \"IPartialIssuerBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"lastUpdatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"localeBranding\": {\n \"$ref\": \"#/components/schemas/IPartialIssuerLocaleBranding\"\n }\n },\n \"additionalProperties\": false\n },\n \"IIssuerBrandingFromArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"localeBranding\": {\n \"$ref\": \"#/components/schemas/IBasicIssuerLocaleBranding\"\n }\n },\n \"required\": [\"localeBranding\"],\n \"additionalProperties\": false\n },\n \"IRemoveCredentialBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindCredentialBrandingArgs\"\n }\n },\n \"required\": [\"filter\"],\n \"additionalProperties\": false\n },\n \"IDeletionResult\": {\n \"type\": \"object\",\n \"properties\": {\n \"result\": {\n \"type\": \"boolean\"\n },\n \"error\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"result\"],\n \"additionalProperties\": false\n },\n \"IRemoveCredentialLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindCredentialLocaleBrandingArgs\"\n }\n },\n \"required\": [\"filter\"],\n \"additionalProperties\": false\n },\n \"IRemoveIssuerBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindIssuerBrandingArgs\"\n }\n },\n \"required\": [\"filter\"],\n \"additionalProperties\": false\n },\n \"IRemoveIssuerLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindIssuerLocaleBrandingArgs\"\n }\n },\n \"required\": [\"filter\"],\n \"additionalProperties\": false\n },\n \"IUpdateCredentialBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"credentialBranding\": {\n \"$ref\": \"#/components/schemas/Omit<ICredentialBranding,(\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>\"\n }\n },\n \"required\": [\"credentialBranding\"],\n \"additionalProperties\": false\n },\n \"Omit<ICredentialBranding,(\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>\": {\n \"$ref\": \"#/components/schemas/Pick<ICredentialBranding,Exclude<(\\\"id\\\"|\\\"issuerCorrelationId\\\"|\\\"vcHash\\\"|\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"),(\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>>\"\n },\n \"Pick<ICredentialBranding,Exclude<(\\\"id\\\"|\\\"issuerCorrelationId\\\"|\\\"vcHash\\\"|\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"),(\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>>\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n },\n \"vcHash\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"issuerCorrelationId\", \"vcHash\"],\n \"additionalProperties\": false\n },\n \"IUpdateCredentialLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"localeBranding\": {\n \"$ref\": \"#/components/schemas/Omit<ILocaleBranding,(\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>\"\n }\n },\n \"required\": [\"localeBranding\"],\n \"additionalProperties\": false\n },\n \"Omit<ILocaleBranding,(\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>\": {\n \"$ref\": \"#/components/schemas/Pick<ILocaleBranding,Exclude<(\\\"id\\\"|\\\"alias\\\"|\\\"locale\\\"|\\\"logo\\\"|\\\"description\\\"|\\\"background\\\"|\\\"text\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"),(\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>>\"\n },\n \"Pick<ILocaleBranding,Exclude<(\\\"id\\\"|\\\"alias\\\"|\\\"locale\\\"|\\\"logo\\\"|\\\"description\\\"|\\\"background\\\"|\\\"text\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"),(\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>>\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"alias\": {\n \"type\": \"string\"\n },\n \"locale\": {\n \"type\": \"string\"\n },\n \"logo\": {\n \"$ref\": \"#/components/schemas/IImageAttributes\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"background\": {\n \"$ref\": \"#/components/schemas/IBackgroundAttributes\"\n },\n \"text\": {\n \"$ref\": \"#/components/schemas/ITextAttributes\"\n }\n },\n \"required\": [\"id\"],\n \"additionalProperties\": false\n },\n \"IUpdateIssuerBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"issuerBranding\": {\n \"$ref\": \"#/components/schemas/Omit<IIssuerBranding,(\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>\"\n }\n },\n \"required\": [\"issuerBranding\"],\n \"additionalProperties\": false\n },\n \"Omit<IIssuerBranding,(\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>\": {\n \"$ref\": \"#/components/schemas/Pick<IIssuerBranding,Exclude<(\\\"id\\\"|\\\"issuerCorrelationId\\\"|\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"),(\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>>\"\n },\n \"Pick<IIssuerBranding,Exclude<(\\\"id\\\"|\\\"issuerCorrelationId\\\"|\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\"),(\\\"localeBranding\\\"|\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>>\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"id\", \"issuerCorrelationId\"],\n \"additionalProperties\": false\n },\n \"IUpdateIssuerLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"localeBranding\": {\n \"$ref\": \"#/components/schemas/Omit<ILocaleBranding,(\\\"createdAt\\\"|\\\"lastUpdatedAt\\\")>\"\n }\n },\n \"required\": [\"localeBranding\"],\n \"additionalProperties\": false\n }\n },\n \"methods\": {\n \"ibAddCredentialBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddCredentialBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/ICredentialBranding\"\n }\n },\n \"ibAddCredentialLocaleBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddCredentialLocaleBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/ICredentialBranding\"\n }\n },\n \"ibAddIssuerBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddIssuerBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIssuerBranding\"\n }\n },\n \"ibAddIssuerLocaleBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IAddIssuerLocaleBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIssuerBranding\"\n }\n },\n \"ibCredentialLocaleBrandingFrom\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/ICredentialBrandingFromArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IBasicCredentialLocaleBranding\"\n }\n },\n \"ibGetCredentialBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetCredentialBrandingArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialBranding\"\n }\n }\n },\n \"ibGetCredentialLocaleBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetCredentialLocaleBrandingArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialLocaleBranding\"\n }\n }\n },\n \"ibGetIssuerBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetIssuerBrandingArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIssuerBranding\"\n }\n }\n },\n \"ibGetIssuerLocaleBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IGetIssuerLocaleBrandingArgs\"\n },\n \"returnType\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIssuerLocaleBranding\"\n }\n }\n },\n \"ibIssuerLocaleBrandingFrom\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IIssuerBrandingFromArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IBasicIssuerLocaleBranding\"\n }\n },\n \"ibRemoveCredentialBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveCredentialBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IDeletionResult\"\n }\n },\n \"ibRemoveCredentialLocaleBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveCredentialLocaleBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IDeletionResult\"\n }\n },\n \"ibRemoveIssuerBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveIssuerBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IDeletionResult\"\n }\n },\n \"ibRemoveIssuerLocaleBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IRemoveIssuerLocaleBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IDeletionResult\"\n }\n },\n \"ibUpdateCredentialBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateCredentialBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/ICredentialBranding\"\n }\n },\n \"ibUpdateCredentialLocaleBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateCredentialLocaleBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/ICredentialLocaleBranding\"\n }\n },\n \"ibUpdateIssuerBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateIssuerBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIssuerBranding\"\n }\n },\n \"ibUpdateIssuerLocaleBranding\": {\n \"description\": \"\",\n \"arguments\": {\n \"$ref\": \"#/components/schemas/IUpdateIssuerLocaleBrandingArgs\"\n },\n \"returnType\": {\n \"$ref\": \"#/components/schemas/IIssuerLocaleBranding\"\n }\n }\n }\n }\n }\n}\n","/**\n * @public\n */\nconst schema = require('../plugin.schema.json')\nexport { schema }\nexport { IssuanceBranding, issuanceBrandingMethods } from './agent/IssuanceBranding'\nexport * from './types/IIssuanceBranding'\n","import { IAgentPlugin } from '@veramo/core'\nimport { downloadImage, getImageDimensions, getImageMediaType, IImageDimensions, IImageResource } from '@sphereon/ssi-sdk.core'\nimport {\n AbstractIssuanceBrandingStore,\n IAddIssuerBrandingArgs,\n IBasicCredentialBranding,\n IBasicCredentialLocaleBranding,\n IBasicImageAttributes,\n IBasicIssuerBranding,\n IBasicIssuerLocaleBranding,\n ICredentialBranding,\n ICredentialLocaleBranding,\n IGetCredentialBrandingArgs,\n IGetCredentialLocaleBrandingArgs,\n IGetIssuerBrandingArgs,\n IIssuerBranding,\n IIssuerLocaleBranding,\n ILocaleBranding,\n} from '@sphereon/ssi-sdk.data-store'\nimport { schema } from '../index'\nimport {\n IAddCredentialBrandingArgs,\n IAdditionalImageAttributes,\n IDeletionResult,\n IIssuanceBranding,\n IRequiredContext,\n IRemoveCredentialBrandingArgs,\n IRemoveIssuerBrandingArgs,\n IUpdateCredentialBrandingArgs,\n IUpdateIssuerBrandingArgs,\n IAddCredentialLocaleBrandingArgs,\n IAddIssuerLocaleBrandingArgs,\n IGetIssuerLocaleBrandingArgs,\n IRemoveIssuerLocaleBrandingArgs,\n IRemoveCredentialLocaleBrandingArgs,\n IUpdateCredentialLocaleBrandingArgs,\n IUpdateIssuerLocaleBrandingArgs,\n ICredentialBrandingFromArgs,\n IIssuerBrandingFromArgs,\n} from '../types/IIssuanceBranding'\nimport Debug from 'debug'\n\nconst debug: Debug.Debugger = Debug('sphereon:ssi-sdk:issuance-branding')\n\nexport const issuanceBrandingMethods: Array<string> = [\n 'ibAddCredentialBranding',\n 'ibGetCredentialBranding',\n 'ibUpdateCredentialBranding',\n 'ibRemoveCredentialBranding',\n 'ibAddCredentialLocaleBranding',\n 'ibGetCredentialLocaleBranding',\n 'ibRemoveCredentialLocaleBranding',\n 'ibUpdateCredentialLocaleBranding',\n 'ibCredentialLocaleBrandingFrom',\n 'ibAddIssuerBranding',\n 'ibGetIssuerBranding',\n 'ibUpdateIssuerBranding',\n 'ibRemoveIssuerBranding',\n 'ibAddIssuerLocaleBranding',\n 'ibGetIssuerLocaleBranding',\n 'ibRemoveIssuerLocaleBranding',\n 'ibUpdateIssuerLocaleBranding',\n 'ibIssuerLocaleBrandingFrom',\n]\n\nconst EMPTY_IMAGE_ATTRIBUTES = {\n mediaType: undefined,\n dataUri: undefined,\n dimensions: undefined,\n}\n\n/**\n * {@inheritDoc IIssuanceBranding}\n */\nexport class IssuanceBranding implements IAgentPlugin {\n readonly schema = schema.IIssuanceBranding\n readonly methods: IIssuanceBranding = {\n ibAddCredentialBranding: this.ibAddCredentialBranding.bind(this),\n ibGetCredentialBranding: this.ibGetCredentialBranding.bind(this),\n ibUpdateCredentialBranding: this.ibUpdateCredentialBranding.bind(this),\n ibRemoveCredentialBranding: this.ibRemoveCredentialBranding.bind(this),\n ibAddCredentialLocaleBranding: this.ibAddCredentialLocaleBranding.bind(this),\n ibGetCredentialLocaleBranding: this.ibGetCredentialLocaleBranding.bind(this),\n ibRemoveCredentialLocaleBranding: this.ibRemoveCredentialLocaleBranding.bind(this),\n ibUpdateCredentialLocaleBranding: this.ibUpdateCredentialLocaleBranding.bind(this),\n ibCredentialLocaleBrandingFrom: this.ibCredentialLocaleBrandingFrom.bind(this),\n ibAddIssuerBranding: this.ibAddIssuerBranding.bind(this),\n ibGetIssuerBranding: this.ibGetIssuerBranding.bind(this),\n ibUpdateIssuerBranding: this.ibUpdateIssuerBranding.bind(this),\n ibRemoveIssuerBranding: this.inRemoveIssuerBranding.bind(this),\n ibAddIssuerLocaleBranding: this.ibAddIssuerLocaleBranding.bind(this),\n ibGetIssuerLocaleBranding: this.ibAGetIssuerLocaleBranding.bind(this),\n ibRemoveIssuerLocaleBranding: this.ibRemoveIssuerLocaleBranding.bind(this),\n ibUpdateIssuerLocaleBranding: this.ibUpdateIssuerLocaleBranding.bind(this),\n ibIssuerLocaleBrandingFrom: this.ibIssuerLocaleBrandingFrom.bind(this),\n }\n\n private readonly store: AbstractIssuanceBrandingStore\n\n constructor(options: { store: AbstractIssuanceBrandingStore }) {\n this.store = options.store\n }\n\n /** {@inheritDoc IIssuanceBranding.ibAddCredentialBranding} */\n private async ibAddCredentialBranding(args: IAddCredentialBrandingArgs, context: IRequiredContext): Promise<ICredentialBranding> {\n const localeBranding: Array<IBasicIssuerLocaleBranding> = await Promise.all(\n args.localeBranding.map(\n (localeBranding: IBasicCredentialLocaleBranding): IBasicCredentialLocaleBranding | Promise<IBasicCredentialLocaleBranding> =>\n this.setAdditionalImageAttributes(localeBranding),\n ),\n )\n\n const credentialBranding: IBasicCredentialBranding = {\n ...args,\n localeBranding,\n }\n\n debug('Adding credential branding', credentialBranding)\n return this.store.addCredentialBranding(credentialBranding)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibGetCredentialBranding} */\n private async ibGetCredentialBranding(args?: IGetCredentialBrandingArgs): Promise<Array<ICredentialBranding>> {\n debug('Getting credential branding', args)\n return this.store.getCredentialBranding(args)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibUpdateCredentialBranding} */\n private async ibUpdateCredentialBranding(args: IUpdateCredentialBrandingArgs, context: IRequiredContext): Promise<ICredentialBranding> {\n debug('Updating credential branding', args)\n return this.store.updateCredentialBranding(args)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibRemoveCredentialBranding} */\n private async ibRemoveCredentialBranding(args: IRemoveCredentialBrandingArgs, context: IRequiredContext): Promise<IDeletionResult> {\n debug('Removing credential branding', args)\n return this.store\n .removeCredentialBranding(args)\n .then(() => ({ result: true }))\n .catch((error: Error) => ({ result: false, error: error.message }))\n }\n\n /** {@inheritDoc IIssuanceBranding.ibAddCredentialLocaleBranding} */\n private async ibAddCredentialLocaleBranding(args: IAddCredentialLocaleBrandingArgs, context: IRequiredContext): Promise<ICredentialBranding> {\n const localeBranding: Array<IBasicCredentialLocaleBranding> = await Promise.all(\n args.localeBranding.map(\n (localeBranding: IBasicCredentialLocaleBranding): Promise<IBasicCredentialLocaleBranding> =>\n this.setAdditionalImageAttributes(localeBranding),\n ),\n )\n const addCredentialLocaleBrandingArgs: IAddCredentialLocaleBrandingArgs = {\n ...args,\n localeBranding,\n }\n\n debug('Adding credential locale branding', addCredentialLocaleBrandingArgs)\n return this.store.addCredentialLocaleBranding(addCredentialLocaleBrandingArgs)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibGetCredentialLocaleBranding} */\n private async ibGetCredentialLocaleBranding(args?: IGetCredentialLocaleBrandingArgs): Promise<Array<ICredentialLocaleBranding>> {\n debug('Getting credential locale branding', args)\n return this.store.getCredentialLocaleBranding(args)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibRemoveCredentialLocaleBranding} */\n private async ibRemoveCredentialLocaleBranding(args: IRemoveCredentialLocaleBrandingArgs, context: IRequiredContext): Promise<IDeletionResult> {\n debug('Removing credential locale branding', args)\n return this.store\n .removeCredentialLocaleBranding(args)\n .then(() => ({ result: true }))\n .catch((error: Error) => ({ result: false, error: error.message }))\n }\n\n /** {@inheritDoc IIssuanceBranding.ibUpdateCredentialLocaleBranding} */\n private async ibUpdateCredentialLocaleBranding(\n args: IUpdateCredentialLocaleBrandingArgs,\n context: IRequiredContext,\n ): Promise<ICredentialLocaleBranding> {\n const localeBranding: Omit<ILocaleBranding, 'createdAt' | 'lastUpdatedAt'> = (await this.setAdditionalImageAttributes(\n args.localeBranding,\n )) as ICredentialLocaleBranding\n const updateCredentialLocaleBrandingArgs: IUpdateCredentialLocaleBrandingArgs = {\n ...args,\n localeBranding,\n }\n\n debug('Updating credential locale branding', updateCredentialLocaleBrandingArgs)\n return this.store.updateCredentialLocaleBranding(updateCredentialLocaleBrandingArgs)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibCredentialLocaleBrandingFrom} */\n private async ibCredentialLocaleBrandingFrom(\n args: ICredentialBrandingFromArgs,\n context: IRequiredContext,\n ): Promise<IBasicCredentialLocaleBranding> {\n debug('get credential locale branding from', args)\n return this.setAdditionalImageAttributes(args.localeBranding)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibAddIssuerBranding} */\n private async ibAddIssuerBranding(args: IAddIssuerBrandingArgs, context: IRequiredContext): Promise<IIssuerBranding> {\n const localeBranding: Array<IBasicIssuerLocaleBranding> = await Promise.all(\n args.localeBranding.map(\n (localeBranding: IBasicIssuerLocaleBranding): Promise<IBasicIssuerLocaleBranding> => this.setAdditionalImageAttributes(localeBranding),\n ),\n )\n const issuerBranding: IBasicIssuerBranding = {\n ...args,\n localeBranding,\n }\n\n debug('Adding issuer branding', issuerBranding)\n return this.store.addIssuerBranding(issuerBranding)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibGetIssuerBranding} */\n private async ibGetIssuerBranding(args?: IGetIssuerBrandingArgs): Promise<Array<IIssuerBranding>> {\n debug('Getting issuer branding', args)\n return this.store.getIssuerBranding(args)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibUpdateIssuerBranding} */\n private async ibUpdateIssuerBranding(args: IUpdateIssuerBrandingArgs, context: IRequiredContext): Promise<IIssuerBranding> {\n debug('Updating issuer branding', args)\n return this.store.updateIssuerBrandin