@sphereon/ssi-sdk.issuance-branding 0.33.1-feature.vcdm2.4 → 0.33.1-feature.vcdm2.tsup.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1528 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{ssi-sdk.issuance-branding.d.ts → index.d.cts} +152 -188
- package/dist/index.d.ts +148 -4
- package/dist/index.js +1491 -7
- package/dist/index.js.map +1 -1
- package/package.json +23 -13
- package/dist/agent/IssuanceBranding.d.ts +0 -56
- package/dist/agent/IssuanceBranding.d.ts.map +0 -1
- package/dist/agent/IssuanceBranding.js +0 -267
- package/dist/agent/IssuanceBranding.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/tsdoc-metadata.json +0 -11
- package/dist/types/IIssuanceBranding.d.ts +0 -92
- package/dist/types/IIssuanceBranding.d.ts.map +0 -1
- package/dist/types/IIssuanceBranding.js +0 -2
- package/dist/types/IIssuanceBranding.js.map +0 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AACpF,cAAc,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"sources":["../plugin.schema.json","../src/agent/IssuanceBranding.ts","../src/index.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\": [\n \"issuerCorrelationId\",\n \"vcHash\",\n \"localeBranding\"\n ]\n },\n \"IBasicCredentialLocaleBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"alias\": {},\n \"locale\": {},\n \"description\": {},\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 \"required\": [\n \"alias\",\n \"description\",\n \"locale\"\n ]\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 },\n \"IBasicImageDimensions\": {\n \"type\": \"object\",\n \"properties\": {\n \"width\": {\n \"type\": \"number\"\n },\n \"height\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"height\",\n \"width\"\n ]\n },\n \"IBasicBackgroundAttributes\": {\n \"type\": \"object\",\n \"properties\": {\n \"color\": {\n \"type\": \"string\"\n },\n \"image\": {\n \"$ref\": \"#/components/schemas/IBasicImageAttributes\"\n }\n }\n },\n \"IBasicTextAttributes\": {\n \"type\": \"object\",\n \"properties\": {\n \"color\": {\n \"type\": \"string\"\n }\n }\n },\n \"IBasicCredentialClaim\": {\n \"type\": \"object\",\n \"properties\": {\n \"key\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"key\",\n \"name\"\n ]\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\": [\n \"id\",\n \"issuerCorrelationId\",\n \"vcHash\",\n \"localeBranding\",\n \"createdAt\",\n \"lastUpdatedAt\"\n ]\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 \"required\": [\n \"createdAt\",\n \"id\",\n \"lastUpdatedAt\"\n ]\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\": [\n \"id\"\n ]\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\": [\n \"id\",\n \"width\",\n \"height\"\n ]\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\": [\n \"id\"\n ]\n },\n \"ITextAttributes\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"color\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\"\n ]\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\": [\n \"id\",\n \"key\",\n \"name\"\n ]\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\": [\n \"credentialBrandingId\",\n \"localeBranding\"\n ]\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\": [\n \"issuerCorrelationId\",\n \"localeBranding\"\n ]\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 \"locale\": {},\n \"description\": {},\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 \"required\": [\n \"alias\",\n \"description\",\n \"locale\"\n ]\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\": [\n \"id\",\n \"issuerCorrelationId\",\n \"localeBranding\",\n \"createdAt\",\n \"lastUpdatedAt\"\n ]\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 \"required\": [\n \"createdAt\",\n \"id\",\n \"lastUpdatedAt\"\n ]\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\": [\n \"issuerBrandingId\",\n \"localeBranding\"\n ]\n },\n \"ICredentialBrandingFromArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"localeBranding\": {\n \"$ref\": \"#/components/schemas/IBasicCredentialLocaleBranding\"\n }\n },\n \"required\": [\n \"localeBranding\"\n ]\n },\n \"IGetCredentialBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindCredentialBrandingArgs\"\n }\n }\n },\n \"FindCredentialBrandingArgs\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/ICredentialBrandingFilter\"\n }\n },\n \"ICredentialBrandingFilter\": {\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 },\n \"IPartialCredentialLocaleBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {},\n \"alias\": {},\n \"locale\": {},\n \"description\": {},\n \"createdAt\": {},\n \"lastUpdatedAt\": {},\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 },\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 },\n \"IPartialImageDimensions\": {\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 },\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 },\n \"IPartialTextAttributes\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"color\": {\n \"type\": \"string\"\n }\n }\n },\n \"IPartialCredentialClaim\": {\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 },\n \"IGetCredentialLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindCredentialLocaleBrandingArgs\"\n }\n }\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 \"alias\": {},\n \"locale\": {},\n \"description\": {},\n \"createdAt\": {},\n \"lastUpdatedAt\": {},\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 },\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 },\n \"IGetIssuerBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindIssuerBrandingArgs\"\n }\n }\n },\n \"FindIssuerBrandingArgs\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/components/schemas/IIssuerBrandingFilter\"\n }\n },\n \"IIssuerBrandingFilter\": {\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 },\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 \"alias\": {},\n \"locale\": {},\n \"description\": {},\n \"createdAt\": {},\n \"lastUpdatedAt\": {},\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 },\n \"IGetIssuerLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindIssuerLocaleBrandingArgs\"\n }\n }\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 \"alias\": {},\n \"locale\": {},\n \"description\": {},\n \"createdAt\": {},\n \"lastUpdatedAt\": {},\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 },\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 },\n \"IIssuerBrandingFromArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"localeBranding\": {\n \"$ref\": \"#/components/schemas/IBasicIssuerLocaleBranding\"\n }\n },\n \"required\": [\n \"localeBranding\"\n ]\n },\n \"IRemoveCredentialBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindCredentialBrandingArgs\"\n }\n },\n \"required\": [\n \"filter\"\n ]\n },\n \"IDeletionResult\": {\n \"type\": \"object\",\n \"properties\": {\n \"result\": {\n \"type\": \"boolean\"\n },\n \"error\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"result\"\n ]\n },\n \"IRemoveCredentialLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindCredentialLocaleBrandingArgs\"\n }\n },\n \"required\": [\n \"filter\"\n ]\n },\n \"IRemoveIssuerBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindIssuerBrandingArgs\"\n }\n },\n \"required\": [\n \"filter\"\n ]\n },\n \"IRemoveIssuerLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"$ref\": \"#/components/schemas/FindIssuerLocaleBrandingArgs\"\n }\n },\n \"required\": [\n \"filter\"\n ]\n },\n \"IUpdateCredentialBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"credentialBranding\": {\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\": [\n \"id\",\n \"issuerCorrelationId\",\n \"vcHash\"\n ]\n }\n },\n \"required\": [\n \"credentialBranding\"\n ]\n },\n \"IUpdateCredentialLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"localeBranding\": {\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\": [\n \"id\"\n ]\n }\n },\n \"required\": [\n \"localeBranding\"\n ]\n },\n \"IUpdateIssuerBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"issuerBranding\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"issuerCorrelationId\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\",\n \"issuerCorrelationId\"\n ]\n }\n },\n \"required\": [\n \"issuerBranding\"\n ]\n },\n \"IUpdateIssuerLocaleBrandingArgs\": {\n \"type\": \"object\",\n \"properties\": {\n \"localeBranding\": {\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\": [\n \"id\"\n ]\n }\n },\n \"required\": [\n \"localeBranding\"\n ]\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}","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.updateIssuerBranding(args)\n }\n\n /** {@inheritDoc IIssuanceBranding.inRemoveIssuerBranding} */\n private async inRemoveIssuerBranding(args: IRemoveIssuerBrandingArgs, context: IRequiredContext): Promise<IDeletionResult> {\n debug('Removing issuer branding', args)\n return this.store\n .removeIssuerBranding(args)\n .then(() => ({ result: true }))\n .catch((error: Error) => ({ result: false, error: error.message }))\n }\n\n /** {@inheritDoc IIssuanceBranding.ibAddIssuerLocaleBranding} */\n private async ibAddIssuerLocaleBranding(args: IAddIssuerLocaleBrandingArgs, 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 addIssuerLocaleBrandingArgs: IAddIssuerLocaleBrandingArgs = {\n ...args,\n localeBranding,\n }\n\n debug('Adding issuer locale branding', addIssuerLocaleBrandingArgs)\n return this.store.addIssuerLocaleBranding(addIssuerLocaleBrandingArgs)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibAGetIssuerLocaleBranding} */\n private async ibAGetIssuerLocaleBranding(args?: IGetIssuerLocaleBrandingArgs): Promise<Array<IIssuerLocaleBranding>> {\n debug('Getting issuer locale branding', args)\n return this.store.getIssuerLocaleBranding(args)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibRemoveIssuerLocaleBranding} */\n private async ibRemoveIssuerLocaleBranding(args: IRemoveIssuerLocaleBrandingArgs, context: IRequiredContext): Promise<IDeletionResult> {\n debug('Removing issuer locale branding', args)\n return this.store\n .removeIssuerLocaleBranding(args)\n .then(() => ({ result: true }))\n .catch((error: Error) => ({ result: false, error: error.message }))\n }\n\n /** {@inheritDoc IIssuanceBranding.ibUpdateIssuerLocaleBranding} */\n private async ibUpdateIssuerLocaleBranding(args: IUpdateIssuerLocaleBrandingArgs, context: IRequiredContext): Promise<IIssuerLocaleBranding> {\n const localeBranding: Omit<ILocaleBranding, 'createdAt' | 'lastUpdatedAt'> = (await this.setAdditionalImageAttributes(\n args.localeBranding,\n )) as IIssuerLocaleBranding\n const updateIssuerLocaleBrandingArgs: IUpdateIssuerLocaleBrandingArgs = {\n ...args,\n localeBranding,\n }\n\n debug('Updating issuer locale branding', updateIssuerLocaleBrandingArgs)\n return this.store.updateIssuerLocaleBranding(updateIssuerLocaleBrandingArgs)\n }\n\n /** {@inheritDoc IIssuanceBranding.ibIssuerLocaleBrandingFrom} */\n private async ibIssuerLocaleBrandingFrom(args: IIssuerBrandingFromArgs, context: IRequiredContext): Promise<IBasicIssuerLocaleBranding> {\n debug('get issuer locale branding from', args)\n return this.setAdditionalImageAttributes(args.localeBranding)\n }\n\n // todo: We really should add a cache for urls. We now fetch the same images multiple times in case the logo/background image is the same for multiple locales.\n private async setAdditionalImageAttributes(\n localeBranding: IBasicIssuerLocaleBranding | IBasicCredentialLocaleBranding,\n ): Promise<IBasicIssuerLocaleBranding | IBasicCredentialLocaleBranding> {\n return {\n ...localeBranding,\n ...(localeBranding.logo && {\n logo: {\n ...localeBranding.logo,\n ...(localeBranding.logo.uri\n ? {\n ...(await this.getAdditionalImageAttributes(localeBranding.logo)),\n }\n : EMPTY_IMAGE_ATTRIBUTES),\n },\n }),\n ...(localeBranding.background && {\n background: {\n ...localeBranding.background,\n ...(localeBranding.background.image && {\n image: {\n ...localeBranding.background.image,\n ...(localeBranding.background.image.uri\n ? {\n ...(await this.getAdditionalImageAttributes(localeBranding.background.image)),\n }\n : EMPTY_IMAGE_ATTRIBUTES),\n },\n }),\n },\n }),\n }\n }\n\n private async getAdditionalImageAttributes(image: IBasicImageAttributes): Promise<IAdditionalImageAttributes | IBasicImageAttributes> {\n if (!image.uri) {\n debug(`No image URI present, returning empty attributes`)\n return EMPTY_IMAGE_ATTRIBUTES\n }\n\n const data_uri_regex: RegExp = /^data:image\\/[^;]+;base64,/\n if (data_uri_regex.test(image.uri)) {\n debug('Setting additional image properties for uri', image.uri)\n const base64Content: string = await this.extractBase64FromDataURI(image.uri)\n const dimensions: IImageDimensions = image.dimensions ?? (await getImageDimensions(base64Content))\n const mediaType: string = image.mediaType ?? (await this.getDataTypeFromDataURI(image.uri))\n\n return {\n mediaType,\n dimensions,\n }\n }\n\n debug('Setting additional image properties for url', image.uri)\n const resource: IImageResource | undefined = !image.dataUri ? await downloadImage(image.uri) : undefined\n const dimensions: IImageDimensions =\n image.dimensions ?? (await getImageDimensions(resource?.base64Content ?? (await this.extractBase64FromDataURI(image.dataUri!))))\n const mediaType: string | undefined =\n image.mediaType ??\n resource?.contentType ??\n (resource?.base64Content ? await getImageMediaType(resource?.base64Content!) : await this.getDataTypeFromDataURI(image.uri))\n\n return {\n mediaType,\n dataUri: image.dataUri ?? `data:${mediaType};base64,${resource!.base64Content}`,\n dimensions,\n }\n }\n\n private async extractBase64FromDataURI(uri: string): Promise<string> {\n const data_uri_base64_regex: RegExp = /^data:[^;]+;base64,([\\w+/=-]+)$/i\n const matches: RegExpMatchArray | null = uri.match(data_uri_base64_regex)\n\n if (!matches || matches.length <= 1) {\n return Promise.reject(Error('invalid base64 uri'))\n }\n\n return matches[1]\n }\n\n private async getDataTypeFromDataURI(uri: string): Promise<string> {\n const data_uri_data_type_regex: RegExp = /^data:([^;]+);base64,([\\w+/=-]+)$/i\n const matches: RegExpMatchArray | null = uri.match(data_uri_data_type_regex)\n\n if (!matches || matches.length <= 1) {\n return Promise.reject(Error('invalid base64 uri'))\n }\n\n return matches[1]\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"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA,MACE,mBAAqB;AAAA,QACnB,YAAc;AAAA,UACZ,SAAW;AAAA,YACT,4BAA8B;AAAA,cAC5B,MAAQ;AAAA,cACR,YAAc;AAAA,gBACZ,qBAAuB;AAAA,kBACrB,MAAQ;AAAA,gBACV;AAAA,gBACA,QAAU;AAAA,kBACR,MAAQ;AAAA,gBACV;AAAA,gBACA,gBAAkB;AAAA,kBAChB,MAAQ;AAAA,kBACR,OAAS;AAAA,oBACP,MAAQ;AAAA,kBACV;AAAA,gBACF;AAAA,cACF;AAAA,cACA,UAAY;AAAA,gBACV;AAAA,gBACA;AAAA,gBACA;AAAA,cACF;AAAA,YACF;AAAA,YACA,gCAAkC;AAAA,cAChC,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;","names":["downloadImage","getImageDimensions","getImageMediaType","Debug","debug","Debug","issuanceBrandingMethods","EMPTY_IMAGE_ATTRIBUTES","mediaType","undefined","dataUri","dimensions","IssuanceBranding","schema","IIssuanceBranding","methods","ibAddCredentialBranding","bind","ibGetCredentialBranding","ibUpdateCredentialBranding","ibRemoveCredentialBranding","ibAddCredentialLocaleBranding","ibGetCredentialLocaleBranding","ibRemoveCredentialLocaleBranding","ibUpdateCredentialLocaleBranding","ibCredentialLocaleBrandingFrom","ibAddIssuerBranding","ibGetIssuerBranding","ibUpdateIssuerBranding","ibRemoveIssuerBranding","inRemoveIssuerBranding","ibAddIssuerLocaleBranding","ibGetIssuerLocaleBranding","ibAGetIssuerLocaleBranding","ibRemoveIssuerLocaleBranding","ibUpdateIssuerLocaleBranding","ibIssuerLocaleBrandingFrom","store","constructor","options","args","context","localeBranding","Promise","all","map","setAdditionalImageAttributes","credentialBranding","addCredentialBranding","getCredentialBranding","updateCredentialBranding","removeCredentialBranding","then","result","catch","error","message","addCredentialLocaleBrandingArgs","addCredentialLocaleBranding","getCredentialLocaleBranding","removeCredentialLocaleBranding","updateCredentialLocaleBrandingArgs","updateCredentialLocaleBranding","issuerBranding","addIssuerBranding","getIssuerBranding","updateIssuerBranding","removeIssuerBranding","addIssuerLocaleBrandingArgs","addIssuerLocaleBranding","getIssuerLocaleBranding","removeIssuerLocaleBranding","updateIssuerLocaleBrandingArgs","updateIssuerLocaleBranding","logo","uri","getAdditionalImageAttributes","background","image","data_uri_regex","test","base64Content","extractBase64FromDataURI","getImageDimensions","getDataTypeFromDataURI","resource","downloadImage","contentType","getImageMediaType","data_uri_base64_regex","matches","match","length","reject","Error","data_uri_data_type_regex","schema","require"]}
|
package/package.json
CHANGED
|
@@ -1,33 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.issuance-branding",
|
|
3
|
-
"version": "0.33.1-feature.vcdm2.
|
|
3
|
+
"version": "0.33.1-feature.vcdm2.tsup.18+1fbb8be0",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.cts",
|
|
16
|
+
"require": "./dist/index.cjs"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
7
19
|
"veramo": {
|
|
8
20
|
"pluginInterfaces": {
|
|
9
21
|
"IIssuanceBranding": "./src/types/IIssuanceBranding.ts"
|
|
10
22
|
}
|
|
11
23
|
},
|
|
12
24
|
"scripts": {
|
|
13
|
-
"build": "
|
|
14
|
-
"build:clean": "tsc --build --clean && tsc --build",
|
|
25
|
+
"build": "tsup --config ../../tsup.config.ts --tsconfig ../../tsconfig.tsup.json",
|
|
15
26
|
"generate-plugin-schema": "ts-node ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
|
|
16
27
|
},
|
|
17
28
|
"dependencies": {
|
|
18
|
-
"@sphereon/ssi-sdk.core": "0.33.1-feature.vcdm2.
|
|
19
|
-
"@sphereon/ssi-sdk.data-store": "0.33.1-feature.vcdm2.
|
|
29
|
+
"@sphereon/ssi-sdk.core": "^0.33.1-feature.vcdm2.tsup.18+1fbb8be0",
|
|
30
|
+
"@sphereon/ssi-sdk.data-store": "^0.33.1-feature.vcdm2.tsup.18+1fbb8be0",
|
|
20
31
|
"debug": "^4.3.5",
|
|
21
|
-
"typeorm": "^0.3.
|
|
32
|
+
"typeorm": "^0.3.22"
|
|
22
33
|
},
|
|
23
34
|
"devDependencies": {
|
|
24
|
-
"@sphereon/ssi-sdk.agent-config": "0.33.1-feature.vcdm2.
|
|
35
|
+
"@sphereon/ssi-sdk.agent-config": "^0.33.1-feature.vcdm2.tsup.18+1fbb8be0",
|
|
25
36
|
"@veramo/remote-client": "4.2.0",
|
|
26
37
|
"@veramo/remote-server": "4.2.0"
|
|
27
38
|
},
|
|
28
39
|
"files": [
|
|
29
|
-
"dist
|
|
30
|
-
"src
|
|
40
|
+
"dist",
|
|
41
|
+
"src",
|
|
31
42
|
"README.md",
|
|
32
43
|
"plugin.schema.json",
|
|
33
44
|
"LICENSE"
|
|
@@ -49,6 +60,5 @@
|
|
|
49
60
|
"OID4VCI",
|
|
50
61
|
"SSI"
|
|
51
62
|
],
|
|
52
|
-
"
|
|
53
|
-
"gitHead": "9f634bdb714061141e277508c124b08d626f6036"
|
|
63
|
+
"gitHead": "1fbb8be0256ec8dbc1b52d860b7bfd09d12f0d00"
|
|
54
64
|
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { IAgentPlugin } from '@veramo/core';
|
|
2
|
-
import { AbstractIssuanceBrandingStore } from '@sphereon/ssi-sdk.data-store';
|
|
3
|
-
import { IIssuanceBranding } from '../types/IIssuanceBranding';
|
|
4
|
-
export declare const issuanceBrandingMethods: Array<string>;
|
|
5
|
-
/**
|
|
6
|
-
* {@inheritDoc IIssuanceBranding}
|
|
7
|
-
*/
|
|
8
|
-
export declare class IssuanceBranding implements IAgentPlugin {
|
|
9
|
-
readonly schema: any;
|
|
10
|
-
readonly methods: IIssuanceBranding;
|
|
11
|
-
private readonly store;
|
|
12
|
-
constructor(options: {
|
|
13
|
-
store: AbstractIssuanceBrandingStore;
|
|
14
|
-
});
|
|
15
|
-
/** {@inheritDoc IIssuanceBranding.ibAddCredentialBranding} */
|
|
16
|
-
private ibAddCredentialBranding;
|
|
17
|
-
/** {@inheritDoc IIssuanceBranding.ibGetCredentialBranding} */
|
|
18
|
-
private ibGetCredentialBranding;
|
|
19
|
-
/** {@inheritDoc IIssuanceBranding.ibUpdateCredentialBranding} */
|
|
20
|
-
private ibUpdateCredentialBranding;
|
|
21
|
-
/** {@inheritDoc IIssuanceBranding.ibRemoveCredentialBranding} */
|
|
22
|
-
private ibRemoveCredentialBranding;
|
|
23
|
-
/** {@inheritDoc IIssuanceBranding.ibAddCredentialLocaleBranding} */
|
|
24
|
-
private ibAddCredentialLocaleBranding;
|
|
25
|
-
/** {@inheritDoc IIssuanceBranding.ibGetCredentialLocaleBranding} */
|
|
26
|
-
private ibGetCredentialLocaleBranding;
|
|
27
|
-
/** {@inheritDoc IIssuanceBranding.ibRemoveCredentialLocaleBranding} */
|
|
28
|
-
private ibRemoveCredentialLocaleBranding;
|
|
29
|
-
/** {@inheritDoc IIssuanceBranding.ibUpdateCredentialLocaleBranding} */
|
|
30
|
-
private ibUpdateCredentialLocaleBranding;
|
|
31
|
-
/** {@inheritDoc IIssuanceBranding.ibCredentialLocaleBrandingFrom} */
|
|
32
|
-
private ibCredentialLocaleBrandingFrom;
|
|
33
|
-
/** {@inheritDoc IIssuanceBranding.ibAddIssuerBranding} */
|
|
34
|
-
private ibAddIssuerBranding;
|
|
35
|
-
/** {@inheritDoc IIssuanceBranding.ibGetIssuerBranding} */
|
|
36
|
-
private ibGetIssuerBranding;
|
|
37
|
-
/** {@inheritDoc IIssuanceBranding.ibUpdateIssuerBranding} */
|
|
38
|
-
private ibUpdateIssuerBranding;
|
|
39
|
-
/** {@inheritDoc IIssuanceBranding.inRemoveIssuerBranding} */
|
|
40
|
-
private inRemoveIssuerBranding;
|
|
41
|
-
/** {@inheritDoc IIssuanceBranding.ibAddIssuerLocaleBranding} */
|
|
42
|
-
private ibAddIssuerLocaleBranding;
|
|
43
|
-
/** {@inheritDoc IIssuanceBranding.ibAGetIssuerLocaleBranding} */
|
|
44
|
-
private ibAGetIssuerLocaleBranding;
|
|
45
|
-
/** {@inheritDoc IIssuanceBranding.ibRemoveIssuerLocaleBranding} */
|
|
46
|
-
private ibRemoveIssuerLocaleBranding;
|
|
47
|
-
/** {@inheritDoc IIssuanceBranding.ibUpdateIssuerLocaleBranding} */
|
|
48
|
-
private ibUpdateIssuerLocaleBranding;
|
|
49
|
-
/** {@inheritDoc IIssuanceBranding.ibIssuerLocaleBrandingFrom} */
|
|
50
|
-
private ibIssuerLocaleBrandingFrom;
|
|
51
|
-
private setAdditionalImageAttributes;
|
|
52
|
-
private getAdditionalImageAttributes;
|
|
53
|
-
private extractBase64FromDataURI;
|
|
54
|
-
private getDataTypeFromDataURI;
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=IssuanceBranding.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IssuanceBranding.d.ts","sourceRoot":"","sources":["../../src/agent/IssuanceBranding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,EACL,6BAA6B,EAe9B,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAIL,iBAAiB,EAelB,MAAM,4BAA4B,CAAA;AAKnC,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAmBjD,CAAA;AAQD;;GAEG;AACH,qBAAa,gBAAiB,YAAW,YAAY;IACnD,QAAQ,CAAC,MAAM,MAA2B;IAC1C,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAmBlC;IAED,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA+B;gBAEzC,OAAO,EAAE;QAAE,KAAK,EAAE,6BAA6B,CAAA;KAAE;IAI7D,8DAA8D;YAChD,uBAAuB;IAiBrC,8DAA8D;YAChD,uBAAuB;IAKrC,iEAAiE;YACnD,0BAA0B;IAKxC,iEAAiE;YACnD,0BAA0B;IAQxC,oEAAoE;YACtD,6BAA6B;IAgB3C,oEAAoE;YACtD,6BAA6B;IAK3C,uEAAuE;YACzD,gCAAgC;IAQ9C,uEAAuE;YACzD,gCAAgC;IAgB9C,qEAAqE;YACvD,8BAA8B;IAQ5C,0DAA0D;YAC5C,mBAAmB;IAejC,0DAA0D;YAC5C,mBAAmB;IAKjC,6DAA6D;YAC/C,sBAAsB;IAKpC,6DAA6D;YAC/C,sBAAsB;IAQpC,gEAAgE;YAClD,yBAAyB;IAevC,iEAAiE;YACnD,0BAA0B;IAKxC,mEAAmE;YACrD,4BAA4B;IAQ1C,mEAAmE;YACrD,4BAA4B;IAa1C,iEAAiE;YACnD,0BAA0B;YAM1B,4BAA4B;YAiC5B,4BAA4B;YAmC5B,wBAAwB;YAWxB,sBAAsB;CAUrC"}
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { downloadImage, getImageDimensions, getImageMediaType } from '@sphereon/ssi-sdk.core';
|
|
2
|
-
import { schema } from '../index';
|
|
3
|
-
import Debug from 'debug';
|
|
4
|
-
const debug = Debug('sphereon:ssi-sdk:issuance-branding');
|
|
5
|
-
export const issuanceBrandingMethods = [
|
|
6
|
-
'ibAddCredentialBranding',
|
|
7
|
-
'ibGetCredentialBranding',
|
|
8
|
-
'ibUpdateCredentialBranding',
|
|
9
|
-
'ibRemoveCredentialBranding',
|
|
10
|
-
'ibAddCredentialLocaleBranding',
|
|
11
|
-
'ibGetCredentialLocaleBranding',
|
|
12
|
-
'ibRemoveCredentialLocaleBranding',
|
|
13
|
-
'ibUpdateCredentialLocaleBranding',
|
|
14
|
-
'ibCredentialLocaleBrandingFrom',
|
|
15
|
-
'ibAddIssuerBranding',
|
|
16
|
-
'ibGetIssuerBranding',
|
|
17
|
-
'ibUpdateIssuerBranding',
|
|
18
|
-
'ibRemoveIssuerBranding',
|
|
19
|
-
'ibAddIssuerLocaleBranding',
|
|
20
|
-
'ibGetIssuerLocaleBranding',
|
|
21
|
-
'ibRemoveIssuerLocaleBranding',
|
|
22
|
-
'ibUpdateIssuerLocaleBranding',
|
|
23
|
-
'ibIssuerLocaleBrandingFrom',
|
|
24
|
-
];
|
|
25
|
-
const EMPTY_IMAGE_ATTRIBUTES = {
|
|
26
|
-
mediaType: undefined,
|
|
27
|
-
dataUri: undefined,
|
|
28
|
-
dimensions: undefined,
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* {@inheritDoc IIssuanceBranding}
|
|
32
|
-
*/
|
|
33
|
-
export class IssuanceBranding {
|
|
34
|
-
schema = schema.IIssuanceBranding;
|
|
35
|
-
methods = {
|
|
36
|
-
ibAddCredentialBranding: this.ibAddCredentialBranding.bind(this),
|
|
37
|
-
ibGetCredentialBranding: this.ibGetCredentialBranding.bind(this),
|
|
38
|
-
ibUpdateCredentialBranding: this.ibUpdateCredentialBranding.bind(this),
|
|
39
|
-
ibRemoveCredentialBranding: this.ibRemoveCredentialBranding.bind(this),
|
|
40
|
-
ibAddCredentialLocaleBranding: this.ibAddCredentialLocaleBranding.bind(this),
|
|
41
|
-
ibGetCredentialLocaleBranding: this.ibGetCredentialLocaleBranding.bind(this),
|
|
42
|
-
ibRemoveCredentialLocaleBranding: this.ibRemoveCredentialLocaleBranding.bind(this),
|
|
43
|
-
ibUpdateCredentialLocaleBranding: this.ibUpdateCredentialLocaleBranding.bind(this),
|
|
44
|
-
ibCredentialLocaleBrandingFrom: this.ibCredentialLocaleBrandingFrom.bind(this),
|
|
45
|
-
ibAddIssuerBranding: this.ibAddIssuerBranding.bind(this),
|
|
46
|
-
ibGetIssuerBranding: this.ibGetIssuerBranding.bind(this),
|
|
47
|
-
ibUpdateIssuerBranding: this.ibUpdateIssuerBranding.bind(this),
|
|
48
|
-
ibRemoveIssuerBranding: this.inRemoveIssuerBranding.bind(this),
|
|
49
|
-
ibAddIssuerLocaleBranding: this.ibAddIssuerLocaleBranding.bind(this),
|
|
50
|
-
ibGetIssuerLocaleBranding: this.ibAGetIssuerLocaleBranding.bind(this),
|
|
51
|
-
ibRemoveIssuerLocaleBranding: this.ibRemoveIssuerLocaleBranding.bind(this),
|
|
52
|
-
ibUpdateIssuerLocaleBranding: this.ibUpdateIssuerLocaleBranding.bind(this),
|
|
53
|
-
ibIssuerLocaleBrandingFrom: this.ibIssuerLocaleBrandingFrom.bind(this),
|
|
54
|
-
};
|
|
55
|
-
store;
|
|
56
|
-
constructor(options) {
|
|
57
|
-
this.store = options.store;
|
|
58
|
-
}
|
|
59
|
-
/** {@inheritDoc IIssuanceBranding.ibAddCredentialBranding} */
|
|
60
|
-
async ibAddCredentialBranding(args, context) {
|
|
61
|
-
const localeBranding = await Promise.all(args.localeBranding.map((localeBranding) => this.setAdditionalImageAttributes(localeBranding)));
|
|
62
|
-
const credentialBranding = {
|
|
63
|
-
...args,
|
|
64
|
-
localeBranding,
|
|
65
|
-
};
|
|
66
|
-
debug('Adding credential branding', credentialBranding);
|
|
67
|
-
return this.store.addCredentialBranding(credentialBranding);
|
|
68
|
-
}
|
|
69
|
-
/** {@inheritDoc IIssuanceBranding.ibGetCredentialBranding} */
|
|
70
|
-
async ibGetCredentialBranding(args) {
|
|
71
|
-
debug('Getting credential branding', args);
|
|
72
|
-
return this.store.getCredentialBranding(args);
|
|
73
|
-
}
|
|
74
|
-
/** {@inheritDoc IIssuanceBranding.ibUpdateCredentialBranding} */
|
|
75
|
-
async ibUpdateCredentialBranding(args, context) {
|
|
76
|
-
debug('Updating credential branding', args);
|
|
77
|
-
return this.store.updateCredentialBranding(args);
|
|
78
|
-
}
|
|
79
|
-
/** {@inheritDoc IIssuanceBranding.ibRemoveCredentialBranding} */
|
|
80
|
-
async ibRemoveCredentialBranding(args, context) {
|
|
81
|
-
debug('Removing credential branding', args);
|
|
82
|
-
return this.store
|
|
83
|
-
.removeCredentialBranding(args)
|
|
84
|
-
.then(() => ({ result: true }))
|
|
85
|
-
.catch((error) => ({ result: false, error: error.message }));
|
|
86
|
-
}
|
|
87
|
-
/** {@inheritDoc IIssuanceBranding.ibAddCredentialLocaleBranding} */
|
|
88
|
-
async ibAddCredentialLocaleBranding(args, context) {
|
|
89
|
-
const localeBranding = await Promise.all(args.localeBranding.map((localeBranding) => this.setAdditionalImageAttributes(localeBranding)));
|
|
90
|
-
const addCredentialLocaleBrandingArgs = {
|
|
91
|
-
...args,
|
|
92
|
-
localeBranding,
|
|
93
|
-
};
|
|
94
|
-
debug('Adding credential locale branding', addCredentialLocaleBrandingArgs);
|
|
95
|
-
return this.store.addCredentialLocaleBranding(addCredentialLocaleBrandingArgs);
|
|
96
|
-
}
|
|
97
|
-
/** {@inheritDoc IIssuanceBranding.ibGetCredentialLocaleBranding} */
|
|
98
|
-
async ibGetCredentialLocaleBranding(args) {
|
|
99
|
-
debug('Getting credential locale branding', args);
|
|
100
|
-
return this.store.getCredentialLocaleBranding(args);
|
|
101
|
-
}
|
|
102
|
-
/** {@inheritDoc IIssuanceBranding.ibRemoveCredentialLocaleBranding} */
|
|
103
|
-
async ibRemoveCredentialLocaleBranding(args, context) {
|
|
104
|
-
debug('Removing credential locale branding', args);
|
|
105
|
-
return this.store
|
|
106
|
-
.removeCredentialLocaleBranding(args)
|
|
107
|
-
.then(() => ({ result: true }))
|
|
108
|
-
.catch((error) => ({ result: false, error: error.message }));
|
|
109
|
-
}
|
|
110
|
-
/** {@inheritDoc IIssuanceBranding.ibUpdateCredentialLocaleBranding} */
|
|
111
|
-
async ibUpdateCredentialLocaleBranding(args, context) {
|
|
112
|
-
const localeBranding = (await this.setAdditionalImageAttributes(args.localeBranding));
|
|
113
|
-
const updateCredentialLocaleBrandingArgs = {
|
|
114
|
-
...args,
|
|
115
|
-
localeBranding,
|
|
116
|
-
};
|
|
117
|
-
debug('Updating credential locale branding', updateCredentialLocaleBrandingArgs);
|
|
118
|
-
return this.store.updateCredentialLocaleBranding(updateCredentialLocaleBrandingArgs);
|
|
119
|
-
}
|
|
120
|
-
/** {@inheritDoc IIssuanceBranding.ibCredentialLocaleBrandingFrom} */
|
|
121
|
-
async ibCredentialLocaleBrandingFrom(args, context) {
|
|
122
|
-
debug('get credential locale branding from', args);
|
|
123
|
-
return this.setAdditionalImageAttributes(args.localeBranding);
|
|
124
|
-
}
|
|
125
|
-
/** {@inheritDoc IIssuanceBranding.ibAddIssuerBranding} */
|
|
126
|
-
async ibAddIssuerBranding(args, context) {
|
|
127
|
-
const localeBranding = await Promise.all(args.localeBranding.map((localeBranding) => this.setAdditionalImageAttributes(localeBranding)));
|
|
128
|
-
const issuerBranding = {
|
|
129
|
-
...args,
|
|
130
|
-
localeBranding,
|
|
131
|
-
};
|
|
132
|
-
debug('Adding issuer branding', issuerBranding);
|
|
133
|
-
return this.store.addIssuerBranding(issuerBranding);
|
|
134
|
-
}
|
|
135
|
-
/** {@inheritDoc IIssuanceBranding.ibGetIssuerBranding} */
|
|
136
|
-
async ibGetIssuerBranding(args) {
|
|
137
|
-
debug('Getting issuer branding', args);
|
|
138
|
-
return this.store.getIssuerBranding(args);
|
|
139
|
-
}
|
|
140
|
-
/** {@inheritDoc IIssuanceBranding.ibUpdateIssuerBranding} */
|
|
141
|
-
async ibUpdateIssuerBranding(args, context) {
|
|
142
|
-
debug('Updating issuer branding', args);
|
|
143
|
-
return this.store.updateIssuerBranding(args);
|
|
144
|
-
}
|
|
145
|
-
/** {@inheritDoc IIssuanceBranding.inRemoveIssuerBranding} */
|
|
146
|
-
async inRemoveIssuerBranding(args, context) {
|
|
147
|
-
debug('Removing issuer branding', args);
|
|
148
|
-
return this.store
|
|
149
|
-
.removeIssuerBranding(args)
|
|
150
|
-
.then(() => ({ result: true }))
|
|
151
|
-
.catch((error) => ({ result: false, error: error.message }));
|
|
152
|
-
}
|
|
153
|
-
/** {@inheritDoc IIssuanceBranding.ibAddIssuerLocaleBranding} */
|
|
154
|
-
async ibAddIssuerLocaleBranding(args, context) {
|
|
155
|
-
const localeBranding = await Promise.all(args.localeBranding.map((localeBranding) => this.setAdditionalImageAttributes(localeBranding)));
|
|
156
|
-
const addIssuerLocaleBrandingArgs = {
|
|
157
|
-
...args,
|
|
158
|
-
localeBranding,
|
|
159
|
-
};
|
|
160
|
-
debug('Adding issuer locale branding', addIssuerLocaleBrandingArgs);
|
|
161
|
-
return this.store.addIssuerLocaleBranding(addIssuerLocaleBrandingArgs);
|
|
162
|
-
}
|
|
163
|
-
/** {@inheritDoc IIssuanceBranding.ibAGetIssuerLocaleBranding} */
|
|
164
|
-
async ibAGetIssuerLocaleBranding(args) {
|
|
165
|
-
debug('Getting issuer locale branding', args);
|
|
166
|
-
return this.store.getIssuerLocaleBranding(args);
|
|
167
|
-
}
|
|
168
|
-
/** {@inheritDoc IIssuanceBranding.ibRemoveIssuerLocaleBranding} */
|
|
169
|
-
async ibRemoveIssuerLocaleBranding(args, context) {
|
|
170
|
-
debug('Removing issuer locale branding', args);
|
|
171
|
-
return this.store
|
|
172
|
-
.removeIssuerLocaleBranding(args)
|
|
173
|
-
.then(() => ({ result: true }))
|
|
174
|
-
.catch((error) => ({ result: false, error: error.message }));
|
|
175
|
-
}
|
|
176
|
-
/** {@inheritDoc IIssuanceBranding.ibUpdateIssuerLocaleBranding} */
|
|
177
|
-
async ibUpdateIssuerLocaleBranding(args, context) {
|
|
178
|
-
const localeBranding = (await this.setAdditionalImageAttributes(args.localeBranding));
|
|
179
|
-
const updateIssuerLocaleBrandingArgs = {
|
|
180
|
-
...args,
|
|
181
|
-
localeBranding,
|
|
182
|
-
};
|
|
183
|
-
debug('Updating issuer locale branding', updateIssuerLocaleBrandingArgs);
|
|
184
|
-
return this.store.updateIssuerLocaleBranding(updateIssuerLocaleBrandingArgs);
|
|
185
|
-
}
|
|
186
|
-
/** {@inheritDoc IIssuanceBranding.ibIssuerLocaleBrandingFrom} */
|
|
187
|
-
async ibIssuerLocaleBrandingFrom(args, context) {
|
|
188
|
-
debug('get issuer locale branding from', args);
|
|
189
|
-
return this.setAdditionalImageAttributes(args.localeBranding);
|
|
190
|
-
}
|
|
191
|
-
// todo: We really should add a cache for urls. We now fetch the same images multiple times in case the logo/background image is the same for multiple locales.
|
|
192
|
-
async setAdditionalImageAttributes(localeBranding) {
|
|
193
|
-
return {
|
|
194
|
-
...localeBranding,
|
|
195
|
-
...(localeBranding.logo && {
|
|
196
|
-
logo: {
|
|
197
|
-
...localeBranding.logo,
|
|
198
|
-
...(localeBranding.logo.uri
|
|
199
|
-
? {
|
|
200
|
-
...(await this.getAdditionalImageAttributes(localeBranding.logo)),
|
|
201
|
-
}
|
|
202
|
-
: EMPTY_IMAGE_ATTRIBUTES),
|
|
203
|
-
},
|
|
204
|
-
}),
|
|
205
|
-
...(localeBranding.background && {
|
|
206
|
-
background: {
|
|
207
|
-
...localeBranding.background,
|
|
208
|
-
...(localeBranding.background.image && {
|
|
209
|
-
image: {
|
|
210
|
-
...localeBranding.background.image,
|
|
211
|
-
...(localeBranding.background.image.uri
|
|
212
|
-
? {
|
|
213
|
-
...(await this.getAdditionalImageAttributes(localeBranding.background.image)),
|
|
214
|
-
}
|
|
215
|
-
: EMPTY_IMAGE_ATTRIBUTES),
|
|
216
|
-
},
|
|
217
|
-
}),
|
|
218
|
-
},
|
|
219
|
-
}),
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
async getAdditionalImageAttributes(image) {
|
|
223
|
-
if (!image.uri) {
|
|
224
|
-
debug(`No image URI present, returning empty attributes`);
|
|
225
|
-
return EMPTY_IMAGE_ATTRIBUTES;
|
|
226
|
-
}
|
|
227
|
-
const data_uri_regex = /^data:image\/[^;]+;base64,/;
|
|
228
|
-
if (data_uri_regex.test(image.uri)) {
|
|
229
|
-
debug('Setting additional image properties for uri', image.uri);
|
|
230
|
-
const base64Content = await this.extractBase64FromDataURI(image.uri);
|
|
231
|
-
const dimensions = image.dimensions ?? (await getImageDimensions(base64Content));
|
|
232
|
-
const mediaType = image.mediaType ?? (await this.getDataTypeFromDataURI(image.uri));
|
|
233
|
-
return {
|
|
234
|
-
mediaType,
|
|
235
|
-
dimensions,
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
debug('Setting additional image properties for url', image.uri);
|
|
239
|
-
const resource = !image.dataUri ? await downloadImage(image.uri) : undefined;
|
|
240
|
-
const dimensions = image.dimensions ?? (await getImageDimensions(resource?.base64Content ?? (await this.extractBase64FromDataURI(image.dataUri))));
|
|
241
|
-
const mediaType = image.mediaType ??
|
|
242
|
-
resource?.contentType ??
|
|
243
|
-
(resource?.base64Content ? await getImageMediaType(resource?.base64Content) : await this.getDataTypeFromDataURI(image.uri));
|
|
244
|
-
return {
|
|
245
|
-
mediaType,
|
|
246
|
-
dataUri: image.dataUri ?? `data:${mediaType};base64,${resource.base64Content}`,
|
|
247
|
-
dimensions,
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
async extractBase64FromDataURI(uri) {
|
|
251
|
-
const data_uri_base64_regex = /^data:[^;]+;base64,([\w+/=-]+)$/i;
|
|
252
|
-
const matches = uri.match(data_uri_base64_regex);
|
|
253
|
-
if (!matches || matches.length <= 1) {
|
|
254
|
-
return Promise.reject(Error('invalid base64 uri'));
|
|
255
|
-
}
|
|
256
|
-
return matches[1];
|
|
257
|
-
}
|
|
258
|
-
async getDataTypeFromDataURI(uri) {
|
|
259
|
-
const data_uri_data_type_regex = /^data:([^;]+);base64,([\w+/=-]+)$/i;
|
|
260
|
-
const matches = uri.match(data_uri_data_type_regex);
|
|
261
|
-
if (!matches || matches.length <= 1) {
|
|
262
|
-
return Promise.reject(Error('invalid base64 uri'));
|
|
263
|
-
}
|
|
264
|
-
return matches[1];
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
//# sourceMappingURL=IssuanceBranding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IssuanceBranding.js","sourceRoot":"","sources":["../../src/agent/IssuanceBranding.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAoC,MAAM,wBAAwB,CAAA;AAkB/H,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAqBjC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,KAAK,GAAmB,KAAK,CAAC,oCAAoC,CAAC,CAAA;AAEzE,MAAM,CAAC,MAAM,uBAAuB,GAAkB;IACpD,yBAAyB;IACzB,yBAAyB;IACzB,4BAA4B;IAC5B,4BAA4B;IAC5B,+BAA+B;IAC/B,+BAA+B;IAC/B,kCAAkC;IAClC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