@nmshd/runtime 2.8.1 → 2.8.3
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/buildInformation.js +5 -5
- package/dist/dataViews/DataViewExpander.js +5 -3
- package/dist/dataViews/DataViewExpander.js.map +1 -1
- package/dist/useCases/common/Schemas.js +27 -27
- package/dist/useCases/common/Schemas.js.map +1 -1
- package/lib-web/nmshd.runtime.js +37 -35
- package/lib-web/nmshd.runtime.js.map +1 -1
- package/lib-web/nmshd.runtime.min.js +1 -1
- package/lib-web/nmshd.runtime.min.js.map +1 -1
- package/package.json +12 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! For license information please see nmshd.runtime.min.js.LICENSE.txt */
|
|
2
|
-
var NMSHDRuntime;(()=>{var e={594:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UPGRADE_LOGIC=t.DatabaseSchemaUpgrader=void 0;const a=r(194),c=r(3850),u=r(9663),p=o(r(6486));let l=i=class RuntimeDatabaseSchemaMetadata extends a.Serializable{static preFrom(e){return e.id||(e.id=i.DATABASE_SCHEMA_ID),e}static from(e){return this.fromAny(e)}};l.DATABASE_SCHEMA_ID="databaseSchema",n([(0,a.serialize)(),(0,a.validate)({customValidator:e=>e===l.DATABASE_SCHEMA_ID?void 0:"Invalid database schema id"}),s("design:type",String)],l.prototype,"id",void 0),n([(0,a.serialize)(),(0,a.validate)({min:0}),s("design:type",Number)],l.prototype,"version",void 0),l=i=n([(0,a.type)("RuntimeDatabaseSchemaMetadata")],l);function extractPayloadFromObject(e,t){const r=e.toJSON();return p.default.pickBy(r,((e,r)=>void 0!==e&&t.includes(r)))}t.DatabaseSchemaUpgrader=class DatabaseSchemaUpgrader{constructor(e,t,r){this.accountController=e,this.consumptionController=t,this.loggerFactory=r,this.CURRENT_DATABASE_SCHEMA_VERSION=2,this.DATABASE_SCHEMA_QUERY={id:l.DATABASE_SCHEMA_ID}}async upgradeSchemaVersion(){let e=await this.getVersionFromDB();for(;e<this.CURRENT_DATABASE_SCHEMA_VERSION;){e++;const r=t.UPGRADE_LOGIC[e];if(!r)throw new Error(`No upgrade logic found for version '${e}'`);await r(this.accountController,this.consumptionController,this.loggerFactory.getLogger(`DatabaseSchemaUpgrader.v${e}`)),await this.writeVersionToDB(e)}}async getVersionFromDB(){const e=await this.accountController.db.getCollection("meta"),t=await e.findOne(this.DATABASE_SCHEMA_QUERY);if(!t)return 0;return l.from(t).version}async writeVersionToDB(e){const t=await this.accountController.db.getCollection("meta"),r=l.from({version:e}),i=await t.findOne(this.DATABASE_SCHEMA_QUERY);i?await t.update(i,r):await t.create(r)}},t.UPGRADE_LOGIC=Object.freeze({1:(e,t,r)=>{r.info(`Upgrading database schema to version 1 for account '${e.identity.address.toString()}'`)},2:async(e,t,r)=>{if(r.info(`Upgrading database schema to version 2 for account '${e.identity.address.toString()}'`),!e.config.datawalletEnabled)return;const i=e.unpushedDatawalletModifications,n=e.config.supportedDatawalletVersion,s=await e.getSynchronizedCollection("Requests"),o=await s.find({});for(const e of o){let t;r.info(`Processing Request '${e.id}'`);try{t=c.LocalRequest.from(e)}catch(t){r.error(`Failed to parse Request '${e.id}'`,t);continue}const s=t.id;await i.create(u.DatawalletModification.from({localId:await u.TransportIds.datawalletModification.generate(),type:u.DatawalletModificationType.Create,collection:"Requests",objectIdentifier:s,payloadCategory:u.DatawalletModificationCategory.TechnicalData,payload:extractPayloadFromObject(t,t.technicalProperties),datawalletVersion:n})),await i.create(u.DatawalletModification.from({localId:await u.TransportIds.datawalletModification.generate(),type:u.DatawalletModificationType.Create,collection:"Requests",objectIdentifier:s,payloadCategory:u.DatawalletModificationCategory.Userdata,payload:extractPayloadFromObject(t,t.userdataProperties),datawalletVersion:n})),r.info(`Successfully created datawallet modifications for Request '${e.id}'.`)}const a=await e.getSynchronizedCollection("Attributes"),p=await a.find({});for(const e of p){let t;r.info(`Processing Attribute '${e.id}'`);try{t=c.LocalAttribute.from(e)}catch(t){r.error(`Failed to parse Attribute '${e.id}'`,t);continue}const s=extractPayloadFromObject(t,t.technicalProperties);"succeededBy"in s||"shareInfo"in s||"parentId"in s?(await i.create(u.DatawalletModification.from({localId:await u.TransportIds.datawalletModification.generate(),type:u.DatawalletModificationType.Update,collection:"Attributes",objectIdentifier:t.id,payloadCategory:u.DatawalletModificationCategory.TechnicalData,payload:s,datawalletVersion:n})),r.info(`Successfully created a datawallet modification for Attribute '${e.id}'.`)):r.info(`Attribute '${e.id}' does not contain any new technical properties. Skipping.`)}await e.syncDatawallet()}})},6984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Runtime=void 0;const i=r(5172),n=r(3850),s=r(9663),o=r(7071),a=r(2500),c=r(594),u=r(4086),p=r(2205),l=r(1496),d=r(5200),f=r(9662),y=r(986),h=r(485),g=r(2746);t.Runtime=class Runtime{get logger(){return this._logger}get anonymousServices(){return this._anonymousServices}isLoggedIn(){return!!this._accountController}getAccountController(){if(!this._accountController)throw h.RuntimeErrors.startup.noActiveAccount();return this._accountController}getConsumptionController(){if(!this._consumptionController)throw h.RuntimeErrors.startup.noActiveConsumptionController();return this._consumptionController}async login(e,t){this._accountController=e,this._consumptionController=t;const r=o.Container.get(d.TransportServices),i=o.Container.get(d.ConsumptionServices),n=o.Container.get(u.DataViewExpander);return await new c.DatabaseSchemaUpgrader(e,t,this.loggerFactory).upgradeSchemaVersion(),{transportServices:r,consumptionServices:i,dataViewExpander:n}}get modules(){return this._modules}get eventBus(){return this._eventBus}constructor(e,t,r){this.runtimeConfig=e,this.loggerFactory=t,this._isInitialized=!1,this._isStarted=!1,this._logger=this.loggerFactory.getLogger(this.constructor.name),this._eventBus=r??new i.EventEmitter2EventBus(((e,t)=>{this.logger.error(`An error was thrown in an event handler of the runtime event bus (namespace: '${t}'). Root error: ${e}`)}))}get isInitialized(){return this._isInitialized}async init(){if(this._isInitialized)throw h.RuntimeErrors.general.alreadyInitialized();this.eventBus.publish(new p.RuntimeInitializingEvent),await this.initDIContainer(),await this.initTransportLibrary(),await this.initAccount(),this._modules=new d.RuntimeModuleRegistry,await this.loadModules(),await this.initInfrastructure(),await this.initModules(),this._eventProxy=new l.EventProxy(this._eventBus,this.transport.eventBus).start(),this._isInitialized=!0,this.eventBus.publish(new p.RuntimeInitializedEvent)}initInfrastructure(){}async getSupportInformation(){return{health:await this.getHealth(),configuration:JSON.parse(JSON.stringify(this.runtimeConfig))}}async initTransportLibrary(){this.logger.debug("Initializing Database connection... ");const e=await this.createDatabaseConnection(),t=this.createTransportConfigWithAdditionalHeaders({...this.runtimeConfig.transportLibrary,supportedIdentityVersion:1}),r=new i.EventEmitter2EventBus(((e,t)=>{this.logger.error(`An error was thrown in an event handler of the transport event bus (namespace: '${t}'). Root error: ${e}`)}));this.transport=new s.Transport(e,t,r,this.loggerFactory),this.logger.debug("Initializing Transport Library..."),await this.transport.init(),this.logger.debug("Finished initialization of Transport Library."),this._anonymousServices=o.Container.get(d.AnonymousServices)}createTransportConfigWithAdditionalHeaders(e){const t=e.platformAdditionalHeaders??{};return t["X-RUNTIME-VERSION"]=a.buildInformation.version,{...e,platformAdditionalHeaders:t}}async initDIContainer(){o.Container.bind(i.EventBus).factory((()=>this.eventBus)).scope(o.Scope.Singleton),o.Container.bind(y.RuntimeLoggerFactory).factory((()=>this.loggerFactory)).scope(o.Scope.Singleton),o.Container.bind(s.AccountController).factory((()=>this.getAccountController())).scope(o.Scope.Request),o.Container.bind(s.DevicesController).factory((()=>this.getAccountController().devices)).scope(o.Scope.Request),o.Container.bind(s.DeviceController).factory((()=>this.getAccountController().activeDevice)).scope(o.Scope.Request),o.Container.bind(s.FileController).factory((()=>this.getAccountController().files)).scope(o.Scope.Request),o.Container.bind(s.IdentityController).factory((()=>this.getAccountController().identity)).scope(o.Scope.Request),o.Container.bind(s.MessageController).factory((()=>this.getAccountController().messages)).scope(o.Scope.Request),o.Container.bind(s.RelationshipTemplateController).factory((()=>this.getAccountController().relationshipTemplates)).scope(o.Scope.Request),o.Container.bind(s.RelationshipsController).factory((()=>this.getAccountController().relationships)).scope(o.Scope.Request),o.Container.bind(s.TokenController).factory((()=>this.getAccountController().tokens)).scope(o.Scope.Request),o.Container.bind(s.ChallengeController).factory((()=>this.getAccountController().challenges)).scope(o.Scope.Request),o.Container.bind(n.ConsumptionController).factory((()=>this.getConsumptionController())).scope(o.Scope.Request),o.Container.bind(n.AttributesController).factory((()=>this.getConsumptionController().attributes)).scope(o.Scope.Request),o.Container.bind(n.AttributeListenersController).factory((()=>this.getConsumptionController().attributeListeners)).scope(o.Scope.Request),o.Container.bind(n.DraftsController).factory((()=>this.getConsumptionController().drafts)).scope(o.Scope.Request),o.Container.bind(n.IncomingRequestsController).factory((()=>this.getConsumptionController().incomingRequests)).scope(o.Scope.Request),o.Container.bind(n.OutgoingRequestsController).factory((()=>this.getConsumptionController().outgoingRequests)).scope(o.Scope.Request),o.Container.bind(n.SettingsController).factory((()=>this.getConsumptionController().settings)).scope(o.Scope.Request),o.Container.bind(s.AnonymousTokenController).factory((()=>new s.AnonymousTokenController(this.transport.config))).scope(o.Scope.Singleton);const e=new g.SchemaRepository;await e.loadSchemas(),o.Container.bind(g.SchemaRepository).factory((()=>e)).scope(o.Scope.Singleton)}async loadModules(){this.logger.info("Loading modules...");for(const e in this.runtimeConfig.modules){const t=this.runtimeConfig.modules[e];t.enabled?t.location?t.location.startsWith("@nmshd/runtime:")?this.loadBuiltinModule(t):await this.loadModule(t):this.logger.error(`Skip loading module '${this.getModuleName(t)}' because has no location.`):this.logger.debug(`Skip loading module '${this.getModuleName(t)}' because it is not enabled.`)}this.eventBus.publish(new p.ModulesLoadedEvent)}loadBuiltinModule(e){switch(e.location.split(":")[1]){case"DeciderModule":const t=new f.DeciderModule(this,e,this.loggerFactory.getLogger(f.DeciderModule));this.modules.add(t);break;case"RequestModule":const r=new f.RequestModule(this,e,this.loggerFactory.getLogger(f.RequestModule));this.modules.add(r);break;case"MessageModule":const i=new f.MessageModule(this,e,this.loggerFactory.getLogger(f.MessageModule));this.modules.add(i);break;case"AttributeListenerModule":const n=new f.AttributeListenerModule(this,e,this.loggerFactory.getLogger(f.AttributeListenerModule));this.modules.add(n);break;default:throw new Error(`Module ${e.name} is not a builtin module.`)}}async initModules(){this.logger.info("Initializing modules...");for(const e of this.modules.toArray())try{await e.init(),this.logger.info(`Module '${this.getModuleName(e)}' was initialized successfully.`)}catch(t){throw this.logger.error(`Module '${this.getModuleName(e)}' could not be initialized.`,t),t}this.eventBus.publish(new p.ModulesInitializedEvent)}get isStarted(){return this._isStarted}async start(){if(!this._isInitialized)throw h.RuntimeErrors.general.notInitialized();if(this._isStarted)throw h.RuntimeErrors.general.alreadyStarted();await this.startInfrastructure(),await this.startModules(),this._isStarted=!0}startInfrastructure(){}async stop(){if(!this._isInitialized)throw h.RuntimeErrors.general.notInitialized();if(!this._isStarted)throw h.RuntimeErrors.general.notStarted();await this.stopModules(),await this.stopInfrastructure(),await this.transport.eventBus.close(),this._eventProxy.stop(),await this._eventBus.close(),this.logger.info("Closing AccountController..."),await(this._accountController?.close()),this._accountController=void 0,this.logger.info("AccountController was closed successfully."),this._isInitialized=!1,this._isStarted=!1}stopInfrastructure(){}async stopModules(){this.logger.info("Stopping modules...");for(const e of this.modules.toArray())try{await e.stop(),this.logger.info(`Module '${this.getModuleName(e)}' was stopped successfully.`)}catch(t){this.logger.error(`An Error occured while stopping module '${this.getModuleName(e)}': `,t)}this.logger.info("Stopped all modules.")}async startModules(){this.logger.info("Starting modules...");for(const e of this.modules.toArray())try{await e.start(),this.logger.info(`Module '${this.getModuleName(e)}' was started successfully.`)}catch(t){throw this.logger.error(`Module '${this.getModuleName(e)}' could not be started.`,t),t}this.eventBus.publish(new p.ModulesStartedEvent),this.logger.info("Started all modules.")}getModuleName(e){return e.displayName||e.name||JSON.stringify(e)}}},9757:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},986:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeLoggerFactory=void 0;t.RuntimeLoggerFactory=class RuntimeLoggerFactory{}},2500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildInformation=void 0;const i=r(194),n=r(3850),s=r(5030),o=r(2890),a=r(9663);t.buildInformation={version:"2.8.1",build:"170",date:"2023-10-10T07:26:54+00:00",commit:"956ad26cac04d04257c5d00fbbec375b575b21a0",dependencies:{"@js-soft/docdb-querytranslator":"1.1.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"2.0.9","@js-soft/ts-utils":"^2.3.1","@nmshd/consumption":"3.3.2","@nmshd/content":"2.7.3","@nmshd/crypto":"2.0.4","@nmshd/transport":"2.1.2",ajv:"^8.12.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","json-stringify-safe":"^5.0.1",lodash:"^4.17.21",luxon:"^3.4.3",qrcode:"1.5.3","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},libraries:{serval:i.buildInformation,consumption:n.buildInformation,content:s.buildInformation,crypto:o.buildInformation,transport:a.buildInformation}}},4869:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DataViewExpander=void 0;const o=r(194),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(5200),d=r(4629),f=r(485),y=r(2043),h=r(4700),g=r(2466);let m=class DataViewExpander{constructor(e,t,r,i){this.transport=e,this.consumption=t,this.consumptionController=r,this.identityController=i}async expand(e,t){let r=t;if(e["@type"]&&(r=e["@type"]),Array.isArray(e)){if(!(e.length>0))return[];r=e[0]["@type"]}if(!r)throw f.RuntimeErrors.general.invalidPayload("No type found.");switch(r){case"Message":return Array.isArray(e)?await this.expandMessageDTOs(e):await this.expandMessageDTO(e);case"Attribute":return Array.isArray(e)?await this.expandAttributes(e):await this.expandAttribute(e);case"Address":return Array.isArray(e)?await this.expandAddresses(e):await this.expandAddress(e);case"FileId":return Array.isArray(e)?await this.expandFileIds(e):await this.expandFileId(e);case"File":return Array.isArray(e)?await this.expandFileDTOs(e):await this.expandFileDTO(e);case"Recipient":return Array.isArray(e)?await this.expandRecipientDTOs(e):await this.expandAddress(e);case"Relationship":return Array.isArray(e)?await this.expandRelationshipDTOs(e):await this.expandRelationshipDTO(e);case"LocalAttribute":return Array.isArray(e)?await this.expandLocalAttributeDTOs(e):await this.expandLocalAttributeDTO(e);default:throw f.RuntimeErrors.general.notSupported(`No expander is defined for the @type '${r}'.`)}}async expandMessageDTO(e){const t=await this.expandRecipientDTOs(e.recipients),r={};t.forEach((e=>r[e.id]=e));const i=await this.expandAddress(e.createdBy),n=[],s=[];for(const t of e.attachments)"string"==typeof t?(s.push(this.expandFileId(t)),n.push(t)):(s.push(this.expandFileDTO(t)),n.push(t.id));const o=await Promise.all(s),a=e.isOwn;let c,u=h.MessageStatus.Received;if(a){u=e.recipients.every((e=>!!e.receivedAt))?h.MessageStatus.Delivered:h.MessageStatus.Delivering,c={...t[0],type:"IdentityDVO"}}else c=i;const p=y.DataViewTranslateable.transport.messageName,l={id:e.id,name:p,date:e.createdAt,type:"MessageDVO",createdByDevice:e.createdByDevice,createdAt:e.createdAt,createdBy:i,recipients:t,attachments:o,isOwn:a,recipientCount:e.recipients.length,attachmentCount:e.attachments.length,status:u,statusText:`i18n://dvo.message.${u}`,image:"",peer:c,content:e.content};if("Mail"===e.content["@type"]||"RequestMail"===e.content["@type"]){const t=e.content,i=t.to.map((e=>r[e]));let n=[];t.cc&&(n=t.cc.map((e=>r[e])));return{...l,type:"MailDVO",name:t.subject?t.subject:y.DataViewTranslateable.consumption.mails.mailSubjectFallback,subject:t.subject,body:t.body,to:i,toCount:t.to.length,cc:n,ccCount:n.length}}if("Request"===e.content["@type"]){let t;if(a){const r=await this.consumption.outgoingRequests.getRequests({query:{"source.reference":e.id}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}else{const r=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}return{...l,type:"RequestMessageDVO",request:await this.expandLocalRequestDTO(t)}}if("Response"===e.content["@type"]){let t;if(a){const r=await this.consumption.incomingRequests.getRequests({query:{id:e.content.requestId}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}else{const r=await this.consumption.outgoingRequests.getRequests({query:{id:e.content.requestId}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}return{...l,type:"RequestMessageDVO",request:await this.expandLocalRequestDTO(t)}}return l}async expandMessageDTOs(e){const t=e.map((e=>this.expandMessageDTO(e)));return await Promise.all(t)}async expandRelationshipTemplateDTO(e){let t,r;const i=await this.expandAddress(e.createdBy),n=e.isOwn?"RelationshipTemplateDVO":"PeerRelationshipTemplateDVO";let s=e.isOwn?"i18n://dvo.template.outgoing.name":"i18n://dvo.template.incoming.name";const o=e.isOwn?"i18n://dvo.template.outgoing.description":"i18n://dvo.template.incoming.description";let u;if("RelationshipTemplateContent"===e.content["@type"]){const i=c.RelationshipTemplateContent.from(e.content).toJSON();let n;if(i.title&&(s=i.title),!e.isOwn){const t=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id,status:a.LocalRequestStatus.ManualDecisionRequired}});if(t.value.length>0)n=t.value[0],u=await this.expandLocalRequestDTO(n);else{const t=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id,status:[a.LocalRequestStatus.Decided,a.LocalRequestStatus.Completed]}});t.value.length>0&&(n=t.value[0],u=await this.expandLocalRequestDTO(n))}}t=await this.expandRequest(i.onNewRelationship),i.onExistingRelationship&&(r=await this.expandRequest(i.onExistingRelationship))}return{name:s,description:o,type:n,date:e.createdAt,...e,createdBy:i,request:u,onNewRelationship:t,onExistingRelationship:r}}async expandRelationshipTemplateDTOs(e){const t=e.map((e=>this.expandRelationshipTemplateDTO(e)));return await Promise.all(t)}async expandRequest(e,t,r){const i=e.id?e.id:"",n=[];for(let i=0;i<e.items.length;i++){const s=e.items[i],o=r?.content.items[i];n.push(await this.expandRequestGroupOrItem(s,t,o))}return{id:i,name:`${e["@type"]} ${i}`,type:"RequestDVO",date:e.expiresAt,...e,items:n,response:r?.content}}async expandRequests(e){const t=e.map((e=>this.expandRequest(e)));return await Promise.all(t)}async expandRequestItem(e,t,r){let i,n=!1;switch(!t||t.isOwn||"DecisionRequired"!==t.status&&"ManualDecisionRequired"!==t.status||(n=!0),e["@type"]){case"ReadAttributeRequestItem":const s=e;if(n){const t=await this.processAttributeQuery(s.query);return"ProcessedThirdPartyRelationshipAttributeQueryDVO"===t.type&&0===t.results.length&&(n=!1,i={code:"dvo.requestItem.error.noResultsForThirdPartyRelationshipAttributeQuery",message:"There are no matching Attributes for this ThirdPartyRelationshipAttributeQuery."}),"ProcessedIQLQueryDVO"===t.type&&0===t.results.length&&(n=!1,i={code:"dvo.requestItem.error.noResultsForIQLQueryDVO",message:"There are no matching Attributes for this IQLQuery."}),{...s,type:"DecidableReadAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableReadAttributeRequestItem.name",query:t,isDecidable:n,error:i,response:r}}return{...s,type:"ReadAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ReadAttributeRequestItem.name",query:await this.expandAttributeQuery(s.query),isDecidable:n,response:r};case"CreateAttributeRequestItem":const o=e,a=await this.expandAttribute(o.attribute);let u=!1;"DraftIdentityAttributeDVO"===a.type&&(u=!0);const p=e.title,l=e.description;let d;return n?(d="i18n://dvo.requestItem.DecidableCreateRelationshipAttributeRequestItem.name",u&&(d="i18n://dvo.requestItem.DecidableCreateIdentityAttributeRequestItem.name"),{...o,type:"DecidableCreateAttributeRequestItemDVO",id:"",name:p??d,description:l??d,attribute:a,isDecidable:n,response:r}):(d="i18n://dvo.requestItem.CreateRelationshipAttributeRequestItem.name",u&&(d="i18n://dvo.requestItem.CreateIdentityAttributeRequestItem.name"),{...o,type:"CreateAttributeRequestItemDVO",id:"",name:p??d,description:l??d,attribute:a,isDecidable:n,response:r});case"ProposeAttributeRequestItem":const f=e;t&&(f.attribute.owner=t.isOwn?t.peer:this.identityController.address.toString());let y=!1;if(r&&r.result===c.ResponseItemResult.Accepted){const e=r;JSON.stringify(e.attribute.content.value)!==JSON.stringify(f.attribute.value)&&(y=!0)}return n?{...f,type:"DecidableProposeAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableProposeAttributeRequestItem.name",attribute:await this.expandAttribute(f.attribute),query:await this.processAttributeQuery(f.query),isDecidable:n,response:r}:{...f,type:"ProposeAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ProposeAttributeRequestItem.name",attribute:await this.expandAttribute(f.attribute),query:await this.expandAttributeQuery(f.query),isDecidable:n,response:r,proposedValueOverruled:y};case"ShareAttributeRequestItem":const h=e,g=await this.expandAttribute(h.attribute);if(n)return{...h,type:"DecidableShareAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableProposeAttributeRequestItem.name",attribute:g,isDecidable:n,response:r};const m=r;return m&&(g.id=m.attributeId),{...h,type:"ShareAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ProposeAttributeRequestItem.name",attribute:g,isDecidable:n,response:r};case"AuthenticationRequestItem":const v=e;return n?{...v,type:"DecidableAuthenticationRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableAuthenticationRequestItem.name",isDecidable:n,response:r}:{...v,type:"AuthenticationRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.AuthenticationRequestItem.name",isDecidable:n,response:r};case"ConsentRequestItem":const b=e;return n?{...b,type:"DecidableConsentRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableConsentRequestItem.name",isDecidable:n,response:r}:{...b,type:"ConsentRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ConsentRequestItem.name",isDecidable:n,response:r};case"RegisterAttributeListenerRequestItem":const R=e,O=await this.expandAttributeQuery(R.query);return n?{...R,type:"DecidableRegisterAttributeListenerRequestItemDVO",id:"",query:O,name:e.title?e.title:"i18n://dvo.requestItem.DecidableRegisterAttributeListenerRequestItem.name",isDecidable:n,response:r}:{...R,type:"RegisterAttributeListenerRequestItemDVO",id:"",query:O,name:e.title?e.title:"i18n://dvo.requestItem.RegisterAttributeListenerRequestItem.name",isDecidable:n,response:r};default:return{...e,type:"RequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.name",isDecidable:n,response:r}}}async expandRequestGroupOrItem(e,t,r){if("RequestItemGroup"===e["@type"]){let i=!1;!t||t.isOwn||"DecisionRequired"!==t.status&&"ManualDecisionRequired"!==t.status||(i=!0);const n=e,s=r,o=[];for(let e=0;e<n.items.length;e++){const r=n.items[e],i=s?.items[e];o.push(await this.expandRequestItem(r,t,i))}return{type:"RequestItemGroupDVO",items:o,isDecidable:i,title:e.title,description:e.description,mustBeAccepted:e.mustBeAccepted,response:s}}return await this.expandRequestItem(e,t,r)}async expandResponseItem(e){if("Accepted"!==e.result){if("Rejected"===e.result){return{...e,type:"RejectResponseItemDVO",id:"",name:"i18n://dvo.responseItem.rejected"}}return{...e,type:"ErrorResponseItemDVO",id:"",name:"i18n://dvo.responseItem.error"}}{const t=`i18n://dvo.responseItem.${e["@type"]}.acceptedName`;switch(e["@type"]){case"ReadAttributeAcceptResponseItem":const r=e,i=await this.consumption.attributes.getAttribute({id:r.attributeId}),n=await this.expandLocalAttributeDTO(i.value);return{...r,type:"ReadAttributeAcceptResponseItemDVO",id:r.attributeId,name:t,attribute:n};case"CreateAttributeAcceptResponseItem":const s=e,o=await this.consumption.attributes.getAttribute({id:s.attributeId}),a=await this.expandLocalAttributeDTO(o.value);return{...s,type:"CreateAttributeAcceptResponseItemDVO",id:s.attributeId,name:t,attribute:a};case"ProposeAttributeAcceptResponseItem":const c=e,u=await this.consumption.attributes.getAttribute({id:c.attributeId}),p=await this.expandLocalAttributeDTO(u.value);return{...c,type:"ProposeAttributeAcceptResponseItemDVO",id:c.attributeId,name:t,attribute:p};case"ShareAttributeAcceptResponseItem":const l=e,d=await this.consumption.attributes.getAttribute({id:l.attributeId}),f=await this.expandLocalAttributeDTO(d.value);return{...l,type:"ShareAttributeAcceptResponseItemDVO",id:l.attributeId,name:t,attribute:f};case"RegisterAttributeListenerAcceptResponseItem":const y=e,h=await this.consumption.attributeListeners.getAttributeListener({id:y.listenerId}),g=await this.expandLocalAttributeListenerDTO(h.value);return{...y,type:"RegisterAttributeListenerAcceptResponseItemDVO",id:y.listenerId,name:t,listener:g};default:return{...e,type:"AcceptResponseItemDVO",id:"",name:t}}}}async expandLocalAttributeListenerDTO(e){const t=await this.expandAttributeQuery(e.query),r=await this.expandIdentityForAddress(e.peer);return{type:"LocalAttributeListenerDVO",name:"dvo.localAttributeListener.name",description:"dvo.localAttributeListener.description",...e,query:t,peer:r}}async expandResponseGroupOrItem(e){if("ResponseItemGroup"===e["@type"]){const t=e,r=[];for(const e of t.items)r.push(await this.expandResponseItem(e));return{type:"ResponseItemGroupDVO",items:r}}return await this.expandResponseItem(e)}async expandLocalRequestDTO(e){const t=e.response?await this.expandLocalResponseDTO(e.response,e):void 0,r=await this.expandRequest(e.content,e,t),i=await this.expandAddress(e.peer);let n=!1;e.isOwn||"DecisionRequired"!==e.status&&"ManualDecisionRequired"!==e.status||(n=!0);const s=e.isOwn?"outgoing":"incoming",o=`i18n://dvo.localRequest.status.${e.status}`,a=e.source?.type??"unknown",c=e.response?e.response.content.requestId:"";return{...e,id:e.id?e.id:c,content:r,items:r.items,name:`i18n://dvo.localRequest.${a}.${s}.${e.status}.name`,directionText:`i18n://dvo.localRequest.direction.${s}`,description:`i18n://dvo.localRequest.${a}.${s}.${e.status}.description`,sourceTypeText:`i18n://dvo.localRequest.sourceType.${a}`,type:"LocalRequestDVO",date:e.createdAt,createdBy:e.isOwn?this.expandSelf():i,decider:e.isOwn?i:this.expandSelf(),peer:i,response:t,statusText:o,isDecidable:n}}async expandLocalRequestDTOs(e){const t=e.map((e=>this.expandLocalRequestDTO(e)));return await Promise.all(t)}async expandResponse(e,t){const r=[];for(const t of e.items)r.push(await this.expandResponseGroupOrItem(t));return{id:t.id,name:"i18n://dvo.response.name",type:"ResponseDVO",...e,items:r}}async expandLocalResponseDTO(e,t){const r=await this.expandResponse(e.content,t);return{...e,id:t.id,name:"i18n://dvo.localResponse.name",type:"LocalResponseDVO",date:e.createdAt,content:r,items:e.content.items}}async expandLocalAttributeDTO(e){const t=e.content.value["@type"],r=await this.consumptionController.attributes.getLocalAttribute(u.CoreId.from(e.id));if(!r)throw new Error("Attribute not found");const i=e.content.owner;let n=`i18n://dvo.attribute.name.${t}`,s=`i18n://dvo.attribute.description.${t}`;const o=r.content.value.renderHints.toJSON(),a=r.content.value.valueHints.toJSON();if(r.shareInfo){const u=r.shareInfo.peer.toString();if(r.content instanceof c.RelationshipAttribute){const c=r.content,p=c.value;return"title"in p&&(n=p.title),"description"in p&&p.description&&(s=p.description),c.owner===r.shareInfo.peer?{type:"PeerRelationshipAttributeDVO",id:e.id,name:n,key:c.key,confidentiality:c.confidentiality,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!1,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),valueType:t,isTechnical:c.isTechnical}:{type:"OwnRelationshipAttributeDVO",id:e.id,name:n,key:c.key,confidentiality:c.confidentiality,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),valueType:t,isTechnical:c.isTechnical}}const p=r.content;return r.shareInfo.sourceAttribute?{type:"SharedToPeerAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),sourceAttribute:r.shareInfo.sourceAttribute.toString(),tags:p.tags?p.tags:[],valueType:t}:{type:"PeerAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!1,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),tags:p.tags?p.tags:[],valueType:t}}const p=r.content,l=await this.consumption.attributes.getAttributes({query:{"shareInfo.sourceAttribute":e.id}}),d=await this.expandLocalAttributeDTOs(l.value);return{type:"RepositoryAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,isDraft:!1,sharedWith:d,tags:p.tags?p.tags:[],valueType:t}}async expandLocalAttributeDTOs(e){const t=e.map((e=>this.expandLocalAttributeDTO(e)));return await Promise.all(t)}async expandAttributeQuery(e){switch(e["@type"]){case"IdentityAttributeQuery":return this.expandIdentityAttributeQuery(e);case"RelationshipAttributeQuery":return await this.expandRelationshipAttributeQuery(e);case"ThirdPartyRelationshipAttributeQuery":return await this.expandThirdPartyRelationshipAttributeQuery(e);case"IQLQuery":return this.expandIQLQuery(e);default:throw new Error("Wrong attribute query")}}expandIdentityAttributeQuery(e){const t=e.valueType,r=`i18n://dvo.attribute.name.${t}`,i=`i18n://dvo.attribute.description.${t}`,n=this.getHintsForValueType(t);return{type:"IdentityAttributeQueryDVO",id:"",name:r,description:i,valueType:t,validFrom:e.validFrom,validTo:e.validTo,renderHints:n.renderHints,valueHints:n.valueHints,isProcessed:!1}}async expandRelationshipAttributeQuery(e){const t=e.attributeCreationHints.valueType;let r="i18n://dvo.attributeQuery.name.RelationshipAttributeQuery",i="i18n://dvo.attributeQuery.description.RelationshipAttributeQuery";e.attributeCreationHints.title&&(r=e.attributeCreationHints.title),e.attributeCreationHints.description&&(i=e.attributeCreationHints.description);const n=this.getHintsForValueType(t);return e.attributeCreationHints.valueHints&&(n.valueHints=e.attributeCreationHints.valueHints),{type:"RelationshipAttributeQueryDVO",id:"",name:r,description:i,validFrom:e.validFrom,validTo:e.validTo,owner:await this.expandAddress(e.owner),key:e.key,attributeCreationHints:e.attributeCreationHints,renderHints:n.renderHints,valueHints:n.valueHints,isProcessed:!1,valueType:t}}async expandThirdPartyRelationshipAttributeQuery(e){const t=await Promise.all(e.thirdParty.map((e=>this.expandAddress(e))));return{type:"ThirdPartyRelationshipAttributeQueryDVO",id:"",name:"i18n://dvo.attributeQuery.name.ThirdPartyRelationshipAttributeQuery",description:"i18n://dvo.attributeQuery.description.ThirdPartyRelationshipAttributeQuery",validFrom:e.validFrom,validTo:e.validTo,owner:await this.expandAddress(e.owner),thirdParty:t,key:e.key,isProcessed:!1}}expandIQLQuery(e){let t,r,i,n;if(e.attributeCreationHints?.valueType&&(i=e.attributeCreationHints.valueType),i){const e=this.getHintsForValueType(i);t=e.renderHints,r=e.valueHints}return e.attributeCreationHints?.tags&&(n=e.attributeCreationHints.tags),{type:"IQLQueryDVO",id:"",name:"i18n://dvo.attributeQuery.name.IQLQuery",description:"i18n://dvo.attributeQuery.description.IQLQuery",queryString:e.queryString,isProcessed:!1,attributeCreationHints:e.attributeCreationHints,valueType:i,renderHints:t,valueHints:r,tags:n}}getHintsForValueType(e){const t=o.SerializableBase.getModule(e,1);if(!t)throw new Error(`No class implementation found for ${e}`);let r={"@type":"RenderHints",editType:c.RenderHintsEditType.InputLike,technicalType:c.RenderHintsTechnicalType.String},i={"@type":"ValueHints",max:200};return t.renderHints&&t.renderHints instanceof c.RenderHints&&(r=t.renderHints.toJSON()),t.valueHints&&t.valueHints instanceof c.ValueHints&&(i=t.valueHints.toJSON()),{renderHints:r,valueHints:i}}async processAttributeQuery(e){switch(e["@type"]){case"IdentityAttributeQuery":return await this.processIdentityAttributeQuery(e);case"RelationshipAttributeQuery":return await this.processRelationshipAttributeQuery(e);case"ThirdPartyRelationshipAttributeQuery":return await this.processThirdPartyRelationshipAttributeQuery(e);case"IQLQuery":return await this.processIQLQuery(e);default:throw new Error("Wrong attribute query")}}async processIdentityAttributeQuery(e){const t=await this.consumption.attributes.executeIdentityAttributeQuery({query:e}),r=await this.expandLocalAttributeDTOs(t.value);return{...this.expandIdentityAttributeQuery(e),type:"ProcessedIdentityAttributeQueryDVO",results:r,isProcessed:!0}}async processRelationshipAttributeQuery(e){const t=await this.consumption.attributes.executeRelationshipAttributeQuery({query:e});if(t.isError){if("error.runtime.recordNotFound"!==t.error.code)throw t.error;return{...await this.expandRelationshipAttributeQuery(e),type:"ProcessedRelationshipAttributeQueryDVO",results:[],isProcessed:!0}}const r=await this.expandLocalAttributeDTO(t.value);return{...await this.expandRelationshipAttributeQuery(e),type:"ProcessedRelationshipAttributeQueryDVO",results:[r],isProcessed:!0}}async processThirdPartyRelationshipAttributeQuery(e){const t=await this.consumption.attributes.executeThirdPartyRelationshipAttributeQuery({query:e}),r=await this.expandLocalAttributeDTOs(t.value);return{...await this.expandThirdPartyRelationshipAttributeQuery(e),type:"ProcessedThirdPartyRelationshipAttributeQueryDVO",results:r,isProcessed:!0}}async processIQLQuery(e){const t=await this.consumption.attributes.executeIQLQuery({query:e}),r=await this.expandLocalAttributeDTOs(t.value);let i,n,s;if(r.length>0&&r.every((e=>e.valueType===r[0].valueType)))i=r[0].valueType,n=r[0].renderHints,s=r[0].valueHints;else if(e.attributeCreationHints?.valueType&&(i=e.attributeCreationHints.valueType),i){const e=this.getHintsForValueType(i);n=e.renderHints,s=e.valueHints}return{...this.expandIQLQuery(e),type:"ProcessedIQLQueryDVO",results:r,isProcessed:!0,valueType:i,renderHints:n,valueHints:s}}async expandIdentityAttribute(e,t){const r=e.value["@type"],i=`i18n://dvo.attribute.name.${r}`,n=`i18n://dvo.attribute.description.${r}`,s=t.value.renderHints.toJSON(),o=t.value.valueHints.toJSON(),a=await this.expandAddress(e.owner);return{type:"DraftIdentityAttributeDVO",content:e,name:i,description:n,id:"",owner:a,renderHints:s,valueHints:o,value:e.value,isDraft:!0,isOwn:a.isSelf,valueType:r,tags:t.tags?t.tags:[]}}async expandRelationshipAttribute(e,t){const r=e.value["@type"];let i=`i18n://dvo.attribute.name.${r}`,n=`i18n://dvo.attribute.description.${r}`;const s=t.value.renderHints.toJSON(),o=t.value.valueHints.toJSON(),a=t.value;"title"in a&&(i=a.title),"description"in a&&a.description&&(n=a.description);const c=await this.expandAddress(e.owner);return{type:"DraftRelationshipAttributeDVO",content:e,name:i,description:n,key:e.key,confidentiality:e.confidentiality,isTechnical:!!e.isTechnical,id:"",owner:c,renderHints:s,valueHints:o,value:e.value,isDraft:!0,isOwn:c.isSelf,valueType:r}}async expandAttribute(e){const t=o.Serializable.fromUnknown(e);if(t instanceof c.IdentityAttribute)return await this.expandIdentityAttribute(e,t);if(t instanceof c.RelationshipAttribute)return await this.expandRelationshipAttribute(e,t);throw new Error("Wrong attribute instance")}async expandAttributes(e){const t=e.map((e=>this.expandAttribute(e)));return await Promise.all(t)}expandSelf(){return{id:this.identityController.address.toString(),type:"IdentityDVO",name:"i18n://dvo.identity.self.name",initials:"i18n://dvo.identity.self.initials",realm:u.Realm.Prod,description:"i18n://dvo.identity.self.description",isSelf:!0,hasRelationship:!1}}expandUnknown(e){const t=e.substring(3,9),r=(t.match(/\b\w/g)??[]).join("");return{id:e,type:"IdentityDVO",name:t,initials:r,realm:u.Realm.Prod,description:"i18n://dvo.identity.unknown.description",isSelf:!1,hasRelationship:!1}}async expandAddress(e){if(this.identityController.isMe(u.CoreAddress.from(e)))return this.expandSelf();const t=await this.transport.relationships.getRelationshipByAddress({address:e});return t.isError?this.expandUnknown(e):await this.expandRelationshipDTO(t.value)}async expandAddresses(e){const t=e.map((e=>this.expandAddress(e)));return await Promise.all(t)}async expandRecipientDTO(e){return{...await this.expandAddress(e.address),type:"RecipientDVO",receivedAt:e.receivedAt,receivedByDevice:e.receivedByDevice}}async expandRecipientDTOs(e){const t=e.map((e=>this.expandRecipientDTO(e)));return await Promise.all(t)}expandRelationshipChangeDTO(e,t){const r=t.response?t.response.createdAt:t.request.createdAt;let i,n=!1;return this.identityController.isMe(u.CoreAddress.from(t.request.createdBy))&&(n=!0),t.response&&(i={...t.response,id:`${t.id}_response`,name:"i18n://dvo.relationshipChange.response.name",type:"RelationshipChangeResponseDVO"}),Promise.resolve({type:"RelationshipChangeDVO",id:t.id,name:"",date:r,status:t.status,statusText:`i18n://dvo.relationshipChange.${t.status}`,changeType:t.type,changeTypeText:`i18n://dvo.relationshipChange.${t.type}`,isOwn:n,request:{...t.request,id:`${t.id}_request`,name:"i18n://dvo.relationshipChange.request.name",type:"RelationshipChangeRequestDVO"},response:i})}async expandRelationshipChangeDTOs(e){const t=e.changes.map((t=>this.expandRelationshipChangeDTO(e,t)));return await Promise.all(t)}async createRelationshipDVO(e){let t;const r=await this.consumption.settings.getSettings({query:{reference:e.id}});t=r.value.length>0?r.value[0].value:{isPinned:!1};const i={},n=await this.consumption.attributes.getPeerAttributes({onlyValid:!0,peer:e.peer}),s=await this.expandLocalAttributeDTOs(n.value),o={};for(const e of s){const t=e.content.value["@type"],r=o[t];r?r.push(e):o[t]=[e];if(["DisplayName","GivenName","MiddleName","Surname","Sex"].includes(t)){const r=e.content.value;i[t]&&"GivenName"===t?i[t]+=` ${r.value}`:i[t]=r.value}}let a=g.RelationshipDirection.Incoming;this.identityController.isMe(u.CoreAddress.from(e.changes[0].request.createdBy))&&(a=g.RelationshipDirection.Outgoing);let c="";e.status===u.RelationshipStatus.Pending&&a===g.RelationshipDirection.Outgoing?c=y.DataViewTranslateable.transport.relationshipOutgoing:e.status===u.RelationshipStatus.Pending?c=y.DataViewTranslateable.transport.relationshipIncoming:e.status===u.RelationshipStatus.Rejected?c=y.DataViewTranslateable.transport.relationshipRejected:e.status===u.RelationshipStatus.Revoked?c=y.DataViewTranslateable.transport.relationshipRevoked:e.status===u.RelationshipStatus.Active&&(c=y.DataViewTranslateable.transport.relationshipActive);const p=await this.expandRelationshipChangeDTOs(e);let l;return l=i.DisplayName?i.DisplayName:i.MiddleName&&i.GivenName&&i.Surname?`${i.GivenName} ${i.MiddleName} ${i.Surname}`:i.GivenName&&i.Surname?`${i.GivenName} ${i.Surname}`:i.Sex&&i.Surname?`i18n://dvo.identity.Salutation.${i.Sex} ${i.Surname}`:i.Surname?`${i.Surname}`:e.peer.substring(3,9),{id:e.id,name:t.userTitle??l,description:t.userDescription??c,date:e.changes[0].request.createdAt,image:"",type:"RelationshipDVO",status:e.status,statusText:c,direction:a,isPinned:t.isPinned,attributeMap:o,items:s,nameMap:i,changes:p,changeCount:p.length,templateId:e.template.id}}async expandRelationshipDTO(e){const t=await this.createRelationshipDVO(e),r=(t.name.match(/\b\w/g)??[]).join("");return{type:"IdentityDVO",id:e.peer,name:t.name,date:t.date,description:t.description,publicKey:e.peerIdentity.publicKey,realm:e.peerIdentity.realm,initials:r,isSelf:!1,hasRelationship:!0,relationship:t,items:t.items}}async expandIdentityForAddress(e){if(e===this.identityController.address.toString())return this.expandSelf();const t=await this.transport.relationships.getRelationshipByAddress({address:e});if(t.isSuccess)return await this.expandRelationshipDTO(t.value);if(t.error.code!==f.RuntimeErrors.general.recordNotFound(u.Relationship).code)throw t.error;const r=e.substring(3,9),i=(r.match(/\b\w/g)??[]).join("");return{id:e,type:"IdentityDVO",name:r,initials:i,publicKey:"i18n://dvo.identity.publicKey.unknown",realm:this.identityController.realm.toString(),description:"i18n://dvo.identity.unknown",isSelf:!1,hasRelationship:!1}}async expandIdentityDTO(e){return await this.expandIdentityForAddress(e.address)}async expandRelationshipDTOs(e){const t=e.map((e=>this.expandRelationshipDTO(e)));return await Promise.all(t)}async expandFileId(e){const t=await this.transport.files.getFile({id:e});if(t.isError)throw t.error;return await this.expandFileDTO(t.value)}async expandFileIds(e){const t=e.map((e=>this.expandFileId(e)));return await Promise.all(t)}async expandFileDTO(e){return{...e,type:"FileDVO",id:e.id,name:e.title?e.title:e.filename,date:e.createdAt,image:"",filename:e.filename,filesize:e.filesize,createdBy:await this.expandAddress(e.createdBy)}}async expandFileDTOs(e){const t=e.map((e=>this.expandFileDTO(e)));return await Promise.all(t)}};t.DataViewExpander=m,t.DataViewExpander=m=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),s(3,p.Inject),n("design:paramtypes",[l.TransportServices,d.ConsumptionServices,a.ConsumptionController,u.IdentityController])],m)},9121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2043:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataViewTranslateable=void 0;class DataViewTranslateable{}t.DataViewTranslateable=DataViewTranslateable,DataViewTranslateable.prefix="i18n://dvo.",DataViewTranslateable.transport={messageName:`${DataViewTranslateable.prefix}message.name`,relationshipOutgoing:`${DataViewTranslateable.prefix}relationship.Outgoing`,relationshipIncoming:`${DataViewTranslateable.prefix}relationship.Incoming`,relationshipRejected:`${DataViewTranslateable.prefix}relationship.Rejected`,relationshipRevoked:`${DataViewTranslateable.prefix}relationship.Revoked`,relationshipActive:`${DataViewTranslateable.prefix}relationship.Active`,fileName:`${DataViewTranslateable.prefix}file.name`},DataViewTranslateable.consumption={mails:{mailSubjectFallback:`${DataViewTranslateable.prefix}mails.mailSubjectFallback`,requestMailSubjectFallback:`${DataViewTranslateable.prefix}mails.requestMailSubjectFallback`},attributes:{unknownAttributeName:`${DataViewTranslateable.prefix}attributes.UnknownAttributeName`},requests:{attributesShareRequestName:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.name`,attributesShareRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.namePlural`,attributesShareRequestNoRelationship:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.noRelationship`,attributesShareRequestOnlyRelationships:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.onlyRelationships`,attributesChangeRequestName:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.name`,attributesChangeRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.namePlural`},identities:{self:`${DataViewTranslateable.prefix}identities.self.name`}}},2706:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8306:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2706),t),n(r(6911),t)},1403:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8691:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1952:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8472:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9542:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1403),t),n(r(8691),t),n(r(1952),t),n(r(2421),t),n(r(1600),t),n(r(8472),t)},1039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6519:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9005:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2161:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},843:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},166:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1039),t),n(r(6519),t),n(r(9802),t),n(r(9005),t),n(r(2161),t),n(r(843),t)},4086:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8306),t),n(r(9542),t),n(r(166),t),n(r(4869),t),n(r(9121),t),n(r(2043),t),n(r(6574),t)},4457:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6342:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4700:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MessageStatus=void 0,function(e){e.Received="Received",e.Delivering="Delivering",e.Delivered="Delivered"}(r||(t.MessageStatus=r={}))},2466:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipDirection=void 0,function(e){e.Outgoing="Outgoing",e.Incoming="Incoming"}(r||(t.RelationshipDirection=r={}))},9893:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6574:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4457),t),n(r(6342),t),n(r(4700),t),n(r(2466),t),n(r(9893),t)},1291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataEvent=void 0;const i=r(5172);class DataEvent extends i.DataEvent{constructor(e,t,r){super(e,r),this.eventTargetAddress=t}}t.DataEvent=DataEvent},1496:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.EventProxy=void 0;const o=s(r(3850)),a=s(r(9663)),c=r(485),u=r(2226),p=r(7747);t.EventProxy=class EventProxy{constructor(e,t){this.targetEventBus=e,this.sourceEventBus=t,this.subscriptionIds=[]}start(){if(this.subscriptionIds.length>0)throw new Error("EventProxy is already started");return this.proxyConsumptionEvents(),this.proxyTransportEvents(),this}proxyTransportEvents(){this.subscribeToSourceEvent(a.MessageDeliveredEvent,(e=>{this.targetEventBus.publish(new p.MessageDeliveredEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.MessageReceivedEvent,(e=>{this.targetEventBus.publish(new p.MessageReceivedEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.MessageSentEvent,(e=>{this.targetEventBus.publish(new p.MessageSentEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.PeerRelationshipTemplateLoadedEvent,(e=>{this.targetEventBus.publish(new p.PeerRelationshipTemplateLoadedEvent(e.eventTargetAddress,c.RelationshipTemplateMapper.toRelationshipTemplateDTO(e.data)))})),this.subscribeToSourceEvent(a.RelationshipChangedEvent,(e=>{this.targetEventBus.publish(new p.RelationshipChangedEvent(e.eventTargetAddress,c.RelationshipMapper.toRelationshipDTO(e.data)))}))}proxyConsumptionEvents(){this.subscribeToSourceEvent(o.AttributeCreatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeCreatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeDeletedEvent,(e=>{this.targetEventBus.publish(new u.AttributeDeletedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeSucceededEvent,(e=>{this.targetEventBus.publish(new u.AttributeSucceededEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeUpdatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeUpdatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.IncomingRequestReceivedEvent,(e=>{this.targetEventBus.publish(new u.IncomingRequestReceivedEvent(e.eventTargetAddress,c.RequestMapper.toLocalRequestDTO(e.data)))})),this.subscribeToSourceEvent(o.IncomingRequestStatusChangedEvent,(e=>{this.targetEventBus.publish(new u.IncomingRequestStatusChangedEvent(e.eventTargetAddress,{request:c.RequestMapper.toLocalRequestDTO(e.data.request),oldStatus:e.data.oldStatus,newStatus:e.data.newStatus}))})),this.subscribeToSourceEvent(o.OutgoingRequestCreatedEvent,(e=>{this.targetEventBus.publish(new u.OutgoingRequestCreatedEvent(e.eventTargetAddress,c.RequestMapper.toLocalRequestDTO(e.data)))})),this.subscribeToSourceEvent(o.OutgoingRequestCreatedAndCompletedEvent,(e=>{const t=c.RequestMapper.toLocalRequestDTO(e.data);this.targetEventBus.publish(new u.OutgoingRequestCreatedAndCompletedEvent(e.eventTargetAddress,t)),"RelationshipChange"===e.data.response?.source?.type&&this.targetEventBus.publish(new u.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent(e.eventTargetAddress,t))})),this.subscribeToSourceEvent(o.OutgoingRequestStatusChangedEvent,(e=>{this.targetEventBus.publish(new u.OutgoingRequestStatusChangedEvent(e.eventTargetAddress,{request:c.RequestMapper.toLocalRequestDTO(e.data.request),oldStatus:e.data.oldStatus,newStatus:e.data.newStatus}))})),this.subscribeToSourceEvent(o.SharedAttributeCopyCreatedEvent,(e=>{this.targetEventBus.publish(new u.SharedAttributeCopyCreatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeListenerCreatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeListenerCreatedEvent(e.eventTargetAddress,c.AttributeListenerMapper.toAttributeListenerDTO(e.data)))}))}subscribeToSourceEvent(e,t){const r=this.sourceEventBus.subscribe(e,t);this.subscriptionIds.push(r)}stop(){this.subscriptionIds.forEach((e=>this.sourceEventBus.unsubscribe(e)))}}},3635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeCreatedEvent=void 0;const i=r(1291);class AttributeCreatedEvent extends i.DataEvent{constructor(e,t){super(AttributeCreatedEvent.namespace,e,t)}}t.AttributeCreatedEvent=AttributeCreatedEvent,AttributeCreatedEvent.namespace="consumption.attributeCreated"},5046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeDeletedEvent=void 0;const i=r(1291);class AttributeDeletedEvent extends i.DataEvent{constructor(e,t){super(AttributeDeletedEvent.namespace,e,t)}}t.AttributeDeletedEvent=AttributeDeletedEvent,AttributeDeletedEvent.namespace="consumption.attributeDeleted"},2593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerCreatedEvent=void 0;const i=r(1291);class AttributeListenerCreatedEvent extends i.DataEvent{constructor(e,t){super(AttributeListenerCreatedEvent.namespace,e,t)}}t.AttributeListenerCreatedEvent=AttributeListenerCreatedEvent,AttributeListenerCreatedEvent.namespace="consumption.attributeListenerCreated"},1365:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerTriggeredEvent=void 0;const i=r(1291);class AttributeListenerTriggeredEvent extends i.DataEvent{constructor(e,t){super(AttributeListenerTriggeredEvent.namespace,e,t)}}t.AttributeListenerTriggeredEvent=AttributeListenerTriggeredEvent,AttributeListenerTriggeredEvent.namespace="consumption.attributeListenerTriggered"},2314:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeSucceededEvent=void 0;const i=r(1291);class AttributeSucceededEvent extends i.DataEvent{constructor(e,t){super(AttributeSucceededEvent.namespace,e,t)}}t.AttributeSucceededEvent=AttributeSucceededEvent,AttributeSucceededEvent.namespace="consumption.attributeSucceded"},9846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeUpdatedEvent=void 0;const i=r(1291);class AttributeUpdatedEvent extends i.DataEvent{constructor(e,t){super(AttributeUpdatedEvent.namespace,e,t)}}t.AttributeUpdatedEvent=AttributeUpdatedEvent,AttributeUpdatedEvent.namespace="consumption.attributeUpdated"},8099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestReceivedEvent=void 0;const i=r(1291);class IncomingRequestReceivedEvent extends i.DataEvent{constructor(e,t){if(super(IncomingRequestReceivedEvent.namespace,e,t),t.isOwn)throw new Error("Cannot create this event for an outgoing Request")}}t.IncomingRequestReceivedEvent=IncomingRequestReceivedEvent,IncomingRequestReceivedEvent.namespace="consumption.incomingRequestReceived"},4795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestStatusChangedEvent=void 0;const i=r(1291);class IncomingRequestStatusChangedEvent extends i.DataEvent{constructor(e,t){if(super(IncomingRequestStatusChangedEvent.namespace,e,t),t.request.isOwn)throw new Error("Cannot create this event for an outgoing Request")}}t.IncomingRequestStatusChangedEvent=IncomingRequestStatusChangedEvent,IncomingRequestStatusChangedEvent.namespace="consumption.incomingRequestStatusChanged"},4209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MailReceivedEvent=void 0;const i=r(1291);class MailReceivedEvent extends i.DataEvent{constructor(e,t,r){super(MailReceivedEvent.namespace,e,r),this.mail=t}}t.MailReceivedEvent=MailReceivedEvent,MailReceivedEvent.namespace="consumption.mailReceived"},6425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageProcessedResult=t.MessageProcessedEvent=void 0;const i=r(1291);class MessageProcessedEvent extends i.DataEvent{constructor(e,t,r){super(MessageProcessedEvent.namespace,e,{message:t,result:r})}}var n;t.MessageProcessedEvent=MessageProcessedEvent,MessageProcessedEvent.namespace="consumption.messageProcessed",function(e){e.ManualRequestDecisionRequired="ManualRequestDecisionRequired",e.NoRequest="NoRequest",e.Error="Error"}(n||(t.MessageProcessedResult=n={}))},8302:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestCreatedAndCompletedEvent=void 0;const i=r(1291);class OutgoingRequestCreatedAndCompletedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestCreatedAndCompletedEvent.namespace,e,t),!t.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestCreatedAndCompletedEvent=OutgoingRequestCreatedAndCompletedEvent,OutgoingRequestCreatedAndCompletedEvent.namespace="consumption.outgoingRequestCreatedAndCompleted"},9260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestCreatedEvent=void 0;const i=r(1291);class OutgoingRequestCreatedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestCreatedEvent.namespace,e,t),!t.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestCreatedEvent=OutgoingRequestCreatedEvent,OutgoingRequestCreatedEvent.namespace="consumption.outgoingRequestCreated"},370:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent=void 0;const i=r(1291);class OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent.namespace,e,t),!t.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent=OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent,OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent.namespace="consumption.outgoingRequestFromRelationshipCreationChangeCreatedAndCompleted"},5107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestStatusChangedEvent=void 0;const i=r(1291);class OutgoingRequestStatusChangedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestStatusChangedEvent.namespace,e,t),!t.request.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestStatusChangedEvent=OutgoingRequestStatusChangedEvent,OutgoingRequestStatusChangedEvent.namespace="consumption.outgoingRequestStatusChanged"},7834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipEvent=void 0;const i=r(1291);class RelationshipEvent extends i.DataEvent{constructor(e,t,r){super(RelationshipEvent.namespace+r.id,e,r),this.event=t}}t.RelationshipEvent=RelationshipEvent,RelationshipEvent.namespace="consumption.relationshipEvent."},1908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplateProcessedResult=t.RelationshipTemplateProcessedEvent=void 0;const i=r(1291);class RelationshipTemplateProcessedEvent extends i.DataEvent{constructor(e,t){if(super(RelationshipTemplateProcessedEvent.namespace,e,t),t.template.isOwn)throw new Error("Cannot create this event for an own Relationship Template.")}}var n;t.RelationshipTemplateProcessedEvent=RelationshipTemplateProcessedEvent,RelationshipTemplateProcessedEvent.namespace="consumption.relationshipTemplateProcessed",function(e){e.ManualRequestDecisionRequired="ManualRequestDecisionRequired",e.NonCompletedRequestExists="NonCompletedRequestExists",e.RelationshipExists="RelationshipExists",e.NoRequest="NoRequest",e.Error="Error"}(n||(t.RelationshipTemplateProcessedResult=n={}))},43:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedAttributeCopyCreatedEvent=void 0;const i=r(1291);class SharedAttributeCopyCreatedEvent extends i.DataEvent{constructor(e,t){super(SharedAttributeCopyCreatedEvent.namespace,e,t)}}t.SharedAttributeCopyCreatedEvent=SharedAttributeCopyCreatedEvent,SharedAttributeCopyCreatedEvent.namespace="consumption.sharedAttributeCopyCreated"},2226:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3635),t),n(r(5046),t),n(r(2593),t),n(r(1365),t),n(r(2314),t),n(r(9846),t),n(r(8099),t),n(r(4795),t),n(r(4209),t),n(r(6425),t),n(r(8302),t),n(r(9260),t),n(r(370),t),n(r(5107),t),n(r(7834),t),n(r(1908),t),n(r(43),t)},2205:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2226),t),n(r(1291),t),n(r(4696),t),n(r(7747),t)},6762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesInitializedEvent=void 0;const i=r(5172);class ModulesInitializedEvent extends i.Event{constructor(){super(ModulesInitializedEvent.namespace)}}t.ModulesInitializedEvent=ModulesInitializedEvent,ModulesInitializedEvent.namespace="runtime.modulesInitialized"},188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesLoadedEvent=void 0;const i=r(5172);class ModulesLoadedEvent extends i.Event{constructor(){super(ModulesLoadedEvent.namespace)}}t.ModulesLoadedEvent=ModulesLoadedEvent,ModulesLoadedEvent.namespace="runtime.modulesLoaded"},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesStartedEvent=void 0;const i=r(5172);class ModulesStartedEvent extends i.Event{constructor(){super(ModulesStartedEvent.namespace)}}t.ModulesStartedEvent=ModulesStartedEvent,ModulesStartedEvent.namespace="runtime.modulesStarted"},7856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeInitializedEvent=void 0;const i=r(5172);class RuntimeInitializedEvent extends i.Event{constructor(){super(RuntimeInitializedEvent.namespace)}}t.RuntimeInitializedEvent=RuntimeInitializedEvent,RuntimeInitializedEvent.namespace="runtime.initialized"},8061:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeInitializingEvent=void 0;const i=r(5172);class RuntimeInitializingEvent extends i.Event{constructor(){super(RuntimeInitializingEvent.namespace)}}t.RuntimeInitializingEvent=RuntimeInitializingEvent,RuntimeInitializingEvent.namespace="runtime.initializing"},4696:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(6762),t),n(r(188),t),n(r(4737),t),n(r(7856),t),n(r(8061),t)},5984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDeliveredEvent=void 0;const i=r(1291);class MessageDeliveredEvent extends i.DataEvent{constructor(e,t){super(MessageDeliveredEvent.namespace,e,t)}}t.MessageDeliveredEvent=MessageDeliveredEvent,MessageDeliveredEvent.namespace="transport.messageDelivered"},8994:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageReceivedEvent=void 0;const i=r(1291);class MessageReceivedEvent extends i.DataEvent{constructor(e,t){super(MessageReceivedEvent.namespace,e,t)}}t.MessageReceivedEvent=MessageReceivedEvent,MessageReceivedEvent.namespace="transport.messageReceived"},4769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageSentEvent=void 0;const i=r(1291);class MessageSentEvent extends i.DataEvent{constructor(e,t){super(MessageSentEvent.namespace,e,t)}}t.MessageSentEvent=MessageSentEvent,MessageSentEvent.namespace="transport.messageSent"},2182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PeerRelationshipTemplateLoadedEvent=void 0;const i=r(1291);class PeerRelationshipTemplateLoadedEvent extends i.DataEvent{constructor(e,t){super(PeerRelationshipTemplateLoadedEvent.namespace,e,t)}}t.PeerRelationshipTemplateLoadedEvent=PeerRelationshipTemplateLoadedEvent,PeerRelationshipTemplateLoadedEvent.namespace="transport.peerRelationshipTemplateLoaded"},1690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipChangedEvent=void 0;const i=r(1291);class RelationshipChangedEvent extends i.DataEvent{constructor(e,t){super(RelationshipChangedEvent.namespace,e,t)}}t.RelationshipChangedEvent=RelationshipChangedEvent,RelationshipChangedEvent.namespace="transport.relationshipChanged"},7747:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5984),t),n(r(8994),t),n(r(4769),t),n(r(2182),t),n(r(1690),t)},7371:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousServices=void 0;const o=r(7071),a=r(8346);let c=class AnonymousServices{constructor(e){this.tokens=e}};t.AnonymousServices=c,t.AnonymousServices=c=i([s(0,o.Inject),n("design:paramtypes",[a.AnonymousTokensFacade])],c)},4629:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsumptionServices=void 0;const o=r(7071),a=r(6013);let c=class ConsumptionServices{constructor(e,t,r,i,n,s){this.attributes=e,this.drafts=t,this.settings=r,this.incomingRequests=i,this.outgoingRequests=n,this.attributeListeners=s}};t.ConsumptionServices=c,t.ConsumptionServices=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),n("design:paramtypes",[a.AttributesFacade,a.DraftsFacade,a.SettingsFacade,a.IncomingRequestsFacade,a.OutgoingRequestsFacade,a.AttributeListenersFacade])],c)},4164:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TransportServices=void 0;const o=r(7071),a=r(9728);let c=class TransportServices{constructor(e,t,r,i,n,s,o,a){this.files=e,this.messages=t,this.relationships=r,this.relationshipTemplates=i,this.tokens=n,this.account=s,this.devices=o,this.challenges=a}};t.TransportServices=c,t.TransportServices=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.FilesFacade,a.MessagesFacade,a.RelationshipsFacade,a.RelationshipTemplatesFacade,a.TokensFacade,a.AccountFacade,a.DevicesFacade,a.ChallengesFacade])],c)},7306:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousTokensFacade=void 0;const o=r(7071),a=r(485);let c=class AnonymousTokensFacade{constructor(e,t){this.loadPeerTokenByTruncatedReferenceUseCase=e,this.loadPeerTokenByIdAndKeyUseCase=t}async loadPeerTokenByTruncatedReference(e){return await this.loadPeerTokenByTruncatedReferenceUseCase.execute(e)}async loadPeerTokenByIdAndKey(e){return await this.loadPeerTokenByIdAndKeyUseCase.execute(e)}};t.AnonymousTokensFacade=c,t.AnonymousTokensFacade=c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.LoadPeerTokenAnonymousByTruncatedReferenceUseCase,a.LoadPeerTokenAnonymousByIdAndKeyUseCase])],c)},8346:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7306),t)},1582:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenersFacade=void 0;const o=r(7071),a=r(485);let c=class AttributeListenersFacade{constructor(e,t){this.getAttributeListenerUseCase=e,this.getAttributeListenersUseCase=t}async getAttributeListener(e){return await this.getAttributeListenerUseCase.execute(e)}async getAttributeListeners(){return await this.getAttributeListenersUseCase.execute()}};t.AttributeListenersFacade=c,t.AttributeListenersFacade=c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.GetAttributeListenerUseCase,a.GetAttributeListenersUseCase])],c)},2534:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributesFacade=void 0;const o=r(7071),a=r(485);let c=class AttributesFacade{constructor(e,t,r,i,n,s,o,a,c,u,p,l,d,f,y){this.createAttributeUseCase=e,this.createSharedAttributeCopyUseCase=t,this.deleteAttributeUseCase=r,this.getPeerAttributesUseCase=i,this.getSharedToPeerAttributesUseCase=n,this.getAttributeUseCase=s,this.getAttributesUseCase=o,this.succeedAttributeUseCase=a,this.updateAttributeUseCase=c,this.executeIdentityAttributeQueryUseCase=u,this.executeRelationshipAttributeQueryUseCase=p,this.executeThirdPartyRelationshipAttributeQueryUseCase=l,this.executeIQLQueryUseCase=d,this.validateIQLQueryUseCase=f,this.shareAttributeUseCase=y}async createAttribute(e){return await this.createAttributeUseCase.execute(e)}async createSharedAttributeCopy(e){return await this.createSharedAttributeCopyUseCase.execute(e)}async deleteAttribute(e){return await this.deleteAttributeUseCase.execute(e)}async getPeerAttributes(e){return await this.getPeerAttributesUseCase.execute(e)}async getSharedToPeerAttributes(e){return await this.getSharedToPeerAttributesUseCase.execute(e)}async getAttribute(e){return await this.getAttributeUseCase.execute(e)}async getAttributes(e){return await this.getAttributesUseCase.execute(e)}async executeIdentityAttributeQuery(e){return await this.executeIdentityAttributeQueryUseCase.execute(e)}async executeRelationshipAttributeQuery(e){return await this.executeRelationshipAttributeQueryUseCase.execute(e)}async executeThirdPartyRelationshipAttributeQuery(e){return await this.executeThirdPartyRelationshipAttributeQueryUseCase.execute(e)}async executeIQLQuery(e){return await this.executeIQLQueryUseCase.execute(e)}async validateIQLQuery(e){return await this.validateIQLQueryUseCase.execute(e)}async succeedAttribute(e){return await this.succeedAttributeUseCase.execute(e)}async updateAttribute(e){return await this.updateAttributeUseCase.execute(e)}async shareAttribute(e){return await this.shareAttributeUseCase.execute(e)}};t.AttributesFacade=c,t.AttributesFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),s(9,o.Inject),s(10,o.Inject),s(11,o.Inject),s(12,o.Inject),s(13,o.Inject),s(14,o.Inject),n("design:paramtypes",[a.CreateAttributeUseCase,a.CreateSharedAttributeCopyUseCase,a.DeleteAttributeUseCase,a.GetPeerAttributesUseCase,a.GetSharedToPeerAttributesUseCase,a.GetAttributeUseCase,a.GetAttributesUseCase,a.SucceedAttributeUseCase,a.UpdateAttributeUseCase,a.ExecuteIdentityAttributeQueryUseCase,a.ExecuteRelationshipAttributeQueryUseCase,a.ExecuteThirdPartyRelationshipAttributeQueryUseCase,a.ExecuteIQLQueryUseCase,a.ValidateIQLQueryUseCase,a.ShareAttributeUseCase])],c)},3514:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DraftsFacade=void 0;const o=r(7071),a=r(485);let c=class DraftsFacade{constructor(e,t,r,i,n){this.createDraftUseCase=e,this.deleteDraftUseCase=t,this.getDraftUseCase=r,this.getDraftsUseCase=i,this.updateDraftUseCase=n}async createDraft(e){return await this.createDraftUseCase.execute(e)}async deleteDraft(e){return await this.deleteDraftUseCase.execute(e)}async getDraft(e){return await this.getDraftUseCase.execute(e)}async getDrafts(e){return await this.getDraftsUseCase.execute(e)}async updateDraft(e){return await this.updateDraftUseCase.execute(e)}};t.DraftsFacade=c,t.DraftsFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.CreateDraftUseCase,a.DeleteDraftUseCase,a.GetDraftUseCase,a.GetDraftsUseCase,a.UpdateDraftUseCase])],c)},9617:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestsFacade=void 0;const o=r(7071),a=r(485);let c=class IncomingRequestsFacade{constructor(e,t,r,i,n,s,o,a,c,u){this.receivedUseCase=e,this.checkPrerequisitesUseCase=t,this.requireManualDecisionUseCase=r,this.canAcceptUseCase=i,this.acceptUseCase=n,this.canRejectUseCase=s,this.rejectUseCase=o,this.completeUseCase=a,this.getRequestUseCase=c,this.getRequestsUseCase=u}async received(e){return await this.receivedUseCase.execute(e)}async checkPrerequisites(e){return await this.checkPrerequisitesUseCase.execute(e)}async requireManualDecision(e){return await this.requireManualDecisionUseCase.execute(e)}async canAccept(e){return await this.canAcceptUseCase.execute(e)}async accept(e){return await this.acceptUseCase.execute(e)}async canReject(e){return await this.canRejectUseCase.execute(e)}async reject(e){return await this.rejectUseCase.execute(e)}async complete(e){return await this.completeUseCase.execute(e)}async getRequest(e){return await this.getRequestUseCase.execute(e)}async getRequests(e){return await this.getRequestsUseCase.execute(e)}};t.IncomingRequestsFacade=c,t.IncomingRequestsFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),s(9,o.Inject),n("design:paramtypes",[a.ReceivedIncomingRequestUseCase,a.CheckPrerequisitesOfIncomingRequestUseCase,a.RequireManualDecisionOfIncomingRequestUseCase,a.CanAcceptIncomingRequestUseCase,a.AcceptIncomingRequestUseCase,a.CanRejectIncomingRequestUseCase,a.RejectIncomingRequestUseCase,a.CompleteIncomingRequestUseCase,a.GetIncomingRequestUseCase,a.GetIncomingRequestsUseCase])],c)},1881:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestsFacade=void 0;const o=r(7071),a=r(485);let c=class OutgoingRequestsFacade{constructor(e,t,r,i,n,s,o,a){this.canCreateUseCase=e,this.createUseCase=t,this.sentUseCase=r,this.createAndCompleteFromRelationshipTemplateResponseUseCase=i,this.completeUseCase=n,this.getRequestUseCase=s,this.getRequestsUseCase=o,this.discardRequestUseCase=a}async canCreate(e){return await this.canCreateUseCase.execute(e)}async create(e){return await this.createUseCase.execute(e)}async createAndCompleteFromRelationshipTemplateResponse(e){return await this.createAndCompleteFromRelationshipTemplateResponseUseCase.execute(e)}async sent(e){return await this.sentUseCase.execute(e)}async complete(e){return await this.completeUseCase.execute(e)}async getRequest(e){return await this.getRequestUseCase.execute(e)}async getRequests(e){return await this.getRequestsUseCase.execute(e)}async discard(e){return await this.discardRequestUseCase.execute(e)}};t.OutgoingRequestsFacade=c,t.OutgoingRequestsFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.CanCreateOutgoingRequestUseCase,a.CreateOutgoingRequestUseCase,a.SentOutgoingRequestUseCase,a.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseUseCase,a.CompleteOutgoingRequestUseCase,a.GetOutgoingRequestUseCase,a.GetOutgoingRequestsUseCase,a.DiscardOutgoingRequestUseCase])],c)},6615:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFacade=void 0;const o=r(7071),a=r(485);let c=class SettingsFacade{constructor(e,t,r,i,n,s){this.createSettingUseCase=e,this.updateSettingUseCase=t,this.deleteSettingUseCase=r,this.getSettingsUseCase=i,this.getSettingUseCase=n,this.getSettingByKeyUseCase=s}async createSetting(e){return await this.createSettingUseCase.execute(e)}async getSetting(e){return await this.getSettingUseCase.execute(e)}async getSettingByKey(e){return await this.getSettingByKeyUseCase.execute(e)}async getSettings(e){return await this.getSettingsUseCase.execute(e)}async deleteSetting(e){return await this.deleteSettingUseCase.execute(e)}async updateSetting(e){return await this.updateSettingUseCase.execute(e)}};t.SettingsFacade=c,t.SettingsFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),n("design:paramtypes",[a.CreateSettingUseCase,a.UpdateSettingUseCase,a.DeleteSettingUseCase,a.GetSettingsUseCase,a.GetSettingUseCase,a.GetSettingByKeyUseCase])],c)},6013:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1582),t),n(r(2534),t),n(r(3514),t),n(r(9617),t),n(r(1881),t),n(r(6615),t)},941:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountFacade=void 0;const o=r(7071),a=r(485);let c=class AccountFacade{constructor(e,t,r,i,n,s,o,a,c){this.getIdentityInfoUseCase=e,this.getDeviceInfoUseCase=t,this.registerPushNotificationTokenUseCase=r,this.syncDatawalletUseCase=i,this.syncEverythingUseCase=n,this.getSyncInfoUseCase=s,this.disableAutoSyncUseCase=o,this.enableAutoSyncUseCase=a,this.loadItemFromTruncatedReferenceUseCase=c}async getIdentityInfo(){return await this.getIdentityInfoUseCase.execute()}async getDeviceInfo(){return await this.getDeviceInfoUseCase.execute()}async registerPushNotificationToken(e){return await this.registerPushNotificationTokenUseCase.execute(e)}async syncDatawallet(e={}){return await this.syncDatawalletUseCase.execute(e)}async syncEverything(e={}){return await this.syncEverythingUseCase.execute(e)}async getSyncInfo(){return await this.getSyncInfoUseCase.execute()}async enableAutoSync(){return await this.enableAutoSyncUseCase.execute()}async disableAutoSync(){return await this.disableAutoSyncUseCase.execute()}async loadItemFromTruncatedReference(e){return await this.loadItemFromTruncatedReferenceUseCase.execute(e)}};t.AccountFacade=c,t.AccountFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),n("design:paramtypes",[a.GetIdentityInfoUseCase,a.GetDeviceInfoUseCase,a.RegisterPushNotificationTokenUseCase,a.SyncDatawalletUseCase,a.SyncEverythingUseCase,a.GetSyncInfoUseCase,a.DisableAutoSyncUseCase,a.EnableAutoSyncUseCase,a.LoadItemFromTruncatedReferenceUseCase])],c)},4213:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChallengesFacade=void 0;const o=r(7071),a=r(485);let c=class ChallengesFacade{constructor(e,t){this.createChallengeUseCase=e,this.validateChallengeUseCase=t}async createChallenge(e){return await this.createChallengeUseCase.execute(e)}async validateChallenge(e){return await this.validateChallengeUseCase.execute(e)}};t.ChallengesFacade=c,t.ChallengesFacade=c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.CreateChallengeUseCase,a.ValidateChallengeUseCase])],c)},7974:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DevicesFacade=void 0;const o=r(7071),a=r(485);let c=class DevicesFacade{constructor(e,t,r,i,n,s,o){this.getDeviceUseCase=e,this.getDevicesUseCase=t,this.createDeviceUseCase=r,this.updateDeviceUseCase=i,this.deleteDeviceUseCase=n,this.getDeviceOnboardingInfoUseCase=s,this.getDeviceOnboardingTokenUseCase=o}async getDevice(e){return await this.getDeviceUseCase.execute(e)}async getDevices(){return await this.getDevicesUseCase.execute()}async createDevice(e){return await this.createDeviceUseCase.execute(e)}async getDeviceOnboardingInfo(e){return await this.getDeviceOnboardingInfoUseCase.execute(e)}async getDeviceOnboardingToken(e){return await this.getDeviceOnboardingTokenUseCase.execute(e)}async updateDevice(e){return await this.updateDeviceUseCase.execute(e)}async deleteDevice(e){return await this.deleteDeviceUseCase.execute(e)}};t.DevicesFacade=c,t.DevicesFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),n("design:paramtypes",[a.GetDeviceUseCase,a.GetDevicesUseCase,a.CreateDeviceUseCase,a.UpdateDeviceUseCase,a.DeleteDeviceUseCase,a.GetDeviceOnboardingInfoUseCase,a.CreateDeviceOnboardingTokenUseCase])],c)},360:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.FilesFacade=void 0;const o=r(7071),a=r(485);let c=class FilesFacade{constructor(e,t,r,i,n,s,o,a){this.uploadOwnFileUseCase=e,this.getOrLoadFileUseCase=t,this.getFilesUseCase=r,this.downloadFileUseCase=i,this.getFileUseCase=n,this.createQrCodeForFileUseCase=s,this.createTokenForFileUseCase=o,this.createTokenQrCodeForFileUseCase=a}async getFiles(e){return await this.getFilesUseCase.execute(e)}async getOrLoadFile(e){return await this.getOrLoadFileUseCase.execute(e)}async downloadFile(e){return await this.downloadFileUseCase.execute(e)}async getFile(e){return await this.getFileUseCase.execute(e)}async uploadOwnFile(e){return await this.uploadOwnFileUseCase.execute(e)}async createQrCodeForFile(e){return await this.createQrCodeForFileUseCase.execute(e)}async createTokenForFile(e){return await this.createTokenForFileUseCase.execute(e)}async createTokenQrCodeForFile(e){return await this.createTokenQrCodeForFileUseCase.execute(e)}};t.FilesFacade=c,t.FilesFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.UploadOwnFileUseCase,a.GetOrLoadFileUseCase,a.GetFilesUseCase,a.DownloadFileUseCase,a.GetFileUseCase,a.CreateQrCodeForFileUseCase,a.CreateTokenForFileUseCase,a.CreateTokenQrCodeForFileUseCase])],c)},1106:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityFacade=void 0;const o=r(7071),a=r(485);let c=class IdentityFacade{constructor(e){this.checkIdentityUseCase=e}async checkIdentity(e){return await this.checkIdentityUseCase.execute(e)}};t.IdentityFacade=c,t.IdentityFacade=c=i([s(0,o.Inject),n("design:paramtypes",[a.CheckIdentityUseCase])],c)},1532:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MessagesFacade=void 0;const o=r(7071),a=r(485);let c=class MessagesFacade{constructor(e,t,r,i,n){this.getMessagesUseCase=e,this.getMessageUseCase=t,this.sendMessageUseCase=r,this.downloadAttachmentUseCase=i,this.getAttachmentMetadataUseCase=n}async sendMessage(e){return await this.sendMessageUseCase.execute(e)}async getMessages(e){return await this.getMessagesUseCase.execute(e)}async getMessage(e){return await this.getMessageUseCase.execute(e)}async downloadAttachment(e){return await this.downloadAttachmentUseCase.execute(e)}async getAttachmentMetadata(e){return await this.getAttachmentMetadataUseCase.execute(e)}};t.MessagesFacade=c,t.MessagesFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.GetMessagesUseCase,a.GetMessageUseCase,a.SendMessageUseCase,a.DownloadAttachmentUseCase,a.GetAttachmentMetadataUseCase])],c)},7349:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplatesFacade=void 0;const o=r(7071),a=r(485);let c=class RelationshipTemplatesFacade{constructor(e,t,r,i,n,s,o){this.createOwnRelationshipTemplateUseCase=e,this.loadPeerRelationshipTemplateUseCase=t,this.getRelationshipTemplatesUseCase=r,this.getRelationshipTemplateUseCase=i,this.createQrCodeForOwnTemplateUseCase=n,this.createTokenQrCodeForOwnTemplateUseCase=s,this.createTokenForOwnTemplateUseCase=o}async createOwnRelationshipTemplate(e){return await this.createOwnRelationshipTemplateUseCase.execute(e)}async loadPeerRelationshipTemplate(e){return await this.loadPeerRelationshipTemplateUseCase.execute(e)}async getRelationshipTemplates(e){return await this.getRelationshipTemplatesUseCase.execute(e)}async getRelationshipTemplate(e){return await this.getRelationshipTemplateUseCase.execute(e)}async createQrCodeForOwnTemplate(e){return await this.createQrCodeForOwnTemplateUseCase.execute(e)}async createTokenQrCodeForOwnTemplate(e){return await this.createTokenQrCodeForOwnTemplateUseCase.execute(e)}async createTokenForOwnTemplate(e){return await this.createTokenForOwnTemplateUseCase.execute(e)}};t.RelationshipTemplatesFacade=c,t.RelationshipTemplatesFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),n("design:paramtypes",[a.CreateOwnRelationshipTemplateUseCase,a.LoadPeerRelationshipTemplateUseCase,a.GetRelationshipTemplatesUseCase,a.GetRelationshipTemplateUseCase,a.CreateQrCodeForOwnTemplateUseCase,a.CreateTokenQrCodeForOwnTemplateUseCase,a.CreateTokenForOwnTemplateUseCase])],c)},8586:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipsFacade=void 0;const o=r(7071),a=r(485);let c=class RelationshipsFacade{constructor(e,t,r,i,n,s,o,a){this.getRelationshipsUseCase=e,this.getRelationshipUseCase=t,this.getRelationshipByAddressUseCase=r,this.createRelationshipUseCase=i,this.acceptRelationshipChangeUseCase=n,this.rejectRelationshipChangeUseCase=s,this.revokeRelationshipChangeUseCase=o,this.getAttributesForRelationshipUseCase=a}async getRelationships(e){return await this.getRelationshipsUseCase.execute(e)}async getRelationship(e){return await this.getRelationshipUseCase.execute(e)}async getRelationshipByAddress(e){return await this.getRelationshipByAddressUseCase.execute(e)}async createRelationship(e){return await this.createRelationshipUseCase.execute(e)}async acceptRelationshipChange(e){return await this.acceptRelationshipChangeUseCase.execute(e)}async rejectRelationshipChange(e){return await this.rejectRelationshipChangeUseCase.execute(e)}async revokeRelationshipChange(e){return await this.revokeRelationshipChangeUseCase.execute(e)}async getAttributesForRelationship(e){return await this.getAttributesForRelationshipUseCase.execute(e)}};t.RelationshipsFacade=c,t.RelationshipsFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.GetRelationshipsUseCase,a.GetRelationshipUseCase,a.GetRelationshipByAddressUseCase,a.CreateRelationshipUseCase,a.AcceptRelationshipChangeUseCase,a.RejectRelationshipChangeUseCase,a.RevokeRelationshipChangeUseCase,a.GetAttributesForRelationshipUseCase])],c)},5392:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TokensFacade=void 0;const o=r(7071),a=r(485);let c=class TokensFacade{constructor(e,t,r,i,n){this.createOwnTokenUseCase=e,this.loadPeerTokenUseCase=t,this.getTokensUseCase=r,this.getTokenUseCase=i,this.getQRCodeForTokenUseCase=n}async createOwnToken(e){return await this.createOwnTokenUseCase.execute(e)}async loadPeerToken(e){return await this.loadPeerTokenUseCase.execute(e)}async getTokens(e){return await this.getTokensUseCase.execute(e)}async getToken(e){return await this.getTokenUseCase.execute(e)}async getQRCodeForToken(e){return await this.getQRCodeForTokenUseCase.execute(e)}};t.TokensFacade=c,t.TokensFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.CreateOwnTokenUseCase,a.LoadPeerTokenUseCase,a.GetTokensUseCase,a.GetTokenUseCase,a.GetQRCodeForTokenUseCase])],c)},9728:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(941),t),n(r(4213),t),n(r(7974),t),n(r(360),t),n(r(1106),t),n(r(1532),t),n(r(8586),t),n(r(7349),t),n(r(5392),t)},5200:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7371),t),n(r(4629),t),n(r(2432),t),n(r(5372),t),n(r(4164),t)},2432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeModule=void 0;t.RuntimeModule=class RuntimeModule{constructor(e,t,r){this.runtime=e,this.configuration=t,this.logger=r,this.subscriptionIds=[]}get name(){return this.configuration.name}get displayName(){return this.configuration.displayName}subscribeToEvent(e,t){const r=this.runtime.eventBus.subscribe(e,t);this.subscriptionIds.push(r)}unsubscribeFromAllEvents(){this.subscriptionIds.forEach((e=>this.runtime.eventBus.unsubscribe(e))),this.subscriptionIds.splice(0)}}},5372:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesIterator=t.RuntimeModuleRegistry=void 0;class RuntimeModuleRegistry{constructor(){this.modules=[]}getByName(e){return this.modules.find((t=>t.name.toLowerCase()===e.toLowerCase()))}add(e){this.modules.push(e)}toArray(){return this.modules.slice()}[Symbol.iterator](){return new ModulesIterator(this.modules)}}t.RuntimeModuleRegistry=RuntimeModuleRegistry;class ModulesIterator{constructor(e){this.items=e,this.currentIndex=0}next(e){return{value:this.items[this.currentIndex++],done:this.currentIndex>this.items.length}}}t.ModulesIterator=ModulesIterator},5590:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2500),t),n(r(4086),t),n(r(2205),t),n(r(5200),t),n(r(9662),t),n(r(6984),t),n(r(9757),t),n(r(986),t),n(r(3377),t),n(r(485),t)},8518:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerModule=void 0;const i=r(5030),n=r(2205),s=r(5200);class AttributeListenerModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.AttributeCreatedEvent,this.handleAttributeCreated.bind(this))}async handleAttributeCreated(e){const t=await this.runtime.getServices(e.eventTargetAddress),r=e.data;if("IdentityAttribute"===r.content["@type"]&&r.shareInfo)return;if("RelationshipAttribute"===r.content["@type"]&&r.content.confidentiality===i.RelationshipAttributeConfidentiality.Private)return;const n=await t.consumptionServices.attributeListeners.getAttributeListeners();if(n.isError)return void this.logger.error("Could not get attribute listeners",n.error);const s=n.value.map((r=>this.createRequestIfAttributeMatchesQuery(t,r,e.data,e.eventTargetAddress)));await Promise.all(s)}async createRequestIfAttributeMatchesQuery(e,t,r,i){if(!await this.doesAttributeMatchQuery(e,t,r))return;const s={"@type":"ShareAttributeRequestItem",attribute:r.content,sourceAttributeId:r.id,mustBeAccepted:!0,metadata:{attributeListenerId:t.id}},o=await e.consumptionServices.outgoingRequests.canCreate({content:{items:[s]},peer:t.peer});if(!o.value.isSuccess)return void this.logger.error("Could not validate outgoing request",o.value);const a=await e.consumptionServices.outgoingRequests.create({content:{items:[s]},peer:t.peer});a.isError?this.logger.error("Could not create request",a.error):this.runtime.eventBus.publish(new n.AttributeListenerTriggeredEvent(i,{attributeListener:t,attribute:r,request:a.value}))}async doesAttributeMatchQuery(e,t,r){const i=t.query;switch(i["@type"]){case"IdentityAttributeQuery":{if("IdentityAttribute"!==r.content["@type"])return!1;const t=await e.consumptionServices.attributes.executeIdentityAttributeQuery({query:i});return t.isError?(this.logger.error("Could not execute IdentityAttributeQuery",t.error),!1):!!t.value.find((e=>e.id===r.id))}case"ThirdPartyRelationshipAttributeQuery":{if("RelationshipAttribute"!==r.content["@type"])return!1;const t=await e.consumptionServices.attributes.executeThirdPartyRelationshipAttributeQuery({query:i});return t.isError?(this.logger.error("Could not execute ThirdPartyRelationshipAttributeQuery",t.error),!1):t.value.some((e=>e.id===r.id))}}}stop(){this.unsubscribeFromAllEvents()}}t.AttributeListenerModule=AttributeListenerModule},4777:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeciderModule=void 0;const i=r(3850),n=r(2205),s=r(5200);class DeciderModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.IncomingRequestStatusChangedEvent,this.handleIncomingRequestStatusChanged.bind(this))}async handleIncomingRequestStatusChanged(e){if(e.data.newStatus===i.LocalRequestStatus.DecisionRequired)return e.data.request.content.items.some(flaggedAsManualDecisionRequired),await this.requireManualDecision(e)}async requireManualDecision(e){const t=e.data.request,r=await this.runtime.getServices(e.eventTargetAddress),i=await r.consumptionServices.incomingRequests.requireManualDecision({requestId:t.id});if(i.isError)return this.logger.error(`Could not require manual decision for request ${t.id}`,i.error),void await this.publishEvent(e,r,"Error");await this.publishEvent(e,r,"ManualRequestDecisionRequired",t.id)}async publishEvent(e,t,r,i){const s=e.data.request;switch(s.source.type){case"RelationshipTemplate":const o=(await t.transportServices.relationshipTemplates.getRelationshipTemplate({id:s.source.reference})).value;if("NoRequest"!==r&&"Error"!==r||this.runtime.eventBus.publish(new n.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:o,result:r})),"ManualRequestDecisionRequired"===r){if(!i)throw new Error("Request ID is required for manual decision required result.");this.runtime.eventBus.publish(new n.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:o,result:r,requestId:i}))}break;case"Message":const a=await t.transportServices.messages.getMessage({id:s.source.reference}),c={...a.value,attachments:a.value.attachments.map((e=>e.id))};this.runtime.eventBus.publish(new n.MessageProcessedEvent(e.eventTargetAddress,c,r))}}stop(){this.unsubscribeFromAllEvents()}}function flaggedAsManualDecisionRequired(e){return e.requireManualDecision??e.items?.some((e=>e.requireManualDecision))}t.DeciderModule=DeciderModule},6432:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageModule=void 0;const i=r(5030),n=r(2205),s=r(2432);class MessageModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.MessageReceivedEvent,this.handleMessageReceived.bind(this))}async handleMessageReceived(e){const t=e.data;this.logger.trace(`Incoming MessageReceivedEvent for ${t.id}`);let r;if("Mail"!==t.content["@type"])return;{const s=i.Mail.from(t.content);r=new n.MailReceivedEvent(e.eventTargetAddress,s,t),this.runtime.eventBus.publish(r),this.logger.trace(`Published MailReceivedEvent for ${t.id}`)}const s=await this.runtime.getServices(e.eventTargetAddress),o=await s.transportServices.relationships.getRelationshipByAddress({address:t.createdBy});if(!o.isSuccess)return void this.logger.error(`Could not find relationship for address '${t.createdBy}'.`,o.error);const a=o.value;this.runtime.eventBus.publish(new n.RelationshipEvent(e.eventTargetAddress,r,a)),this.logger.trace(`Published RelationshipEvent for ${t.id} to ${a.id}`)}stop(){this.unsubscribeFromAllEvents()}}t.MessageModule=MessageModule},7570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestModule=void 0;const i=r(3850),n=r(5030),s=r(2205),o=r(1908),a=r(2432),c=r(3377);class RequestModule extends a.RuntimeModule{init(){}start(){this.subscribeToEvent(s.PeerRelationshipTemplateLoadedEvent,this.handlePeerRelationshipTemplateLoaded.bind(this)),this.subscribeToEvent(s.MessageReceivedEvent,this.handleMessageReceivedEvent.bind(this)),this.subscribeToEvent(s.MessageSentEvent,this.handleMessageSentEvent.bind(this)),this.subscribeToEvent(s.IncomingRequestStatusChangedEvent,this.handleIncomingRequestStatusChanged.bind(this)),this.subscribeToEvent(s.RelationshipChangedEvent,this.handleRelationshipChangedEvent.bind(this))}async handlePeerRelationshipTemplateLoaded(e){const t=e.data;if("RelationshipTemplateContent"!==t.content["@type"])return void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.NoRequest}));const r=t.content,n=await this.runtime.getServices(e.eventTargetAddress),s=(await n.consumptionServices.incomingRequests.getRequests({query:{"source.reference":t.id}})).value.filter((e=>e.status!==i.LocalRequestStatus.Completed));if(0!==s.length)return this.logger.info(`There is already an open Request for the RelationshipTemplate '${t.id}'.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.NonCompletedRequestExists,requestId:s[0].id}));const a=(await n.transportServices.relationships.getRelationships({query:{peer:t.createdBy}})).value,u=a.filter((e=>e.status===c.RelationshipStatus.Pending));if(0!==u.length)return this.logger.info(`There is already a pending Relationship for the RelationshipTemplate '${t.id}'. Skipping creation of a new request.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.RelationshipExists,relationshipId:u[0].id}));const p=a.filter((e=>e.status===c.RelationshipStatus.Active));if(0!==p.length){if(r.onExistingRelationship){return void(await this.createIncomingRequest(n,r.onExistingRelationship,t.id)||this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.Error})))}return this.logger.info(`There is already an open Relationship for the RelationshipTemplate '${t.id}' and onExistingRelationship is not defined. Skipping creation of a new request.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.RelationshipExists,relationshipId:p[0].id}))}await this.createIncomingRequest(n,r.onNewRelationship,t.id)||this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.Error}))}async handleMessageReceivedEvent(e){const t=await this.runtime.getServices(e.eventTargetAddress),r=e.data,i=r.content["@type"];switch(i){case"Request":await this.createIncomingRequest(t,r.content,r.id);break;case"Response":await this.completeExistingRequestWithResponseReceivedByMessage(t,r.id,r.content);break;case"ResponseWrapper":const e=r.content;if("Message"===e.requestSourceType){await this.completeExistingRequestWithResponseReceivedByMessage(t,r.id,e.response);break}await t.consumptionServices.outgoingRequests.createAndCompleteFromRelationshipTemplateResponse({responseSourceId:r.id,templateId:e.requestSourceReference,response:e.response})}"Request"!==i&&this.runtime.eventBus.publish(new s.MessageProcessedEvent(e.eventTargetAddress,r,s.MessageProcessedResult.NoRequest))}async completeExistingRequestWithResponseReceivedByMessage(e,t,r){const i=await e.consumptionServices.outgoingRequests.complete({receivedResponse:r,messageId:t});i.isError&&this.logger.error(`Could not complete outgoing request for message id ${t} due to ${i.error}. Root error:`,i.error)}async handleMessageSentEvent(e){const t=e.data;if("Request"!==t.content["@type"])return;const r=await this.runtime.getServices(e.eventTargetAddress),i=t.content,n=await r.consumptionServices.outgoingRequests.sent({requestId:i.id,messageId:t.id});n.isError&&this.logger.error(`Could not mark request '${i.id}' as sent using message '${t.id}'. Root error:`,n.error)}async createIncomingRequest(e,t,r){const i=await e.consumptionServices.incomingRequests.received({receivedRequest:t,requestSourceId:r});if(i.isError)return this.logger.error(`Could not receive request ${t.id}. Root error:`,i.error),!1;const n=await e.consumptionServices.incomingRequests.checkPrerequisites({requestId:i.value.id});return!n.isError||(this.logger.error(`Could not check prerequisites for request ${t.id}. Root error:`,n.error),!1)}async handleIncomingRequestStatusChanged(e){if(e.data.newStatus!==i.LocalRequestStatus.Decided)return;const t=e.data.request;switch(t.source.type){case"RelationshipTemplate":await this.handleIncomingRequestDecidedForRelationshipTemplate(e);break;case"Message":await this.handleIncomingRequestDecidedForMessage(e);break;default:throw new Error(`Cannot handle source.type '${t.source.type}'.`)}}async handleIncomingRequestDecidedForRelationshipTemplate(e){const t=e.data.request,r=await this.runtime.getServices(e.eventTargetAddress);0===(await r.transportServices.relationships.getRelationships({query:{peer:e.data.request.peer,status:c.RelationshipStatus.Active}})).value.length?await this.respondToRequestViaRelationship(t,e.eventTargetAddress):await this.respondToRequestViaMessage(t,e.eventTargetAddress)}async respondToRequestViaRelationship(e,t){const r=await this.runtime.getServices(t),i=e.source.reference;if(e.response.content.result===n.ResponseResult.Rejected)return void await r.consumptionServices.incomingRequests.complete({requestId:e.id});const s=n.RelationshipCreationChangeRequestContent.from({response:e.response.content}),o=await r.transportServices.relationships.createRelationship({templateId:i,content:s});if(o.isError)return void this.logger.error(`Could not create relationship for templateId '${i}'. Root error:`,o.error);const a=e.id,c=await r.consumptionServices.incomingRequests.complete({requestId:a,responseSourceId:o.value.changes[0].id});c.isError&&this.logger.error(`Could not complete the request '${a}'. Root error:`,c.error)}async respondToRequestViaMessage(e,t){const r=e.id,i=await this.runtime.getServices(t),s=n.ResponseWrapper.from({response:e.response.content,requestId:r,requestSourceReference:e.source.reference,requestSourceType:e.source.type}).toJSON(),o=await i.transportServices.messages.sendMessage({recipients:[e.peer],content:s});if(o.isError)return void this.logger.error(`Could not send message to answer the request '${r}'.`,o.error);const a=await i.consumptionServices.incomingRequests.complete({requestId:r,responseSourceId:o.value.id});a.isError&&this.logger.error(`Could not complete the request '${r}'. Root error:`,a.error)}async handleIncomingRequestDecidedForMessage(e){await this.respondToRequestViaMessage(e.data.request,e.eventTargetAddress)}async handleRelationshipChangedEvent(e){const t=e.data;if(t.status!==c.RelationshipStatus.Pending||!t.template.isOwn)return;const r=await this.runtime.getServices(e.eventTargetAddress),i=t.template,n=i.id;if("RelationshipTemplateContent"!==i.content["@type"])return;const s=t.changes[0],o=s.id;if("RelationshipCreationChangeRequestContent"!==s.request.content["@type"])return;const a=s.request.content,u=await r.consumptionServices.outgoingRequests.createAndCompleteFromRelationshipTemplateResponse({templateId:n,responseSourceId:o,response:a.response});u.isError&&this.logger.error(`Could not create and complete request for templateId '${n}' and changeId '${o}'. Root error:`,u.error)}stop(){this.unsubscribeFromAllEvents()}}t.RequestModule=RequestModule},9662:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8518),t),n(r(4777),t),n(r(6432),t),n(r(7570),t)},5953:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5292:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2693:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7118:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9371:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7564:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7946:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5292),t),n(r(2693),t),n(r(7118),t),n(r(8678),t),n(r(9371),t),n(r(7564),t)},3377:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7946),t),n(r(5953),t),n(r(450),t)},3456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7891:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3462:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6261:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},641:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2944:(e,t)=>{"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipChangeType=t.RelationshipChangeStatus=void 0,function(e){e.Pending="Pending",e.Rejected="Rejected",e.Revoked="Revoked",e.Accepted="Accepted"}(r||(t.RelationshipChangeStatus=r={})),function(e){e.Creation="Creation",e.Termination="Termination",e.TerminationCancellation="TerminationCancellation"}(i||(t.RelationshipChangeType=i={}))},2220:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipStatus=void 0,function(e){e.Pending="Pending",e.Active="Active",e.Rejected="Rejected",e.Revoked="Revoked",e.Terminating="Terminating",e.Terminated="Terminated"}(r||(t.RelationshipStatus=r={}))},6081:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},450:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3456),t),n(r(7891),t),n(r(9475),t),n(r(3462),t),n(r(6261),t),n(r(6623),t),n(r(641),t),n(r(5968),t),n(r(2944),t),n(r(2220),t),n(r(6081),t),n(r(4561),t)},9365:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7771),t)},807:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenAnonymousByIdAndKeyUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(7121);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenAnonymousByIdAndKeyRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class LoadPeerTokenAnonymousByIdAndKeyUseCase extends p.UseCase{constructor(e,t){super(t),this.anonymousTokenController=e}async executeInternal(e){const t=a.CryptoSecretKey.fromBase64(e.secretKey),r=await this.anonymousTokenController.loadPeerToken(c.CoreId.from(e.id),t);return o.Result.ok(l.TokenMapper.toTokenDTO(r,!0))}};t.LoadPeerTokenAnonymousByIdAndKeyUseCase=f,t.LoadPeerTokenAnonymousByIdAndKeyUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[c.AnonymousTokenController,d])],f)},6297:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenAnonymousByTruncatedReferenceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class LoadPeerTokenAnonymousByTruncatedReferenceUseCase extends u.UseCase{constructor(e,t){super(t),this.anonymousTokenController=e}async executeInternal(e){const t=await this.anonymousTokenController.loadPeerTokenByTruncated(e.reference);return o.Result.ok(p.TokenMapper.toTokenDTO(t,!0))}};t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=d,t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.AnonymousTokenController,l])],d)},7771:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(807),t),n(r(6297),t)},2627:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Base64ForIdPrefix=void 0,function(e){e.RelationshipTemplate="UkxU",e.Token="VE9L",e.File="RklM"}(r||(t.Base64ForIdPrefix=r={}))},6819:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.OwnerRestriction=void 0,function(e){e.Own="o",e.Peer="p"}(r||(t.OwnerRestriction=r={}))},8728:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformErrorCodes=void 0;class PlatformErrorCodes{static isNotFoundError(e){return e.code===PlatformErrorCodes.NOT_FOUND}static isValidationError(e){return e.code.startsWith("error.platform.validation")}static isUnexpectedError(e){return e.code.startsWith("error.platform.validation")}}t.PlatformErrorCodes=PlatformErrorCodes,PlatformErrorCodes.NOT_FOUND="error.platform.recordNotFound",PlatformErrorCodes.UNAUTHORIZED="error.platform.unauthorized",PlatformErrorCodes.FORBIDDEN="error.platform.forbidden",PlatformErrorCodes.INVALID_PROPERTY_VALUE="error.platform.invalidPropertyValue",PlatformErrorCodes.UNEXPECTED="error.platform.unexpected"},3832:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.QRCode=void 0;const o=s(r(2592));class QRCode{constructor(e){this.base64=e}asBase64(){return this.base64}static async from(e,t){const r=(await o.toDataURL(`nmshd://${t}#${e}`)).split(",")[1];return new QRCode(r)}static async forTruncateable(e){return await this.from(e.truncate(),"tr")}}t.QRCode=QRCode},6595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeErrors=void 0;const i=r(5172),n=r(2627);class RuntimeErrors{}t.RuntimeErrors=RuntimeErrors,RuntimeErrors.general=new class General{unknown(e,t){return new i.ApplicationError("error.runtime.unknown",e,t)}alreadyInitialized(){return new i.ApplicationError("error.runtime.alreadyInitialized","The runtime is already initialized. The init method can only be executed once.")}notInitialized(){return new i.ApplicationError("error.runtime.notInitialized","The runtime is not initialized. You must run init before you can start or stop the runtime.")}alreadyStarted(){return new i.ApplicationError("error.runtime.alreadyStarted","The runtime is already started. You should stop it first for a restart.")}notStarted(){return new i.ApplicationError("error.runtime.notStarted","The runtime is not started. You can only stop the runtime if you executed start before.")}recordNotFound(e){return this.recordNotFoundWithMessage(`${e instanceof Function?e.name:e} not found. Make sure the ID exists and the record is not expired.`)}recordNotFoundWithMessage(e){return new i.ApplicationError("error.runtime.recordNotFound",e)}invalidPropertyValue(e){return new i.ApplicationError("error.runtime.validation.invalidPropertyValue",e)}invalidPayload(e){return new i.ApplicationError("error.runtime.validation.invalidPayload",e??"The given combination of properties in the payload is not supported.")}notSupported(e){return new i.ApplicationError("error.runtime.notSupported",e)}invalidTokenContent(){return new i.ApplicationError("error.runtime.invalidTokenContent","The given token has an invalid content for this route.")}cacheEmpty(e,t){return new i.ApplicationError("error.runtime.cacheEmpty",`The cache of ${e instanceof Function?e.name:e} with id '${t}' is empty.`)}},RuntimeErrors.serval=new class Serval{unknownType(e){return new i.ApplicationError("error.runtime.unknownType",e)}general(e){return new i.ApplicationError("error.runtime.servalError",e)}requestDeserialization(e){return new i.ApplicationError("error.runtime.requestDeserialization",e)}},RuntimeErrors.startup=new class Startup{noActiveAccount(){return new i.ApplicationError("error.runtime.startup.noActiveAccount","No AccountController could be found. You might have to login first.")}noActiveConsumptionController(){return new i.ApplicationError("error.runtime.startup.noActiveConsumptionController","No ConsumptionController could be found. You might have to login first.")}noActiveExpander(){return new i.ApplicationError("error.runtime.startup.noActiveExpander","No DataViewExpander could be found. You might have to login first.")}},RuntimeErrors.files=new class Files{invalidReference(e){return new i.ApplicationError("error.runtime.files.invalidReference",`The given reference '${e}' is not valid. The reference for a file must start with '${n.Base64ForIdPrefix.Token}' or '${n.Base64ForIdPrefix.File}'.`)}},RuntimeErrors.relationshipTemplates=new class RelationshipTemplates{cannotCreateTokenForPeerTemplate(){return new i.ApplicationError("error.runtime.relationshipTemplates.cannotCreateTokenForPeerTemplate","You cannot create a token for a peer template.")}cannotCreateQRCodeForPeerTemplate(){return new i.ApplicationError("error.runtime.relationshipTemplates.cannotCreateQRCodeForPeerTemplate","You cannot create a QRCode for a peer template.")}invalidReference(e){return new i.ApplicationError("error.runtime.relationshipTemplates.invalidReference",`The given reference '${e}' is not valid. The reference for a relationship template must start with '${n.Base64ForIdPrefix.Token}' or '${n.Base64ForIdPrefix.RelationshipTemplate}'.`)}},RuntimeErrors.messages=new class Messages{fileNotFoundInMessage(e){return new i.ApplicationError("error.runtime.messages.fileNotFoundInMessage",`The requested file '${e}' was not found in the given message.`)}},RuntimeErrors.challenges=new class Challenges{invalidSignature(){return new i.ApplicationError("error.runtime.challenges.invalidSignature","The signature is invalid.")}invalidChallengeString(){return new i.ApplicationError("error.runtime.challenges.invalidChallenge","The challengeString is invalid.")}}},2746:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonSchema=t.SchemaRepository=void 0;const a=o(r(1581)),c=o(r(3351)),u=o(r(5477));t.SchemaRepository=class SchemaRepository{constructor(){this.jsonSchemas=new Map,this.compiler=new a.default({allErrors:!0,allowUnionTypes:!0}),(0,u.default)(this.compiler),(0,c.default)(this.compiler)}async loadSchemas(){this.schemaDefinitions=await Promise.resolve().then((()=>s(r(1873))))}getSchema(e){return this.jsonSchemas.has(e)||this.jsonSchemas.set(e,new JsonSchema(this.getValidationFunction(e))),this.jsonSchemas.get(e)}getValidationFunction(e){return this.compiler.compile(this.getSchemaDefinition(e))}getSchemaDefinition(e){const t=this.schemaDefinitions[e];if(!t)throw new Error(`Schema ${e} not found`);return t}};class JsonSchema{constructor(e){this.validateSchema=e}validate(e){return{isValid:this.validateSchema(e),errors:this.validateSchema.errors?[...this.validateSchema.errors]:void 0}}}t.JsonSchema=JsonSchema},1873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadAttachmentRequest=t.SyncDatawalletRequest=t.RegisterPushNotificationTokenRequest=t.LoadItemFromTruncatedReferenceRequest=t.DownloadFileRequest=t.UpdateSettingRequest=t.GetSettingsRequest=t.GetSettingByKeyRequest=t.GetSettingRequest=t.DeleteSettingRequest=t.CreateSettingRequest=t.UpdateDraftRequest=t.GetDraftsRequest=t.GetDraftRequest=t.DeleteDraftRequest=t.CreateDraftRequest=t.ValidateIQLQueryRequest=t.UpdateAttributeRequest=t.SucceedAttributeRequest=t.ShareAttributeRequest=t.SentOutgoingRequestRequest=t.RequireManualDecisionOfIncomingRequestRequest=t.ReceivedIncomingRequestRequest=t.GetOutgoingRequestsRequest=t.GetOutgoingRequestRequest=t.GetIncomingRequestsRequest=t.GetIncomingRequestRequest=t.DiscardOutgoingRequestRequest=t.CreateOutgoingRequestRequest=t.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseRequest=t.CompleteOutgoingRequestRequest=t.CompleteIncomingRequestRequest=t.CheckPrerequisitesOfIncomingRequestRequest=t.RejectIncomingRequestRequest=t.CanCreateOutgoingRequestRequest=t.AcceptIncomingRequestRequest=t.GetSharedToPeerAttributesRequest=t.GetPeerAttributesRequest=t.GetAttributesRequest=t.GetAttributeRequest=t.ExecuteThirdPartyRelationshipAttributeQueryRequest=t.ExecuteRelationshipAttributeQueryRequest=t.ExecuteIQLQueryRequest=t.ExecuteIdentityAttributeQueryRequest=t.DeleteAttributeRequest=t.CreateSharedAttributeCopyRequest=t.CreateAttributeRequest=t.GetAttributeListenerRequest=t.LoadPeerTokenAnonymousByTruncatedReferenceRequest=t.LoadPeerTokenAnonymousByIdAndKeyRequest=void 0,t.LoadPeerTokenViaSecretRequest=t.LoadPeerTokenViaReferenceRequest=t.GetTokensRequest=t.GetTokenRequest=t.GetQRCodeForTokenRequest=t.CreateOwnTokenRequest=t.LoadPeerRelationshipTemplateRequest=t.LoadPeerRelationshipTemplateViaReferenceRequest=t.LoadPeerRelationshipTemplateViaSecretRequest=t.GetRelationshipTemplatesRequest=t.GetRelationshipTemplateRequest=t.CreateTokenQrCodeForOwnTemplateRequest=t.CreateTokenForOwnTemplateRequest=t.CreateQrCodeForOwnTemplateRequest=t.CreateOwnRelationshipTemplateRequest=t.RevokeRelationshipChangeRequest=t.RejectRelationshipChangeRequest=t.GetRelationshipsRequest=t.GetRelationshipByAddressRequest=t.GetRelationshipRequest=t.GetAttributesForRelationshipRequest=t.CreateRelationshipRequest=t.AcceptRelationshipChangeRequest=t.SendMessageRequest=t.GetMessagesRequest=t.GetMessageRequest=t.GetAttachmentMetadataRequest=t.CheckIdentityRequest=t.UploadOwnFileValidatableRequest=t.UploadOwnFileRequest=t.GetOrLoadFileRequest=t.GetOrLoadFileViaReferenceRequest=t.GetOrLoadFileViaSecretRequest=t.GetFilesRequest=t.GetFileRequest=t.CreateTokenQrCodeForFileRequest=t.CreateTokenForFileRequest=t.CreateQrCodeForFileRequest=t.UpdateDeviceRequest=t.GetDeviceOnboardingInfoRequest=t.GetDeviceRequest=t.DeleteDeviceRequest=t.CreateDeviceOnboardingTokenRequest=t.CreateDeviceRequest=t.ValidateChallengeRequest=t.CreateChallengeRequest=t.CreateDeviceChallengeRequest=t.CreateIdentityChallengeRequest=t.CreateRelationshipChallengeRequest=t.SyncEverythingRequest=void 0,t.LoadPeerTokenRequest=void 0,t.LoadPeerTokenAnonymousByIdAndKeyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByIdAndKeyRequest",definitions:{LoadPeerTokenAnonymousByIdAndKeyRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string"}},required:["id","secretKey"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.LoadPeerTokenAnonymousByTruncatedReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByTruncatedReferenceRequest",definitions:{LoadPeerTokenAnonymousByTruncatedReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"}},required:["reference"],additionalProperties:!1},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"}}},t.GetAttributeListenerRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeListenerRequest",definitions:{GetAttributeListenerRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeListenerIdString"}},required:["id"],additionalProperties:!1},AttributeListenerIdString:{type:"string",pattern:"ATL[A-Za-z0-9]{17}"}}},t.CreateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateAttributeRequest",definitions:{CreateAttributeRequest:{type:"object",properties:{content:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["content"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]}}},t.CreateSharedAttributeCopyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSharedAttributeCopyRequest",definitions:{CreateSharedAttributeCopyRequest:{type:"object",properties:{attributeId:{$ref:"#/definitions/AttributeIdString"},peer:{$ref:"#/definitions/AddressString"},requestReference:{$ref:"#/definitions/RequestIdString"}},required:["attributeId","peer","requestReference"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.DeleteAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteAttributeRequest",definitions:{DeleteAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"}},required:["id"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.ExecuteIdentityAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteIdentityAttributeQueryRequest",definitions:{ExecuteIdentityAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IIdentityAttributeQuery"},{$ref:"#/definitions/IdentityAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IIdentityAttributeQuery:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","valueType"],additionalProperties:!1}}},t.ExecuteIQLQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteIQLQueryRequest",definitions:{ExecuteIQLQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IIQLQuery"},{$ref:"#/definitions/IQLQueryJSON"}]}},required:["query"],additionalProperties:!1},IIQLQuery:{type:"object",properties:{queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IIQLQueryCreationHints"}},required:["queryString"],additionalProperties:!1},IIQLQueryCreationHints:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},IQLQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IQLQuery"},"@context":{type:"string"},"@version":{type:"string"},queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IQLQueryCreationHintsJSON"}},required:["@type","queryString"],additionalProperties:!1},IQLQueryCreationHintsJSON:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1}}},t.ExecuteRelationshipAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteRelationshipAttributeQueryRequest",definitions:{ExecuteRelationshipAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IRelationshipAttributeQuery"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IRelationshipAttributeQuery:{type:"object",properties:{key:{type:"string"},owner:{$ref:"#/definitions/ICoreAddress"},attributeCreationHints:{$ref:"#/definitions/IRelationshipAttributeCreationHints"},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["key","owner","attributeCreationHints"],additionalProperties:!1},ICoreAddress:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1},IRelationshipAttributeCreationHints:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/IValueHints"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","ProprietaryXML","Consent"]},IValueHints:{type:"object",properties:{editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/IValueHintsValue"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/IValueHints"}}},additionalProperties:!1},IValueHintsValue:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1}}},t.ExecuteThirdPartyRelationshipAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteThirdPartyRelationshipAttributeQueryRequest",definitions:{ExecuteThirdPartyRelationshipAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IThirdPartyRelationshipAttributeQuery"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IThirdPartyRelationshipAttributeQuery:{type:"object",properties:{key:{type:"string"},owner:{$ref:"#/definitions/ICoreAddress"},thirdParty:{type:"array",items:{$ref:"#/definitions/ICoreAddress"}},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["key","owner","thirdParty"],additionalProperties:!1},ICoreAddress:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1}}},t.GetAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeRequest",definitions:{GetAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"}},required:["id"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.GetAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesRequest",definitions:{GetAttributesRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetAttributesRequestQuery"},onlyValid:{type:"boolean"},hideTechnical:{type:"boolean"}},additionalProperties:!1},GetAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},parentId:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.owner":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeeds:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeededBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.peer":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.sourceAttribute":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetPeerAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetPeerAttributesRequest",definitions:{GetPeerAttributesRequest:{type:"object",properties:{peer:{type:"string"},onlyValid:{type:"boolean"},query:{$ref:"#/definitions/GetPeerAttributesRequestQuery"},hideTechnical:{type:"boolean"}},required:["peer"],additionalProperties:!1},GetPeerAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetSharedToPeerAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedToPeerAttributesRequest",definitions:{GetSharedToPeerAttributesRequest:{type:"object",properties:{peer:{type:"string"},onlyValid:{type:"boolean"},query:{$ref:"#/definitions/GetSharedToPeerAttributesRequestQuery"},hideTechnical:{type:"boolean"}},required:["peer"],additionalProperties:!1},GetSharedToPeerAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.sourceAttribute":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.AcceptIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/AcceptIncomingRequestRequest",definitions:{AcceptIncomingRequestRequest:{type:"object",additionalProperties:!1,properties:{requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/DecideRequestItemParametersJSON"},{$ref:"#/definitions/DecideRequestItemGroupParametersJSON"}]}}},required:["items","requestId"]},DecideRequestItemParametersJSON:{anyOf:[{$ref:"#/definitions/AcceptRequestItemParametersJSON"},{$ref:"#/definitions/RejectRequestItemParametersJSON"}]},AcceptRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!0}},required:["accept"],additionalProperties:!1},RejectRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!1},code:{type:"string"},message:{type:"string"}},required:["accept"],additionalProperties:!1},DecideRequestItemGroupParametersJSON:{type:"object",properties:{items:{type:"array",items:{$ref:"#/definitions/DecideRequestItemParametersJSON"}}},required:["items"],additionalProperties:!1}}},t.CanCreateOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CanCreateOutgoingRequestRequest",definitions:{CanCreateOutgoingRequestRequest:{type:"object",properties:{content:{type:"object",properties:{expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."},"@context":{type:"string"}},required:["items"],additionalProperties:!1},peer:{$ref:"#/definitions/AddressString"}},required:["content"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/FreeTextRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","ProprietaryXML","Consent"]},IQLQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IQLQuery"},"@context":{type:"string"},"@version":{type:"string"},queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IQLQueryCreationHintsJSON"}},required:["@type","queryString"],additionalProperties:!1},IQLQueryCreationHintsJSON:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},FreeTextRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"FreeTextRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},freeText:{type:"string"}},required:["@type","freeText","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.RejectIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RejectIncomingRequestRequest",definitions:{RejectIncomingRequestRequest:{type:"object",additionalProperties:!1,properties:{requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/DecideRequestItemParametersJSON"},{$ref:"#/definitions/DecideRequestItemGroupParametersJSON"}]}}},required:["items","requestId"]},DecideRequestItemParametersJSON:{anyOf:[{$ref:"#/definitions/AcceptRequestItemParametersJSON"},{$ref:"#/definitions/RejectRequestItemParametersJSON"}]},AcceptRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!0}},required:["accept"],additionalProperties:!1},RejectRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!1},code:{type:"string"},message:{type:"string"}},required:["accept"],additionalProperties:!1},DecideRequestItemGroupParametersJSON:{type:"object",properties:{items:{type:"array",items:{$ref:"#/definitions/DecideRequestItemParametersJSON"}}},required:["items"],additionalProperties:!1}}},t.CheckPrerequisitesOfIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CheckPrerequisitesOfIncomingRequestRequest",definitions:{CheckPrerequisitesOfIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.CompleteIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CompleteIncomingRequestRequest",definitions:{CompleteIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"},responseSourceId:{anyOf:[{$ref:"#/definitions/MessageIdString"},{$ref:"#/definitions/RelationshipChangeIdString"}]}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CompleteOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CompleteOutgoingRequestRequest",definitions:{CompleteOutgoingRequestRequest:{type:"object",properties:{receivedResponse:{$ref:"#/definitions/ResponseJSON"},messageId:{$ref:"#/definitions/MessageIdString"}},required:["receivedResponse","messageId"],additionalProperties:!1},ResponseJSON:{type:"object",properties:{"@type":{type:"string",const:"Response"},"@context":{type:"string"},"@version":{type:"string"},result:{$ref:"#/definitions/ResponseResult"},requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/ResponseItemGroupJSON"},{$ref:"#/definitions/ResponseItemJSONDerivations"}]}}},required:["@type","items","requestId","result"],additionalProperties:!1},ResponseResult:{type:"string",enum:["Accepted","Rejected"]},ResponseItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"ResponseItemGroup"},"@context":{type:"string"},"@version":{type:"string"},items:{type:"array",items:{$ref:"#/definitions/ResponseItemJSONDerivations"}}},required:["@type","items"],additionalProperties:!1},ResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSONDerivations"},{$ref:"#/definitions/RejectResponseItemJSONDerivations"},{$ref:"#/definitions/ErrorResponseItemJSONDerivations"}]},AcceptResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSON"},{$ref:"#/definitions/CreateAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ShareAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ProposeAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ReadAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerAcceptResponseItemJSON"},{$ref:"#/definitions/FreeTextAcceptResponseItemJSON"}]},AcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"}},required:["@type","result"],additionalProperties:!1},CreateAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ShareAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ProposeAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},ReadAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},RegisterAttributeListenerAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},listenerId:{type:"string"}},required:["@type","listenerId","result"],additionalProperties:!1},FreeTextAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"FreeTextAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},freeText:{type:"string"}},required:["@type","freeText","result"],additionalProperties:!1},RejectResponseItemJSONDerivations:{$ref:"#/definitions/RejectResponseItemJSON"},RejectResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RejectResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Rejected"},code:{type:"string"},message:{type:"string"}},required:["@type","result"],additionalProperties:!1},ErrorResponseItemJSONDerivations:{$ref:"#/definitions/ErrorResponseItemJSON"},ErrorResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ErrorResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Error"},code:{type:"string"},message:{type:"string"}},required:["@type","code","message","result"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseRequest",definitions:{CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},responseSourceId:{anyOf:[{$ref:"#/definitions/RelationshipChangeIdString"},{$ref:"#/definitions/MessageIdString"}]},response:{$ref:"#/definitions/ResponseJSON"}},required:["templateId","responseSourceId","response"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},ResponseJSON:{type:"object",properties:{"@type":{type:"string",const:"Response"},"@context":{type:"string"},"@version":{type:"string"},result:{$ref:"#/definitions/ResponseResult"},requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/ResponseItemGroupJSON"},{$ref:"#/definitions/ResponseItemJSONDerivations"}]}}},required:["@type","items","requestId","result"],additionalProperties:!1},ResponseResult:{type:"string",enum:["Accepted","Rejected"]},ResponseItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"ResponseItemGroup"},"@context":{type:"string"},"@version":{type:"string"},items:{type:"array",items:{$ref:"#/definitions/ResponseItemJSONDerivations"}}},required:["@type","items"],additionalProperties:!1},ResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSONDerivations"},{$ref:"#/definitions/RejectResponseItemJSONDerivations"},{$ref:"#/definitions/ErrorResponseItemJSONDerivations"}]},AcceptResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSON"},{$ref:"#/definitions/CreateAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ShareAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ProposeAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ReadAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerAcceptResponseItemJSON"},{$ref:"#/definitions/FreeTextAcceptResponseItemJSON"}]},AcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"}},required:["@type","result"],additionalProperties:!1},CreateAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ShareAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ProposeAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},ReadAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},RegisterAttributeListenerAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},listenerId:{type:"string"}},required:["@type","listenerId","result"],additionalProperties:!1},FreeTextAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"FreeTextAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},freeText:{type:"string"}},required:["@type","freeText","result"],additionalProperties:!1},RejectResponseItemJSONDerivations:{$ref:"#/definitions/RejectResponseItemJSON"},RejectResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RejectResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Rejected"},code:{type:"string"},message:{type:"string"}},required:["@type","result"],additionalProperties:!1},ErrorResponseItemJSONDerivations:{$ref:"#/definitions/ErrorResponseItemJSON"},ErrorResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ErrorResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Error"},code:{type:"string"},message:{type:"string"}},required:["@type","code","message","result"],additionalProperties:!1}}},t.CreateOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOutgoingRequestRequest",definitions:{CreateOutgoingRequestRequest:{type:"object",properties:{content:{type:"object",properties:{expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."},"@context":{type:"string"}},required:["items"],additionalProperties:!1},peer:{$ref:"#/definitions/AddressString"}},required:["content","peer"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/FreeTextRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","ProprietaryXML","Consent"]},IQLQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IQLQuery"},"@context":{type:"string"},"@version":{type:"string"},queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IQLQueryCreationHintsJSON"}},required:["@type","queryString"],additionalProperties:!1},IQLQueryCreationHintsJSON:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},FreeTextRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"FreeTextRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},freeText:{type:"string"}},required:["@type","freeText","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.DiscardOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DiscardOutgoingRequestRequest",definitions:{DiscardOutgoingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetIncomingRequestRequest",definitions:{GetIncomingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetIncomingRequestsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetIncomingRequestsRequest",definitions:{GetIncomingRequestsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetIncomingRequestsRequestQuery"}},additionalProperties:!1},GetIncomingRequestsRequestQuery:{type:"object",properties:{id:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.expiresAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.createdAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.result":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOutgoingRequestRequest",definitions:{GetOutgoingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetOutgoingRequestsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOutgoingRequestsRequest",definitions:{GetOutgoingRequestsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetOutgoingRequestsRequestQuery"}},additionalProperties:!1},GetOutgoingRequestsRequestQuery:{type:"object",properties:{id:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.expiresAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.createdAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.result":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.ReceivedIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ReceivedIncomingRequestRequest",definitions:{ReceivedIncomingRequestRequest:{type:"object",properties:{receivedRequest:{$ref:"#/definitions/RequestJSON"},requestSourceId:{anyOf:[{$ref:"#/definitions/MessageIdString"},{$ref:"#/definitions/RelationshipTemplateIdString"}]}},required:["receivedRequest","requestSourceId"],additionalProperties:!1},RequestJSON:{type:"object",properties:{"@type":{type:"string",const:"Request"},"@context":{type:"string"},"@version":{type:"string"},id:{type:"string"},expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."}},required:["@type","items"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/FreeTextRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","ProprietaryXML","Consent"]},IQLQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IQLQuery"},"@context":{type:"string"},"@version":{type:"string"},queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IQLQueryCreationHintsJSON"}},required:["@type","queryString"],additionalProperties:!1},IQLQueryCreationHintsJSON:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},FreeTextRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"FreeTextRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},freeText:{type:"string"}},required:["@type","freeText","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a\n {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.RequireManualDecisionOfIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RequireManualDecisionOfIncomingRequestRequest",definitions:{RequireManualDecisionOfIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.SentOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SentOutgoingRequestRequest",definitions:{SentOutgoingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"},messageId:{$ref:"#/definitions/MessageIdString"}},required:["requestId","messageId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.ShareAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ShareAttributeRequest",definitions:{ShareAttributeRequest:{type:"object",properties:{attributeId:{$ref:"#/definitions/AttributeIdString"},peer:{$ref:"#/definitions/AddressString"},requestTitle:{type:"string"},requestDescription:{type:"string"},requestMetadata:{},requestItemTitle:{type:"string"},requestItemDescription:{type:"string"}},required:["attributeId","peer"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.SucceedAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SucceedAttributeRequest",definitions:{SucceedAttributeRequest:{type:"object",properties:{successorContent:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},succeeds:{$ref:"#/definitions/AttributeIdString"}},required:["successorContent","succeeds"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.UpdateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateAttributeRequest",definitions:{UpdateAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"},content:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["id","content"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]}}},t.ValidateIQLQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ValidateIQLQueryRequest",definitions:{ValidateIQLQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IIQLQuery"},{$ref:"#/definitions/IQLQueryJSON"}]}},required:["query"],additionalProperties:!1},IIQLQuery:{type:"object",properties:{queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IIQLQueryCreationHints"}},required:["queryString"],additionalProperties:!1},IIQLQueryCreationHints:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},IQLQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IQLQuery"},"@context":{type:"string"},"@version":{type:"string"},queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IQLQueryCreationHintsJSON"}},required:["@type","queryString"],additionalProperties:!1},IQLQueryCreationHintsJSON:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1}}},t.CreateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDraftRequest",definitions:{CreateDraftRequest:{type:"object",properties:{content:{},type:{type:"string"}},required:["content"],additionalProperties:!1}}},t.DeleteDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDraftRequest",definitions:{DeleteDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"}},required:["id"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.GetDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftRequest",definitions:{GetDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"}},required:["id"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.GetDraftsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftsRequest",definitions:{GetDraftsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetDraftsQuery"}},additionalProperties:!1},GetDraftsQuery:{type:"object",properties:{type:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},lastModifiedAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.UpdateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDraftRequest",definitions:{UpdateDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"},content:{}},required:["id","content"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.CreateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSettingRequest",definitions:{CreateSettingRequest:{type:"object",properties:{key:{type:"string"},value:{},reference:{$ref:"#/definitions/GenericIdString"},scope:{type:"string",enum:["Identity","Device","Relationship"]},succeedsAt:{$ref:"#/definitions/ISO8601DateTimeString"},succeedsItem:{$ref:"#/definitions/LocalSettingIdString"}},required:["key","value"],additionalProperties:!1},GenericIdString:{type:"string",pattern:"[A-Za-z0-9]{20}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.DeleteSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteSettingRequest",definitions:{DeleteSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"}},required:["id"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.GetSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingRequest",definitions:{GetSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"}},required:["id"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.GetSettingByKeyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingByKeyRequest",definitions:{GetSettingByKeyRequest:{type:"object",properties:{key:{type:"string"}},required:["key"],additionalProperties:!1}}},t.GetSettingsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingsRequest",definitions:{GetSettingsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetSettingsQuery"}},additionalProperties:!1},GetSettingsQuery:{type:"object",properties:{key:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},scope:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},reference:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeedsItem:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeedsAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.UpdateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateSettingRequest",definitions:{UpdateSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"},value:{}},required:["id","value"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.DownloadFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadFileRequest",definitions:{DownloadFileRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"}},required:["id"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.LoadItemFromTruncatedReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadItemFromTruncatedReferenceRequest",definitions:{LoadItemFromTruncatedReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.RegisterPushNotificationTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RegisterPushNotificationTokenRequest",definitions:{RegisterPushNotificationTokenRequest:{type:"object",properties:{handle:{type:"string"},platform:{type:"string"},appId:{type:"string"}},required:["handle","platform","appId"],additionalProperties:!1}}},t.SyncDatawalletRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SyncDatawalletRequest",definitions:{SyncDatawalletRequest:{type:"object",additionalProperties:!1}}},t.DownloadAttachmentRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadAttachmentRequest",definitions:{DownloadAttachmentRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"},attachmentId:{$ref:"#/definitions/FileIdString"}},required:["id","attachmentId"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.SyncEverythingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SyncEverythingRequest",definitions:{SyncEverythingRequest:{type:"object",additionalProperties:!1}}},t.CreateRelationshipChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipChallengeRequest",definitions:{CreateRelationshipChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Relationship"},relationship:{$ref:"#/definitions/RelationshipIdString"}},required:["challengeType","relationship"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.CreateIdentityChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateIdentityChallengeRequest",definitions:{CreateIdentityChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Identity"}},required:["challengeType"],additionalProperties:!1}}},t.CreateDeviceChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceChallengeRequest",definitions:{CreateDeviceChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Device"}},required:["challengeType"],additionalProperties:!1}}},t.CreateChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateChallengeRequest",definitions:{CreateChallengeRequest:{anyOf:[{$ref:"#/definitions/CreateRelationshipChallengeRequest"},{$ref:"#/definitions/CreateIdentityChallengeRequest"},{$ref:"#/definitions/CreateDeviceChallengeRequest"}]},CreateRelationshipChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Relationship"},relationship:{$ref:"#/definitions/RelationshipIdString"}},required:["challengeType","relationship"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},CreateIdentityChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Identity"}},required:["challengeType"],additionalProperties:!1},CreateDeviceChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Device"}},required:["challengeType"],additionalProperties:!1}}},t.ValidateChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ValidateChallengeRequest",definitions:{ValidateChallengeRequest:{type:"object",properties:{challengeString:{type:"string"},signature:{type:"string"}},required:["challengeString","signature"],additionalProperties:!1}}},t.CreateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceRequest",definitions:{CreateDeviceRequest:{type:"object",properties:{name:{type:"string"},description:{type:"string"},isAdmin:{type:"boolean"}},additionalProperties:!1}}},t.CreateDeviceOnboardingTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceOnboardingTokenRequest",definitions:{CreateDeviceOnboardingTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.DeleteDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDeviceRequest",definitions:{DeleteDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.GetDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceRequest",definitions:{GetDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.GetDeviceOnboardingInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceOnboardingInfoRequest",definitions:{GetDeviceOnboardingInfoRequest:{type:"object",properties:{id:{$ref:"#/definitions/GenericIdString"}},required:["id"],additionalProperties:!1},GenericIdString:{type:"string",pattern:"[A-Za-z0-9]{20}"}}},t.UpdateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDeviceRequest",definitions:{UpdateDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"},name:{type:"string"},description:{type:"string"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.CreateQrCodeForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateQrCodeForFileRequest",definitions:{CreateQrCodeForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.CreateTokenForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForFileRequest",definitions:{CreateTokenForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateTokenQrCodeForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForFileRequest",definitions:{CreateTokenQrCodeForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFileRequest",definitions:{GetFileRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"}},required:["id"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetFilesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFilesRequest",definitions:{GetFilesRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetFilesQuery"},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},GetFilesQuery:{type:"object",properties:{createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdByDevice:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},description:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},expiresAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},filename:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},filesize:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},mimetype:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},title:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},isOwn:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.GetOrLoadFileViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileViaSecretRequest",definitions:{GetOrLoadFileViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetOrLoadFileViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileViaReferenceRequest",definitions:{GetOrLoadFileViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / file reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"}}},t.GetOrLoadFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileRequest",definitions:{GetOrLoadFileRequest:{anyOf:[{$ref:"#/definitions/GetOrLoadFileViaSecretRequest"},{$ref:"#/definitions/GetOrLoadFileViaReferenceRequest"}]},GetOrLoadFileViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},GetOrLoadFileViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / file reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"}}},t.UploadOwnFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UploadOwnFileRequest",definitions:{UploadOwnFileRequest:{type:"object",properties:{content:{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}},filename:{type:"string"},mimetype:{type:"string"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},title:{type:"string"},description:{type:"string"}},required:["content","filename","mimetype","expiresAt","title"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.UploadOwnFileValidatableRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UploadOwnFileValidatableRequest",definitions:{UploadOwnFileValidatableRequest:{type:"object",properties:{filename:{type:"string"},mimetype:{type:"string"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},title:{type:"string"},description:{type:"string"},content:{type:"object"}},required:["content","expiresAt","filename","mimetype","title"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CheckIdentityRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CheckIdentityRequest",definitions:{CheckIdentityRequest:{type:"object",properties:{address:{$ref:"#/definitions/AddressString"}},required:["address"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.GetAttachmentMetadataRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttachmentMetadataRequest",definitions:{GetAttachmentMetadataRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"},attachmentId:{$ref:"#/definitions/FileIdString"}},required:["id","attachmentId"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessageRequest",definitions:{GetMessageRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"}},required:["id"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.GetMessagesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessagesRequest",definitions:{GetMessagesRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},t.SendMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SendMessageRequest",definitions:{SendMessageRequest:{type:"object",properties:{recipients:{type:"array",items:{$ref:"#/definitions/AddressString"},minItems:1},content:{},attachments:{type:"array",items:{$ref:"#/definitions/FileIdString"}}},required:["recipients","content"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.AcceptRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/AcceptRelationshipChangeRequest",definitions:{AcceptRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CreateRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipRequest",definitions:{CreateRelationshipRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},content:{}},required:["templateId","content"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.GetAttributesForRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesForRelationshipRequest",definitions:{GetAttributesForRelationshipRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipIdString"},hideTechnical:{type:"boolean"}},required:["id"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.GetRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipRequest",definitions:{GetRelationshipRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipIdString"}},required:["id"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.GetRelationshipByAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipByAddressRequest",definitions:{GetRelationshipByAddressRequest:{type:"object",properties:{address:{$ref:"#/definitions/AddressString"}},required:["address"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.GetRelationshipsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipsRequest",definitions:{GetRelationshipsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetRelationshipsQuery"}},additionalProperties:!1},GetRelationshipsQuery:{type:"object",properties:{peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"template.id":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.RejectRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RejectRelationshipChangeRequest",definitions:{RejectRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.RevokeRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RevokeRelationshipChangeRequest",definitions:{RevokeRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CreateOwnRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnRelationshipTemplateRequest",definitions:{CreateOwnRelationshipTemplateRequest:{type:"object",properties:{expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},content:{},maxNumberOfAllocations:{type:"number",minimum:1}},required:["expiresAt","content"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateQrCodeForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateQrCodeForOwnTemplateRequest",definitions:{CreateQrCodeForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.CreateTokenForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForOwnTemplateRequest",definitions:{CreateTokenForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateTokenQrCodeForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForOwnTemplateRequest",definitions:{CreateTokenQrCodeForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplateRequest",definitions:{GetRelationshipTemplateRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"}},required:["id"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.GetRelationshipTemplatesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplatesRequest",definitions:{GetRelationshipTemplatesRequest:{type:"object",properties:{query:{},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.LoadPeerRelationshipTemplateViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateViaSecretRequest",definitions:{LoadPeerRelationshipTemplateViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.LoadPeerRelationshipTemplateViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateViaReferenceRequest",definitions:{LoadPeerRelationshipTemplateViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / relationship template reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.LoadPeerRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateRequest",definitions:{LoadPeerRelationshipTemplateRequest:{anyOf:[{$ref:"#/definitions/LoadPeerRelationshipTemplateViaSecretRequest"},{$ref:"#/definitions/LoadPeerRelationshipTemplateViaReferenceRequest"}]},LoadPeerRelationshipTemplateViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},LoadPeerRelationshipTemplateViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / relationship template reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.CreateOwnTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnTokenRequest",definitions:{CreateOwnTokenRequest:{type:"object",properties:{content:{},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["content","expiresAt","ephemeral"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetQRCodeForTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetQRCodeForTokenRequest",definitions:{GetQRCodeForTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"}},required:["id"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.GetTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokenRequest",definitions:{GetTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"}},required:["id"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.GetTokensRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokensRequest",definitions:{GetTokensRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetTokensQuery"},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},GetTokensQuery:{type:"object",properties:{createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdByDevice:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},expiresAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.LoadPeerTokenViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenViaReferenceRequest",definitions:{LoadPeerTokenViaReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"},ephemeral:{type:"boolean"}},required:["reference","ephemeral"],additionalProperties:!1,errorMessage:"token reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"}}},t.LoadPeerTokenViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenViaSecretRequest",definitions:{LoadPeerTokenViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string",minLength:10},ephemeral:{type:"boolean"}},required:["id","secretKey","ephemeral"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.LoadPeerTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenRequest",definitions:{LoadPeerTokenRequest:{anyOf:[{$ref:"#/definitions/LoadPeerTokenViaReferenceRequest"},{$ref:"#/definitions/LoadPeerTokenViaSecretRequest"}]},LoadPeerTokenViaReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"},ephemeral:{type:"boolean"}},required:["reference","ephemeral"],additionalProperties:!1,errorMessage:"token reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},LoadPeerTokenViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string",minLength:10},ephemeral:{type:"boolean"}},required:["id","secretKey","ephemeral"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}}},5420:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UseCase=void 0;const n=r(194),s=r(5172),o=r(9663),a=i(r(4530)),c=r(8728),u=r(6595);t.UseCase=class UseCase{constructor(e){this.requestValidator=e}async execute(e){if(this.requestValidator){const t=await this.requestValidator.validate(e);if(t.isInvalid())return this.validationFailed(t)}try{return await this.executeInternal(e)}catch(e){return this.failingResultFromUnknownError(e)}}failingResultFromUnknownError(e){return e instanceof Error?e instanceof o.RequestError?this.handleRequestError(e):e instanceof n.ServalError?this.handleServalError(e):e instanceof s.ApplicationError?s.Result.fail(e):e instanceof o.CoreError?s.Result.fail(new s.ApplicationError(e.code,e.message)):s.Result.fail(u.RuntimeErrors.general.unknown(`An error was thrown in a UseCase: ${e.message}`,e)):s.Result.fail(u.RuntimeErrors.general.unknown(`An unknown object was thrown in a UseCase: ${(0,a.default)(e)}`,e))}handleServalError(e){let t;return t=e instanceof n.ParsingError||e instanceof n.ValidationError?u.RuntimeErrors.serval.requestDeserialization(e.message):e.message.match(/Type '.+' with version [0-9]+ was not found within reflection classes. You might have to install a module first./)?u.RuntimeErrors.serval.unknownType(e.message):u.RuntimeErrors.serval.general(e.message),t.stack=e.stack,s.Result.fail(t)}handleRequestError(e){return c.PlatformErrorCodes.isNotFoundError(e)?s.Result.fail(u.RuntimeErrors.general.recordNotFoundWithMessage(e.reason)):c.PlatformErrorCodes.isValidationError(e)||c.PlatformErrorCodes.isUnexpectedError(e)?s.Result.fail(new s.ApplicationError(e.code,e.message)):s.Result.fail(e)}validationFailed(e){const t=e.getFailures()[0];return s.Result.fail(t.error)}}},7049:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2627),t),n(r(6819),t),n(r(3832),t),n(r(6595),t),n(r(2746),t),n(r(5420),t),n(r(3800),t),n(r(7674),t),n(r(9872),t),n(r(7111),t)},3800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaValidator=void 0;const i=r(6595),n=r(9872),s=r(7111);t.SchemaValidator=class SchemaValidator{constructor(e){this.schema=e}validate(e){const t=this.schema.validate(e);return this.convertValidationResult(t)}convertValidationResult(e){const t=new s.ValidationResult;return e.isValid||t.addFailures(e.errors.map(this.schemaErrorToValidationFailure)),t}schemaErrorToValidationFailure(e){const t=`${e.instancePath} ${e.message}`.replace(/^\//,"").replace(/"/g,"").trim();return new n.ValidationFailure(i.RuntimeErrors.general.invalidPropertyValue(t),e.instancePath)}}},7674:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9872:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationFailure=void 0;t.ValidationFailure=class ValidationFailure{constructor(e,t){this.error=e,this.propertyName=t}}},7111:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationResult=void 0;t.ValidationResult=class ValidationResult{constructor(){this.failures=[]}isValid(){return 0===this.failures.length}isInvalid(){return!this.isValid()}addFailure(e){this.failures.push(e)}addFailures(e){this.failures.push(...e)}getFailures(){return this.failures.slice(0)}getFailureMessages(){return this.failures.map((e=>e.error.message))}getFailureCodes(){return this.failures.map((e=>e.error.code))}}},4231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerMapper=void 0;t.AttributeListenerMapper=class AttributeListenerMapper{static toAttributeListenerDTO(e){return{id:e.id.toString(),query:e.query.toJSON(),peer:e.peer.toString()}}static toAttributeListenerDTOList(e){return e.map((e=>this.toAttributeListenerDTO(e)))}}},1316:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeListenerUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(4231);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetAttributeListenerRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetAttributeListenerUseCase extends p.UseCase{constructor(e,t){super(t),this.attributeListenersController=e}async executeInternal(e){const t=await this.attributeListenersController.getAttributeListener(c.CoreId.from(e.id));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalAttributeListener));const r=l.AttributeListenerMapper.toAttributeListenerDTO(t);return o.Result.ok(r)}};t.GetAttributeListenerUseCase=f,t.GetAttributeListenerUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributeListenersController,d])],f)},5129:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeListenersUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(4231);let l=class GetAttributeListenersUseCase extends u.UseCase{constructor(e){super(),this.attributeListenersController=e}async executeInternal(){const e=await this.attributeListenersController.getAttributeListeners(),t=p.AttributeListenerMapper.toAttributeListenerDTOList(e);return o.Result.ok(t)}};t.GetAttributeListenersUseCase=l,t.GetAttributeListenersUseCase=l=i([s(0,c.Inject),n("design:paramtypes",[a.AttributeListenersController])],l)},4864:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4231),t),n(r(1316),t),n(r(5129),t)},1192:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMapper=void 0;t.AttributeMapper=class AttributeMapper{static toAttributeDTO(e){return{id:e.id.toString(),parentId:e.parentId?.toString(),content:e.content.toJSON(),createdAt:e.createdAt.toString(),succeeds:e.succeeds?.toString(),succeededBy:e.succeededBy?.toString(),shareInfo:e.shareInfo?.toJSON()}}static toAttributeDTOList(e){return e.map((e=>this.toAttributeDTO(e)))}}},7716:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.CreateLocalAttributeParams.from({content:e.content}),r=await this.attributeController.createLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};t.CreateAttributeUseCase=f,t.CreateAttributeUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f)},236:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateSharedAttributeCopyUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateSharedAttributeCopyRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateSharedAttributeCopyUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.CreateSharedLocalAttributeCopyParams.from({sourceAttributeId:c.CoreId.from(e.attributeId),peer:c.CoreAddress.from(e.peer),requestReference:c.CoreId.from(e.requestReference)}),r=await this.attributeController.createSharedLocalAttributeCopy(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};t.CreateSharedAttributeCopyUseCase=f,t.CreateSharedAttributeCopyUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f)},6899:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049);let l=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("DeleteAttributeRequest"))}};l=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],l);let d=class DeleteAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(c.CoreId.from(e.id));return t?(await this.attributeController.deleteAttribute(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalAttribute))}};t.DeleteAttributeUseCase=d,t.DeleteAttributeUseCase=d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,l])],d)},9661:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteIQLQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("ExecuteIQLQueryRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class ExecuteIQLQueryUseCase extends p.UseCase{constructor(e,t){super(t),this.attributeController=e}async executeInternal(e){const t=c.IQLQuery.from(e.query),r=await this.attributeController.executeIQLQuery(t);return o.Result.ok(l.AttributeMapper.toAttributeDTOList(r))}};t.ExecuteIQLQueryUseCase=f,t.ExecuteIQLQueryUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributesController,d])],f)},6847:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteIdentityAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),p=r(7049),l=r(1192);let d=class ExecuteIdentityAttributeQueryUseCase extends p.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.executeIdentityAttributeQuery(c.IdentityAttributeQuery.from(e.query));return o.Result.ok(l.AttributeMapper.toAttributeDTOList(t))}};t.ExecuteIdentityAttributeQueryUseCase=d,t.ExecuteIdentityAttributeQueryUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d)},4538:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteRelationshipAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),p=r(7049),l=r(1192);let d=class ExecuteRelationshipAttributeQueryUseCase extends p.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.executeRelationshipAttributeQuery(c.RelationshipAttributeQuery.from(e.query));return t?o.Result.ok(l.AttributeMapper.toAttributeDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound("RelationshipAttribute"))}};t.ExecuteRelationshipAttributeQueryUseCase=d,t.ExecuteRelationshipAttributeQueryUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d)},4922:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteThirdPartyRelationshipAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),p=r(7049),l=r(1192);let d=class ExecuteThirdPartyRelationshipAttributeQueryUseCase extends p.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=c.ThirdPartyRelationshipAttributeQuery.from(e.query),r=await this.attributeController.executeThirdPartyRelationshipAttributeQuery(t);return o.Result.ok(l.AttributeMapper.toAttributeDTOList(r))}};t.ExecuteThirdPartyRelationshipAttributeQueryUseCase=d,t.ExecuteThirdPartyRelationshipAttributeQueryUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d)},3421:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetAttributeUseCase extends p.UseCase{constructor(e,t){super(t),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(c.CoreId.from(e.id));return t?o.Result.ok(l.AttributeMapper.toAttributeDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalAttribute))}};t.GetAttributeUseCase=f,t.GetAttributeUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributesController,d])],f)},9536:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributesUseCase=void 0;const a=r(2937),c=r(5172),u=r(3850),p=r(8565),l=r(4714),d=r(7071),f=r(7049),y=r(8537),h=r(1192);let g=i=class GetAttributesUseCase extends f.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=e.query??{},r=(0,y.flattenObject)(t),n=i.queryTranslator.parse(r),s=await this.attributeController.getLocalAttributes(n,e.hideTechnical,e.onlyValid);return c.Result.ok(h.AttributeMapper.toAttributeDTOList(s))}};t.GetAttributesUseCase=g,g.queryTranslator=new a.QueryTranslator({whitelist:{[(0,l.nameof)((e=>e.createdAt))]:!0,[(0,l.nameof)((e=>e.parentId))]:!0,[(0,l.nameof)((e=>e.succeeds))]:!0,[(0,l.nameof)((e=>e.succeededBy))]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.owner))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.@type`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.value))}.@type`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.key))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.isTechnical))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.confidentiality))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.peer))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.requestReference))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.sourceAttribute))}`]:!0},alias:{[(0,l.nameof)((e=>e.createdAt))]:[(0,l.nameof)((e=>e.createdAt))],[(0,l.nameof)((e=>e.parentId))]:[(0,l.nameof)((e=>e.parentId))],[(0,l.nameof)((e=>e.succeeds))]:[(0,l.nameof)((e=>e.succeeds))],[(0,l.nameof)((e=>e.succeededBy))]:[(0,l.nameof)((e=>e.succeededBy))],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.owner))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.owner))}`],[`${(0,l.nameof)((e=>e.content))}.@type`]:[`${(0,l.nameof)((e=>e.content))}.@type`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.value))}.@type`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.value))}.@type`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.key))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.key))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.isTechnical))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.isTechnical))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.confidentiality))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.confidentiality))}`],[`${(0,l.nameof)((e=>e.shareInfo))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}`],[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.peer))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.peer))}`],[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.requestReference))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.requestReference))}`],[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.sourceAttribute))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.sourceAttribute))}`]},custom:{[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]:(e,t)=>{if(!t)return;const r=p.DateTime.fromISO(t).toUTC().toString();e[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]={$gte:r}},[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]:(e,t)=>{if(!t)return;const r=p.DateTime.fromISO(t).toUTC().toString();e[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]={$lte:r}},[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:(e,t)=>{const r=[];for(const e of t){const t={[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:{$contains:e}};r.push(t)}e.$or=r}}}),t.GetAttributesUseCase=g=i=n([o(0,d.Inject),s("design:paramtypes",[u.AttributesController])],g)},2089:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetPeerAttributesUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(8537),l=r(1192),d=r(9536);let f=class GetPeerAttributesUseCase extends u.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=e.query??{};t["content.owner"]=e.peer;const r=(0,p.flattenObject)(t),i=d.GetAttributesUseCase.queryTranslator.parse(r),n=await this.attributeController.getLocalAttributes(i,e.hideTechnical,e.onlyValid);return o.Result.ok(l.AttributeMapper.toAttributeDTOList(n))}};t.GetPeerAttributesUseCase=f,t.GetPeerAttributesUseCase=f=i([s(0,c.Inject),n("design:paramtypes",[a.AttributesController])],f)},6823:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSharedToPeerAttributesUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(8537),d=r(1192),f=r(9536);let y=class GetSharedToPeerAttributesUseCase extends p.UseCase{constructor(e,t){super(),this.attributeController=e,this.identityController=t}async executeInternal(e){const t=e.query??{};t["content.owner"]=this.identityController.address.toString(),t["shareInfo.peer"]=e.peer;const r=(0,l.flattenObject)(t),i=f.GetAttributesUseCase.queryTranslator.parse(r),n=await this.attributeController.getLocalAttributes(i,e.hideTechnical,e.onlyValid);return o.Result.ok(d.AttributeMapper.toAttributeDTOList(n))}};t.GetSharedToPeerAttributesUseCase=y,t.GetSharedToPeerAttributesUseCase=y=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributesController,c.IdentityController])],y)},6438:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ShareAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(7049),d=r(3289);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("ShareAttributeRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class ShareAttributeUseCase extends l.UseCase{constructor(e,t,r,i,n){super(n),this.attributeController=e,this.accountController=t,this.requestsController=r,this.messageController=i}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(u.CoreId.from(e.attributeId));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.LocalAttribute));const r=u.CoreAddress.from(e.peer),i={peer:r,content:{title:e.requestTitle,description:e.requestDescription,metadata:e.requestMetadata,items:[c.ShareAttributeRequestItem.from({attribute:t.content,sourceAttributeId:t.id,title:e.requestItemTitle,description:e.requestItemDescription,mustBeAccepted:!0})]}},n=await this.requestsController.canCreate(i);if(n.isError())return o.Result.fail(n.error);const s=await this.requestsController.create(i);return await this.messageController.sendMessage({recipients:[r],content:s.content}),await this.accountController.syncDatawallet(),o.Result.ok(d.RequestMapper.toLocalRequestDTO(s))}};t.ShareAttributeUseCase=y,t.ShareAttributeUseCase=y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),s(3,p.Inject),s(4,p.Inject),n("design:paramtypes",[a.AttributesController,u.AccountController,a.OutgoingRequestsController,u.MessageController,f])],y)},4415:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SucceedAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("SucceedAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class SucceedAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.SucceedLocalAttributeParams.from({successorContent:e.successorContent,succeeds:e.succeeds}),r=await this.attributeController.succeedLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};t.SucceedAttributeUseCase=f,t.SucceedAttributeUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f)},9660:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("UpdateAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class UpdateAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.UpdateLocalAttributeParams.from({id:e.id,content:e.content}),r=await this.attributeController.updateLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};t.UpdateAttributeUseCase=f,t.UpdateAttributeUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f)},5449:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ValidateIQLQueryUseCase=void 0;const o=r(5172),a=r(5030),c=r(2173),u=r(7071),p=r(7049);let l=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("ValidateIQLQueryRequest"))}};l=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],l);let d=class ValidateIQLQueryUseCase extends p.UseCase{constructor(e){super(e)}executeInternal(e){const t=a.IQLQuery.from(e.query),r=(0,c.validate)(t.queryString);return o.Result.ok(r)}};t.ValidateIQLQueryUseCase=d,t.ValidateIQLQueryUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[l])],d)},99:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1192),t),n(r(7716),t),n(r(236),t),n(r(6899),t),n(r(6847),t),n(r(9661),t),n(r(4538),t),n(r(4922),t),n(r(3421),t),n(r(9536),t),n(r(2089),t),n(r(6823),t),n(r(6438),t),n(r(4415),t),n(r(9660),t),n(r(5449),t)},7372:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(660);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateDraftRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateDraftUseCase extends p.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.createDraft(e.content,e.type);return await this.accountController.syncDatawallet(),o.Result.ok(l.DraftMapper.toDraftDTO(t))}};t.CreateDraftUseCase=f,t.CreateDraftUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.DraftsController,c.AccountController,d])],f)},9696:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049);let l=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("DeleteDraftRequest"))}};l=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],l);let d=class DeleteDraftUseCase extends p.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.getDraft(c.CoreId.from(e.id));return t?(await this.draftController.deleteDraft(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Draft))}};t.DeleteDraftUseCase=d,t.DeleteDraftUseCase=d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.DraftsController,c.AccountController,l])],d)},660:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DraftMapper=void 0;t.DraftMapper=class DraftMapper{static toDraftDTO(e){return{id:e.id.toString(),type:e.type,createdAt:e.createdAt.toString(),lastModifiedAt:e.lastModifiedAt.toISOString(),content:e.content.toJSON()}}static toDraftDTOList(e){return e.map((e=>this.toDraftDTO(e)))}}},3165:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(660);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetDraftRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetDraftUseCase extends p.UseCase{constructor(e,t){super(t),this.draftController=e}async executeInternal(e){const t=await this.draftController.getDraft(c.CoreId.from(e.id));return t?o.Result.ok(l.DraftMapper.toDraftDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Draft))}};t.GetDraftUseCase=f,t.GetDraftUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.DraftsController,d])],f)},6863:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDraftsUseCase=void 0;const a=r(2937),c=r(5172),u=r(3850),p=r(4714),l=r(7071),d=r(7049),f=r(660);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetDraftsRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetDraftsUseCase extends d.UseCase{constructor(e,t){super(t),this.draftController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query),r=await this.draftController.getDrafts(t);return c.Result.ok(f.DraftMapper.toDraftDTOList(r))}};t.GetDraftsUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.type))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.lastModifiedAt))]:!0}}),t.GetDraftsUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.DraftsController,y])],h)},5760:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDraftUseCase=void 0;const o=r(194),a=r(5172),c=r(3850),u=r(9663),p=r(7071),l=r(7049),d=r(660);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("UpdateDraftRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class UpdateDraftUseCase extends l.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.getDraft(u.CoreId.from(e.id));return t?(t.content=o.Serializable.fromUnknown(e.content),await this.draftController.updateDraft(t),await this.accountController.syncDatawallet(),a.Result.ok(d.DraftMapper.toDraftDTO(t))):a.Result.fail(l.RuntimeErrors.general.recordNotFound(c.Draft))}};t.UpdateDraftUseCase=y,t.UpdateDraftUseCase=y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[c.DraftsController,u.AccountController,f])],y)},5966:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7372),t),n(r(9696),t),n(r(660),t),n(r(3165),t),n(r(6863),t),n(r(5760),t)},3742:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4864),t),n(r(99),t),n(r(5966),t),n(r(3289),t),n(r(1394),t)},4262:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class AcceptIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){let t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.requestId));return t?(t=await this.incomingRequestsController.accept(e),o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest))}};t.AcceptIncomingRequestUseCase=d,t.AcceptIncomingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d)},3678:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanAcceptIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(8062);let l=class CanAcceptIncomingRequestUseCase extends u.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.canAccept(e),r=p.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};t.CanAcceptIncomingRequestUseCase=l,t.CanAcceptIncomingRequestUseCase=l=i([s(0,c.Inject),n("design:paramtypes",[a.IncomingRequestsController])],l)},8112:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanCreateOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(8062);let d=class CanCreateOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.canCreate({content:e.content,peer:e.peer?c.CoreAddress.from(e.peer):void 0}),r=l.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};t.CanCreateOutgoingRequestUseCase=d,t.CanCreateOutgoingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d)},8197:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanRejectIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(8062);let l=class CanRejectIncomingRequestUseCase extends u.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.canReject(e),r=p.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};t.CanRejectIncomingRequestUseCase=l,t.CanRejectIncomingRequestUseCase=l=i([s(0,c.Inject),n("design:paramtypes",[a.IncomingRequestsController])],l)},2113:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheckPrerequisitesOfIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class CheckPrerequisitesOfIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.checkPrerequisites({requestId:c.CoreId.from(e.requestId)});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))}};t.CheckPrerequisitesOfIncomingRequestUseCase=d,t.CheckPrerequisitesOfIncomingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d)},6353:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompleteIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class CompleteIncomingRequestUseCase extends p.UseCase{constructor(e,t,r){super(),this.incomingRequestsController=e,this.messageController=t,this.relationshipController=r}async executeInternal(e){const t=await this.getResponseSourceObject(e),r=c.CoreId.from(e.requestId),i=await this.incomingRequestsController.complete({requestId:r,responseSourceObject:t});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(i))}async getResponseSourceObject(e){if(!e.responseSourceId)return;if(e.responseSourceId.startsWith("MSG")){const t=await this.messageController.getMessage(c.CoreId.from(e.responseSourceId));if(!t)throw p.RuntimeErrors.general.recordNotFound(c.Message);return t}const t=await this.relationshipController.getRelationships({"cache.changes.id":e.responseSourceId});if(0===t.length)throw p.RuntimeErrors.general.recordNotFound(c.RelationshipChange);return t[0].cache.creationChange}};t.CompleteIncomingRequestUseCase=d,t.CompleteIncomingRequestUseCase=d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.IncomingRequestsController,c.MessageController,c.RelationshipsController])],d)},4464:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompleteOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(7049),d=r(3386);let f=class CompleteOutgoingRequestUseCase extends l.UseCase{constructor(e,t){super(),this.outgoingRequestsController=e,this.messageController=t}async executeInternal(e){const t=await this.messageController.getMessage(u.CoreId.from(e.messageId));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.Message));const r={requestId:u.CoreId.from(e.receivedResponse.requestId),receivedResponse:c.Response.from(e.receivedResponse),responseSourceObject:t},i=await this.outgoingRequestsController.complete(r);return o.Result.ok(d.RequestMapper.toLocalRequestDTO(i))}};t.CompleteOutgoingRequestUseCase=f,t.CompleteOutgoingRequestUseCase=f=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[a.OutgoingRequestsController,u.MessageController])],f)},6796:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(7049),d=r(3386);let f=class CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseUseCase extends l.UseCase{constructor(e,t,r,i){super(),this.outgoingRequestsController=e,this.relationshipController=t,this.relationshipTemplateController=r,this.messageController=i}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(u.CoreId.from(e.templateId));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.RelationshipTemplate));const r=await this.getResponseSource(e.responseSourceId);if(!r)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.RelationshipChange));const i=await this.outgoingRequestsController.createAndCompleteFromRelationshipTemplateResponse({template:t,responseSource:r,response:c.Response.from(e.response)});return o.Result.ok(d.RequestMapper.toLocalRequestDTO(i))}async getResponseSource(e){if(e.startsWith("MSG"))return await this.messageController.getMessage(u.CoreId.from(e));const t=await this.relationshipController.getRelationships({"cache.changes.id":e});if(0!==t.length){return t[0].cache.creationChange}}};t.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseUseCase=f,t.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseUseCase=f=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),s(3,p.Inject),n("design:paramtypes",[a.OutgoingRequestsController,u.RelationshipsController,u.RelationshipTemplateController,u.MessageController])],f)},2285:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class CreateOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.create({content:e.content,peer:c.CoreAddress.from(e.peer)});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))}};t.CreateOutgoingRequestUseCase=d,t.CreateOutgoingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d)},3923:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DiscardOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049);let l=class DiscardOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){return await this.outgoingRequestsController.discardOutgoingRequest(c.CoreId.from(e.id)),o.Result.ok(void 0)}};t.DiscardOutgoingRequestUseCase=l,t.DiscardOutgoingRequestUseCase=l=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],l)},3094:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class GetIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.id));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest));const r=l.RequestMapper.toLocalRequestDTO(t);return o.Result.ok(r)}};t.GetIncomingRequestUseCase=d,t.GetIncomingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d)},1697:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIncomingRequestsUseCase=void 0;const a=r(2937),c=r(5172),u=r(3850),p=r(4714),l=r(7071),d=r(7049),f=r(8537),y=r(3386);let h=i=class GetIncomingRequestsUseCase extends d.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=(0,f.flattenObject)(e.query),r=i.queryTranslator.parse(t),n=await this.incomingRequestsController.getIncomingRequests(r),s=y.RequestMapper.toLocalRequestDTOList(n);return c.Result.ok(s)}};t.GetIncomingRequestsUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.id))]:!0,[(0,p.nameof)((e=>e.peer))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.status))]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:!0,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0},alias:{[(0,p.nameof)((e=>e.id))]:(0,p.nameof)((e=>e.id)),[(0,p.nameof)((e=>e.peer))]:(0,p.nameof)((e=>e.peer)),[(0,p.nameof)((e=>e.createdAt))]:(0,p.nameof)((e=>e.createdAt)),[(0,p.nameof)((e=>e.status))]:(0,p.nameof)((e=>e.status)),[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`}}),t.GetIncomingRequestsUseCase=h=i=n([o(0,l.Inject),s("design:paramtypes",[u.IncomingRequestsController])],h)},6293:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class GetOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.getOutgoingRequest(c.CoreId.from(e.id));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest));const r=l.RequestMapper.toLocalRequestDTO(t);return o.Result.ok(r)}};t.GetOutgoingRequestUseCase=d,t.GetOutgoingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d)},5771:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOutgoingRequestsUseCase=void 0;const a=r(2937),c=r(5172),u=r(3850),p=r(4714),l=r(7071),d=r(7049),f=r(8537),y=r(3386);let h=i=class GetOutgoingRequestsUseCase extends d.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=(0,f.flattenObject)(e.query),r=i.queryTranslator.parse(t),n=await this.outgoingRequestsController.getOutgoingRequests(r),s=y.RequestMapper.toLocalRequestDTOList(n);return c.Result.ok(s)}};t.GetOutgoingRequestsUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.id))]:!0,[(0,p.nameof)((e=>e.peer))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.status))]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:!0,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0},alias:{[(0,p.nameof)((e=>e.id))]:(0,p.nameof)((e=>e.id)),[(0,p.nameof)((e=>e.peer))]:(0,p.nameof)((e=>e.peer)),[(0,p.nameof)((e=>e.createdAt))]:(0,p.nameof)((e=>e.createdAt)),[(0,p.nameof)((e=>e.status))]:(0,p.nameof)((e=>e.status)),[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`}}),t.GetOutgoingRequestsUseCase=h=i=n([o(0,l.Inject),s("design:paramtypes",[u.OutgoingRequestsController])],h)},7782:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReceivedIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(7049),d=r(3386);let f=class ReceivedIncomingRequestUseCase extends l.UseCase{constructor(e,t,r){super(),this.incomingRequestsController=e,this.messageController=t,this.relationshipTemplateController=r}async executeInternal(e){let t;if(e.requestSourceId.startsWith("MSG")){if(t=await this.messageController.getMessage(u.CoreId.from(e.requestSourceId)),!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.Message))}else if(t=await this.relationshipTemplateController.getRelationshipTemplate(u.CoreId.from(e.requestSourceId)),!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.RelationshipTemplate));const r=await this.incomingRequestsController.received({receivedRequest:c.Request.from(e.receivedRequest),requestSourceObject:t});return o.Result.ok(d.RequestMapper.toLocalRequestDTO(r))}};t.ReceivedIncomingRequestUseCase=f,t.ReceivedIncomingRequestUseCase=f=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[a.IncomingRequestsController,u.MessageController,u.RelationshipTemplateController])],f)},5196:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RejectIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class RejectIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){let t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.requestId));return t?(t=await this.incomingRequestsController.reject(e),o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest))}};t.RejectIncomingRequestUseCase=d,t.RejectIncomingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d)},3386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestMapper=void 0;t.RequestMapper=class RequestMapper{static toLocalRequestDTO(e){return{id:e.id.toString(),isOwn:e.isOwn,peer:e.peer.toString(),createdAt:e.createdAt.toString(),content:e.content.toJSON(),source:e.source?{type:e.source.type,reference:e.source.reference.toString()}:void 0,response:e.response?{createdAt:e.response.createdAt.toString(),content:e.response.content.toJSON(),source:e.response.source?{type:e.response.source.type,reference:e.response.source.reference.toString()}:void 0}:void 0,status:e.status}}static toLocalRequestDTOList(e){return e.map((e=>this.toLocalRequestDTO(e)))}}},8062:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestValidationResultMapper=void 0;t.RequestValidationResultMapper=class RequestValidationResultMapper{static toRequestValidationResultDTO(e){return{isSuccess:e.isSuccess(),code:e.isError()?e.error.code:void 0,message:e.isError()?e.error.message:void 0,items:e.items.map((e=>this.toRequestValidationResultDTO(e)))}}}},5943:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RequireManualDecisionOfIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class RequireManualDecisionOfIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.requireManualDecision({requestId:c.CoreId.from(e.requestId)});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))}};t.RequireManualDecisionOfIncomingRequestUseCase=d,t.RequireManualDecisionOfIncomingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d)},1938:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SentOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class SentOutgoingRequestUseCase extends p.UseCase{constructor(e,t){super(),this.outgoingRequestsController=e,this.messageController=t}async executeInternal(e){const t=await this.messageController.getMessage(c.CoreId.from(e.messageId));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(c.Message));const r={requestId:c.CoreId.from(e.requestId),requestSourceObject:t},i=await this.outgoingRequestsController.sent(r);return o.Result.ok(l.RequestMapper.toLocalRequestDTO(i))}};t.SentOutgoingRequestUseCase=d,t.SentOutgoingRequestUseCase=d=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController,c.MessageController])],d)},8537:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenObject=void 0,t.flattenObject=function flattenObject(e){const t={};for(const r in e){const i=e[r];if("object"!=typeof i||Array.isArray(i))t[r]=i;else{const e=flattenObject(i);for(const i in e)t[`${r}.${i}`]=e[i]}}return t}},3289:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4262),t),n(r(3678),t),n(r(8112),t),n(r(8197),t),n(r(2113),t),n(r(6353),t),n(r(4464),t),n(r(6796),t),n(r(2285),t),n(r(3923),t),n(r(3094),t),n(r(1697),t),n(r(6293),t),n(r(5771),t),n(r(7782),t),n(r(5196),t),n(r(3386),t),n(r(5943),t),n(r(1938),t)},3951:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(6950);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateSettingRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateSettingUseCase extends p.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.createSetting({key:e.key,value:e.value,reference:e.reference?c.CoreId.from(e.reference):void 0,scope:e.scope,succeedsAt:e.succeedsAt?c.CoreDate.from(e.succeedsAt):void 0,succeedsItem:e.succeedsItem?c.CoreId.from(e.succeedsItem):void 0});return await this.accountController.syncDatawallet(),o.Result.ok(l.SettingMapper.toSettingDTO(t))}};t.CreateSettingUseCase=f,t.CreateSettingUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.SettingsController,c.AccountController,d])],f)},678:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049);let l=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("DeleteSettingRequest"))}};l=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],l);let d=class DeleteSettingUseCase extends p.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.getSetting(c.CoreId.from(e.id));return t?(await this.settingController.deleteSetting(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Setting))}};t.DeleteSettingUseCase=d,t.DeleteSettingUseCase=d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.SettingsController,c.AccountController,l])],d)},6798:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(6950);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetSettingRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetSettingUseCase extends p.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=await this.settingController.getSetting(c.CoreId.from(e.id));return t?o.Result.ok(l.SettingMapper.toSettingDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Setting))}};t.GetSettingUseCase=f,t.GetSettingUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.SettingsController,d])],f)},7510:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingByKeyUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(6950);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetSettingByKeyRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetSettingByKeyUseCase extends u.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=await this.settingController.getSettings({key:e.key});if(0===t.length)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Setting));const r=t.reduce(((e,t)=>e.createdAt>t.createdAt?e:t));return o.Result.ok(p.SettingMapper.toSettingDTO(r))}};t.GetSettingByKeyUseCase=d,t.GetSettingByKeyUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.SettingsController,l])],d)},6101:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingsUseCase=void 0;const a=r(2937),c=r(5172),u=r(3850),p=r(4714),l=r(7071),d=r(7049),f=r(6950);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetSettingsRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetSettingsUseCase extends d.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query),r=await this.settingController.getSettings(t);return c.Result.ok(f.SettingMapper.toSettingDTOList(r))}};t.GetSettingsUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.key))]:!0,[(0,p.nameof)((e=>e.scope))]:!0,[(0,p.nameof)((e=>e.reference))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.succeedsItem))]:!0,[(0,p.nameof)((e=>e.succeedsAt))]:!0}}),t.GetSettingsUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.SettingsController,y])],h)},6950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingMapper=void 0;t.SettingMapper=class SettingMapper{static toSettingDTO(e){return{id:e.id.toString(),key:e.key,scope:e.scope,reference:e.reference?.toString(),value:e.value.toJSON(),createdAt:e.createdAt.toISOString(),succeedsItem:e.succeedsItem?.toString(),succeedsAt:e.succeedsAt?.toString()}}static toSettingDTOList(e){return e.map((e=>this.toSettingDTO(e)))}}},1853:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateSettingUseCase=void 0;const o=r(194),a=r(5172),c=r(3850),u=r(9663),p=r(7071),l=r(7049),d=r(6950);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("UpdateSettingRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class UpdateSettingUseCase extends l.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.getSetting(u.CoreId.from(e.id));return t?(t.value=o.Serializable.fromUnknown(e.value),await this.settingController.updateSetting(t),await this.accountController.syncDatawallet(),a.Result.ok(d.SettingMapper.toSettingDTO(t))):a.Result.fail(l.RuntimeErrors.general.recordNotFound(c.Setting))}};t.UpdateSettingUseCase=y,t.UpdateSettingUseCase=y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[c.SettingsController,u.AccountController,f])],y)},1394:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3951),t),n(r(678),t),n(r(6798),t),n(r(7510),t),n(r(6101),t),n(r(6950),t),n(r(1853),t)},485:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9365),t),n(r(2627),t),n(r(6819),t),n(r(6595),t),n(r(3742),t),n(r(9667),t)},2737:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DisableAutoSyncUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class DisableAutoSyncUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}executeInternal(){return this.accountController.disableAutoSync(),o.Result.ok(void 0)}};t.DisableAutoSyncUseCase=p,t.DisableAutoSyncUseCase=p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p)},9710:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.EnableAutoSyncUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class EnableAutoSyncUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(){return await this.accountController.enableAutoSync(),o.Result.ok(void 0)}};t.EnableAutoSyncUseCase=p,t.EnableAutoSyncUseCase=p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p)},569:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class GetDeviceInfoUseCase extends u.UseCase{constructor(e){super(),this.deviceController=e}executeInternal(){const e=this.deviceController.device;return o.Result.ok(p.DeviceMapper.toDeviceDTO(e,!0))}};t.GetDeviceInfoUseCase=l,t.GetDeviceInfoUseCase=l=i([s(0,c.Inject),n("design:paramtypes",[a.DeviceController])],l)},3378:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIdentityInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class GetIdentityInfoUseCase extends u.UseCase{constructor(e){super(),this.identityController=e}executeInternal(){const e=this.identityController.identity;return o.Result.ok({address:e.address.toString(),publicKey:e.publicKey.toBase64(!1)})}};t.GetIdentityInfoUseCase=p,t.GetIdentityInfoUseCase=p=i([s(0,c.Inject),n("design:paramtypes",[a.IdentityController])],p)},8562:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSyncInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class GetSyncInfoUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(){const e=await this.accountController.getLastCompletedSyncTime(),t=await this.accountController.getLastCompletedDatawalletSyncTime();return o.Result.ok({lastSyncRun:e?{completedAt:e.toISOString()}:void 0,lastDatawalletSync:t?{completedAt:t.toISOString()}:void 0})}};t.GetSyncInfoUseCase=p,t.GetSyncInfoUseCase=p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p)},4614:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadItemFromTruncatedReferenceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067),l=r(5076),d=r(8434),f=r(7121);let y=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("LoadItemFromTruncatedReferenceRequest"))}};y=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],y);let h=class LoadItemFromTruncatedReferenceUseCase extends u.UseCase{constructor(e,t,r,i,n){super(n),this.fileController=e,this.templateController=t,this.tokenController=r,this.accountController=i}async executeInternal(e){try{return await this._executeInternal(e)}finally{await this.accountController.syncDatawallet()}}async _executeInternal(e){const t=e.reference;if(t.startsWith(u.Base64ForIdPrefix.RelationshipTemplate)){const e=await this.templateController.loadPeerRelationshipTemplateByTruncated(t);return o.Result.ok({type:"RelationshipTemplate",value:d.RelationshipTemplateMapper.toRelationshipTemplateDTO(e)})}if(t.startsWith(u.Base64ForIdPrefix.File)){const e=await this.fileController.getOrLoadFileByTruncated(t);return o.Result.ok({type:"File",value:l.FileMapper.toFileDTO(e)})}return await this.handleTokenReference(t)}async handleTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Token,t.id.toString());const r=t.cache.content;if(r instanceof a.TokenContentRelationshipTemplate){const e=await this.templateController.loadPeerRelationshipTemplate(r.templateId,r.secretKey);return o.Result.ok({type:"RelationshipTemplate",value:d.RelationshipTemplateMapper.toRelationshipTemplateDTO(e)})}if(r instanceof a.TokenContentFile){const e=await this.fileController.getOrLoadFile(r.fileId,r.secretKey);return o.Result.ok({type:"File",value:l.FileMapper.toFileDTO(e)})}return r instanceof a.TokenContentDeviceSharedSecret?o.Result.ok({type:"DeviceOnboardingInfo",value:p.DeviceMapper.toDeviceOnboardingInfoDTO(r.sharedSecret)}):o.Result.ok({type:"Token",value:f.TokenMapper.toTokenDTO(t,!0)})}};t.LoadItemFromTruncatedReferenceUseCase=h,t.LoadItemFromTruncatedReferenceUseCase=h=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),s(4,c.Inject),n("design:paramtypes",[a.FileController,a.RelationshipTemplateController,a.TokenController,a.AccountController,y])],h)},3826:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterPushNotificationTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RegisterPushNotificationTokenRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class RegisterPushNotificationTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.accountController=e}async executeInternal(e){return await this.accountController.registerPushNotificationToken({handle:e.handle,platform:e.platform,appId:e.appId}),o.Result.ok(void 0)}};t.RegisterPushNotificationTokenUseCase=l,t.RegisterPushNotificationTokenUseCase=l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.AccountController,p])],l)},4204:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncDatawalletUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class SyncDatawalletUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(e){return await this.accountController.syncDatawallet(!0,e.callback),o.Result.ok(void 0)}};t.SyncDatawalletUseCase=p,t.SyncDatawalletUseCase=p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p)},4773:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEverythingUseCase=void 0;const a=r(5172),c=r(9663),u=r(7071),p=r(986),l=r(7049),d=r(6881),f=r(4316);let y=i=class SyncEverythingUseCase extends l.UseCase{constructor(e,t){super(),this.accountController=e,this.logger=t.getLogger(i)}async executeInternal(e){if(this.currentSync)return await this.currentSync;this.currentSync=this._executeInternal(e);try{return await this.currentSync}finally{this.currentSync=void 0}}async _executeInternal(e){const t=await this.accountController.syncEverything(e.callback),r=t.messages.map((e=>d.MessageMapper.toMessageDTO(e))),i=t.relationships.map((e=>f.RelationshipMapper.toRelationshipDTO(e)));return a.Result.ok({messages:r,relationships:i})}};t.SyncEverythingUseCase=y,t.SyncEverythingUseCase=y=i=n([o(0,u.Inject),o(1,u.Inject),s("design:paramtypes",[c.AccountController,p.RuntimeLoggerFactory])],y)},9276:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2737),t),n(r(9710),t),n(r(569),t),n(r(3378),t),n(r(8562),t),n(r(4614),t),n(r(3826),t),n(r(4204),t),n(r(4773),t)},7661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChallengeMapper=void 0;t.ChallengeMapper=class ChallengeMapper{static toChallengeDTO(e){const t=JSON.parse(e.challenge);return{id:t.id,expiresAt:t.expiresAt,createdBy:t.createdBy,createdByDevice:t.createdByDevice,type:t.type,signature:e.signature.toBase64(!1),challengeString:e.challenge}}}},9936:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateChallengeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7661);function isCreateRelationshipChallengeRequest(e){return"Relationship"===e.challengeType&&"string"==typeof e.relationship}let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateChallengeRequest")),this.relationshipSchema=e.getSchema("CreateRelationshipChallengeRequest"),this.identitySchema=e.getSchema("CreateIdentityChallengeRequest"),this.deviceSchema=e.getSchema("CreateDeviceChallengeRequest")}validate(e){if(this.schema.validate(e).isValid)return new u.ValidationResult;if(isCreateRelationshipChallengeRequest(e))return this.convertValidationResult(this.relationshipSchema.validate(e));if(function isCreateIdentityChallengeRequest(e){return"Identity"===e.challengeType}(e))return this.convertValidationResult(this.identitySchema.validate(e));if(function isCreateDeviceChallengeRequest(e){return"Device"===e.challengeType}(e))return this.convertValidationResult(this.deviceSchema.validate(e));const t=new u.ValidationResult;return t.addFailure(new u.ValidationFailure(u.RuntimeErrors.general.invalidPayload())),t}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateChallengeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.challengeController=e,this.relationshipsController=t}async executeInternal(e){const t=await this.getRelationship(e);if(t.isError)return o.Result.fail(t.error);let r;switch(e.challengeType){case"Relationship":r=a.ChallengeType.Relationship;break;case"Identity":r=a.ChallengeType.Identity;break;case"Device":r=a.ChallengeType.Device;break;default:throw new Error("Unknown challenge type.")}const i=await this.challengeController.createChallenge(r,t.value);return o.Result.ok(p.ChallengeMapper.toChallengeDTO(i))}async getRelationship(e){if(!isCreateRelationshipChallengeRequest(e))return o.Result.ok(void 0);const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationship));return t?o.Result.ok(t):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};t.CreateChallengeUseCase=d,t.CreateChallengeUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.ChallengeController,a.RelationshipsController,l])],d)},5573:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ValidateChallengeUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(4714),p=r(7071),l=r(7049),d=r(4316);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("ValidateChallengeRequest"))}validate(e){const t=super.validate(e);if(t.isInvalid())return t;const r=this.validateSignature(e.signature);r.isError&&t.addFailure(new l.ValidationFailure(l.RuntimeErrors.general.invalidPropertyValue(r.error.message),(0,u.nameof)((e=>e.signature))));const i=this.validateChallenge(e.challengeString);return i.isError&&t.addFailure(new l.ValidationFailure(l.RuntimeErrors.general.invalidPropertyValue(i.error.message),(0,u.nameof)((e=>e.challengeString)))),t}validateSignature(e){try{return a.CryptoSignature.fromBase64(e),o.Result.ok(void 0)}catch{return o.Result.fail(l.RuntimeErrors.challenges.invalidSignature())}}validateChallenge(e){try{return c.Challenge.deserialize(e),o.Result.ok(void 0)}catch{return o.Result.fail(l.RuntimeErrors.challenges.invalidChallengeString())}}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class ValidateChallengeUseCase extends l.UseCase{constructor(e,t){super(t),this.challengeController=e}async executeInternal(e){const t=a.CryptoSignature.fromBase64(e.signature),r=c.ChallengeSigned.from({challenge:e.challengeString,signature:t});try{const e=await this.challengeController.validateChallenge(r),t=e.correspondingRelationship?d.RelationshipMapper.toRelationshipDTO(e.correspondingRelationship):void 0;return o.Result.ok({isValid:e.isValid,correspondingRelationship:t})}catch(e){if(!(e instanceof c.CoreError)||"error.transport.notSupported"!==e.code)throw e;return o.Result.fail(l.RuntimeErrors.general.notSupported("Validating challenges of the type 'Device' is not yet supported."))}}};t.ValidateChallengeUseCase=y,t.ValidateChallengeUseCase=y=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[c.ChallengeController,f])],y)},5629:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9936),t),n(r(5573),t)},5188:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateDeviceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateDeviceUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.sendDevice(e);return await this.accountController.syncDatawallet(),o.Result.ok(p.DeviceMapper.toDeviceDTO(t,!1))}};t.CreateDeviceUseCase=d,t.CreateDeviceUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,l])],d)},795:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDeviceOnboardingTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateDeviceOnboardingTokenRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateDeviceOnboardingTokenUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.tokenController=t}async executeInternal(e){const t=await this.devicesController.getSharedSecret(a.CoreId.from(e.id)),r=e.expiresAt?a.CoreDate.from(e.expiresAt):a.CoreDate.utc().add({minutes:5}),i=a.TokenContentDeviceSharedSecret.from({sharedSecret:t}),n=await this.tokenController.sendToken({content:i,expiresAt:r,ephemeral:!0});return o.Result.ok(p.TokenMapper.toTokenDTO(n,!0))}};t.CreateDeviceOnboardingTokenUseCase=d,t.CreateDeviceOnboardingTokenUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.TokenController,l])],d)},2137:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DeleteDeviceRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class DeleteDeviceUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));return t?(await this.devicesController.delete(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Device))}};t.DeleteDeviceUseCase=l,t.DeleteDeviceUseCase=l=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,p])],l)},3067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceMapper=void 0;const i=r(2890),n=r(9663);t.DeviceMapper=class DeviceMapper{static toDeviceDTO(e,t){return{id:e.id.toString(),isAdmin:e.isAdmin??!1,createdAt:e.createdAt.toString(),createdByDevice:e.createdByDevice.toString(),name:e.name,type:e.type.toString(),username:e.username,certificate:e.certificate,description:e.description,lastLoginAt:e.lastLoginAt?.toString(),operatingSystem:e.operatingSystem,publicKey:e.publicKey?.toBase64(!1),isCurrentDevice:t}}static toDeviceOnboardingInfoDTO(e){return{id:e.id.toString(),createdAt:e.createdAt.toString(),createdByDevice:e.createdByDevice.toString(),name:e.name,description:e.description,secretBaseKey:e.secretBaseKey.toBase64(!1),deviceIndex:e.deviceIndex,synchronizationKey:e.synchronizationKey.toBase64(!1),identityPrivateKey:e.identityPrivateKey?e.identityPrivateKey.toBase64(!1):void 0,identity:{address:e.identity.address.toString(),publicKey:e.identity.publicKey.toBase64(!1),realm:e.identity.realm.toString()},password:e.password,username:e.username}}static toDeviceSharedSecret(e){return n.DeviceSharedSecret.from({id:n.CoreId.from(e.id),createdAt:n.CoreDate.from(e.createdAt),createdByDevice:n.CoreId.from(e.createdByDevice),name:e.name,description:e.description,secretBaseKey:i.CryptoSecretKey.fromBase64(e.secretBaseKey),deviceIndex:e.deviceIndex,synchronizationKey:i.CryptoSecretKey.fromBase64(e.synchronizationKey),identityPrivateKey:e.identityPrivateKey?i.CryptoSignaturePrivateKey.fromBase64(e.identityPrivateKey):void 0,identity:{address:n.CoreAddress.from(e.identity.address),publicKey:i.CryptoSignaturePublicKey.fromBase64(e.identity.publicKey),realm:e.identity.realm},password:e.password,username:e.username})}}},770:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetDeviceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetDeviceUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.deviceController=t}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Device));const r=this.deviceController.device,i=t.id.equals(r.id);return o.Result.ok(p.DeviceMapper.toDeviceDTO(t,i))}};t.GetDeviceUseCase=d,t.GetDeviceUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.DeviceController,l])],d)},8283:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceOnboardingInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetDeviceOnboardingInfoRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetDeviceOnboardingInfoUseCase extends u.UseCase{constructor(e,t){super(t),this.devicesController=e}async executeInternal(e){const t=await this.devicesController.getSharedSecret(a.CoreId.from(e.id));return o.Result.ok(p.DeviceMapper.toDeviceOnboardingInfoDTO(t))}};t.GetDeviceOnboardingInfoUseCase=d,t.GetDeviceOnboardingInfoUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.DevicesController,l])],d)},3341:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDevicesUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class GetDevicesUseCase extends u.UseCase{constructor(e,t){super(),this.devicesController=e,this.deviceController=t}async executeInternal(){const e=await this.devicesController.list(),t=this.deviceController.device,r=e.map((e=>p.DeviceMapper.toDeviceDTO(e,e.id.equals(t.id))));return o.Result.ok(r)}};t.GetDevicesUseCase=l,t.GetDevicesUseCase=l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.DevicesController,a.DeviceController])],l)},189:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("UpdateDeviceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class UpdateDeviceUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.devicesController=e,this.accountController=t,this.deviceController=r}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Device));void 0!==e.name&&(t.name=e.name),t.description=e.description,await this.devicesController.update(t),await this.accountController.syncDatawallet();const r=this.deviceController.device,i=t.id.equals(r.id);return o.Result.ok(p.DeviceMapper.toDeviceDTO(t,i))}};t.UpdateDeviceUseCase=d,t.UpdateDeviceUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,a.DeviceController,l])],d)},7802:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5188),t),n(r(795),t),n(r(2137),t),n(r(3067),t),n(r(770),t),n(r(8283),t),n(r(3341),t),n(r(189),t)},1828:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateQrCodeForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateQrCodeForFileRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateQrCodeForFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};t.CreateQrCodeForFileUseCase=l,t.CreateQrCodeForFileUseCase=l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,p])],l)},542:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenForFileRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateTokenForFileUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.fileController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=a.TokenContentFile.from({fileId:t.id,secretKey:t.secretKey}),i=e.ephemeral??!0,n=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),s=e.expiresAt?a.CoreDate.from(e.expiresAt):n,c=await this.tokenController.sendToken({content:r,expiresAt:s,ephemeral:i});return i||await this.accountController.syncDatawallet(),o.Result.ok(p.TokenMapper.toTokenDTO(c,i))}};t.CreateTokenForFileUseCase=d,t.CreateTokenForFileUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.FileController,a.TokenController,a.AccountController,l])],d)},6913:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenQrCodeForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenQrCodeForFileRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateTokenQrCodeForFileUseCase extends u.UseCase{constructor(e,t,r){super(r),this.fileController=e,this.tokenController=t}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=a.TokenContentFile.from({fileId:t.id,secretKey:t.secretKey}),i=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),n=e.expiresAt?a.CoreDate.from(e.expiresAt):i,s=await this.tokenController.sendToken({content:r,expiresAt:n,ephemeral:!0}),c=await u.QRCode.forTruncateable(s);return o.Result.ok({qrCodeBytes:c.asBase64()})}};t.CreateTokenQrCodeForFileUseCase=l,t.CreateTokenQrCodeForFileUseCase=l=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.FileController,a.TokenController,p])],l)},8516:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(5076);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DownloadFileRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class DownloadFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=a.CoreId.from(e.id),r=await this.fileController.getFile(t);if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const i=await this.fileController.downloadFileContent(r.id);return o.Result.ok(p.FileMapper.toDownloadFileResponse(i,r))}};t.DownloadFileUseCase=d,t.DownloadFileUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,l])],d)},5076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileMapper=void 0;const i=r(9663),n=r(7049);t.FileMapper=class FileMapper{static toDownloadFileResponse(e,t){if(!t.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,t.id.toString());return{content:e.buffer,filename:t.cache.filename?t.cache.filename:t.id.toString(),mimetype:t.cache.mimetype}}static toFileDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,e.id.toString());return{id:e.id.toString(),filename:e.cache.filename,filesize:e.cache.filesize,createdAt:e.cache.createdAt.toString(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),expiresAt:e.cache.expiresAt.toString(),mimetype:e.cache.mimetype,isOwn:e.isOwn,title:e.cache.title??"",secretKey:e.secretKey.toBase64(!1),description:e.cache.description,truncatedReference:e.truncate()}}static toFileDTOList(e){return e.map((e=>this.toFileDTO(e)))}}},3520:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(5076);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetFileRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.id));return t?o.Result.ok(p.FileMapper.toFileDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File))}};t.GetFileUseCase=d,t.GetFileUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,l])],d)},5911:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetFilesUseCase=void 0;const a=r(2937),c=r(5172),u=r(9663),p=r(4714),l=r(7071),d=r(7049),f=r(5076);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetFilesRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetFilesUseCase extends d.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,p.nameof)((e=>e.isOwn))]=e.ownerRestriction===d.OwnerRestriction.Own);const r=await this.fileController.getFiles(t);return c.Result.ok(f.FileMapper.toFileDTOList(r))}};t.GetFilesUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.createdBy))]:!0,[(0,p.nameof)((e=>e.createdByDevice))]:!0,[(0,p.nameof)((e=>e.description))]:!0,[(0,p.nameof)((e=>e.expiresAt))]:!0,[(0,p.nameof)((e=>e.filename))]:!0,[(0,p.nameof)((e=>e.filesize))]:!0,[(0,p.nameof)((e=>e.mimetype))]:!0,[(0,p.nameof)((e=>e.title))]:!0,[(0,p.nameof)((e=>e.isOwn))]:!0},alias:{[(0,p.nameof)((e=>e.createdAt))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdAt))}`,[(0,p.nameof)((e=>e.createdBy))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdBy))}`,[(0,p.nameof)((e=>e.createdByDevice))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdByDevice))}`,[(0,p.nameof)((e=>e.description))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.description))}`,[(0,p.nameof)((e=>e.expiresAt))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.expiresAt))}`,[(0,p.nameof)((e=>e.filename))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.filename))}`,[(0,p.nameof)((e=>e.filesize))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.filesize))}`,[(0,p.nameof)((e=>e.mimetype))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.mimetype))}`,[(0,p.nameof)((e=>e.title))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.title))}`,[(0,p.nameof)((e=>e.isOwn))]:(0,p.nameof)((e=>e.isOwn))}}),t.GetFilesUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.FileController,y])],h)},9918:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOrLoadFileUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(5076);function isViaSecret(e){return"id"in e&&"secretKey"in e}function isViaReference(e){return"reference"in e}let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetOrLoadFileRequest")),this.loadViaSecretSchema=e.getSchema("GetOrLoadFileViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("GetOrLoadFileViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new p.ValidationResult;if(isViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new p.ValidationResult;return t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetOrLoadFileUseCase extends p.UseCase{constructor(e,t,r,i){super(i),this.fileController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){let t;if(isViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.loadFile(c.CoreId.from(e.id),r)}else{if(!isViaReference(e))throw new Error("Invalid request format.");t=await this.loadFileFromReference(e.reference)}return await this.accountController.syncDatawallet(),t}async loadFileFromReference(e){if(e.startsWith(p.Base64ForIdPrefix.File))return await this.loadFileFromFileReference(e);if(e.startsWith(p.Base64ForIdPrefix.Token))return await this.loadFileFromTokenReference(e);throw p.RuntimeErrors.files.invalidReference(e)}async loadFileFromFileReference(e){const t=await this.fileController.getOrLoadFileByTruncated(e);return o.Result.ok(l.FileMapper.toFileDTO(t))}async loadFileFromTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw p.RuntimeErrors.general.cacheEmpty(c.Token,t.id.toString());if(!(t.cache.content instanceof c.TokenContentFile))return o.Result.fail(p.RuntimeErrors.general.invalidTokenContent());const r=t.cache.content;return await this.loadFile(r.fileId,r.secretKey)}async loadFile(e,t){const r=await this.fileController.getOrLoadFile(e,t);return o.Result.ok(l.FileMapper.toFileDTO(r))}};t.GetOrLoadFileUseCase=f,t.GetOrLoadFileUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),s(3,u.Inject),n("design:paramtypes",[c.FileController,c.TokenController,c.AccountController,d])],f)},2109:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UploadOwnFileUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(8565),p=r(4714),l=r(7071),d=r(7049),f=r(5076);let y=class Validator extends d.SchemaValidator{set maxFileSize(e){this._maxFileSize=e}constructor(e){super(e.getSchema("UploadOwnFileValidatableRequest"))}validate(e){const t=super.validate(e);return t.isValid()?(e.content.byteLength>this._maxFileSize&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.content))}' is too large`),(0,p.nameof)((e=>e.content)))),0===e.content.length&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.content))}' is empty`),(0,p.nameof)((e=>e.content)))),u.DateTime.fromISO(e.expiresAt)<=u.DateTime.utc()&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.expiresAt))}' must be in the future`),(0,p.nameof)((e=>e.expiresAt)))),t):t}};y=i([s(0,l.Inject),n("design:paramtypes",[d.SchemaRepository])],y);let h=class UploadOwnFileUseCase extends d.UseCase{constructor(e,t,r){super(r),this.fileController=e,this.accountController=t,r.maxFileSize=e.config.platformMaxUnencryptedFileSize}async executeInternal(e){const t=await this.fileController.sendFile({buffer:a.CoreBuffer.from(e.content),title:e.title,description:e.description??"",filename:e.filename,mimetype:e.mimetype,expiresAt:c.CoreDate.from(e.expiresAt)});return await this.accountController.syncDatawallet(),o.Result.ok(f.FileMapper.toFileDTO(t))}};t.UploadOwnFileUseCase=h,t.UploadOwnFileUseCase=h=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),n("design:paramtypes",[c.FileController,c.AccountController,y])],h)},4237:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1828),t),n(r(542),t),n(r(6913),t),n(r(8516),t),n(r(5076),t),n(r(3520),t),n(r(5911),t),n(r(9918),t),n(r(2109),t)},4824:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheckIdentityUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CheckIdentityRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CheckIdentityUseCase extends u.UseCase{constructor(e,t,r){super(r),this.identityController=e,this.relationshipsController=t}async executeInternal(e){const t=a.CoreAddress.from(e.address);if(this.identityController.isMe(t))return o.Result.ok({self:!0});const r=await this.relationshipsController.getRelationshipToIdentity(t);if(r){const e=p.RelationshipMapper.toRelationshipDTO(r);return r.status===a.RelationshipStatus.Pending?o.Result.ok({peer:!0,relationshipPending:!0,relationship:e}):r.status===a.RelationshipStatus.Active||r.status===a.RelationshipStatus.Terminating?o.Result.ok({peer:!0,relationshipActive:!0,relationship:e}):o.Result.ok({peer:!0,relationshipTerminated:!0,relationship:e})}return o.Result.ok({unknown:!0})}};t.CheckIdentityUseCase=d,t.CheckIdentityUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.IdentityController,a.RelationshipsController,l])],d)},4847:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4824),t)},9667:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9276),t),n(r(5629),t),n(r(7802),t),n(r(4237),t),n(r(4847),t),n(r(2290),t),n(r(7831),t),n(r(3084),t),n(r(5631),t)},4860:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadAttachmentUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(6881);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DownloadAttachmentRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class DownloadAttachmentUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString());const r=t.cache.attachments.find((t=>t.equals(a.CoreId.from(e.attachmentId))));if(!r)return o.Result.fail(u.RuntimeErrors.messages.fileNotFoundInMessage(e.attachmentId));const i=await this.fileController.getFile(r);if(!i)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const n=await this.fileController.downloadFileContent(r);return o.Result.ok(p.MessageMapper.toDownloadAttachmentResponse(n,i))}};t.DownloadAttachmentUseCase=d,t.DownloadAttachmentUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,l])],d)},9558:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttachmentMetadataUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(5076);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetAttachmentMetadataRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetAttachmentMetadataUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString());const r=t.cache.attachments.find((t=>t.equals(a.CoreId.from(e.attachmentId))));if(!r)return o.Result.fail(u.RuntimeErrors.messages.fileNotFoundInMessage(e.attachmentId));const i=await this.fileController.getFile(r);return i?o.Result.ok(p.FileMapper.toFileDTO(i)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(File))}};t.GetAttachmentMetadataUseCase=d,t.GetAttachmentMetadataUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,l])],d)},978:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetMessageUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(6881);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetMessageRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetMessageUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString()));const r=await Promise.all(t.cache.attachments.map((e=>this.fileController.getFile(e))));if(r.some((e=>!e)))throw new Error("A file could not be fetched.");return o.Result.ok(p.MessageMapper.toMessageWithAttachmentsDTO(t,r))}};t.GetMessageUseCase=d,t.GetMessageUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,l])],d)},9231:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetMessagesUseCase=void 0;const a=r(2937),c=r(5172),u=r(9663),p=r(4714),l=r(7071),d=r(7049),f=r(6881);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetMessagesRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetMessagesUseCase extends d.UseCase{constructor(e,t){super(t),this.messageController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query),r=await this.messageController.getMessages(t);return c.Result.ok(f.MessageMapper.toMessageDTOList(r))}};t.GetMessagesUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.createdBy))]:!0,[(0,p.nameof)((e=>e.createdByDevice))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[`${(0,p.nameof)((e=>e.content))}.@type`]:!0,[`${(0,p.nameof)((e=>e.content))}.body`]:!0,[`${(0,p.nameof)((e=>e.content))}.subject`]:!0,[(0,p.nameof)((e=>e.attachments))]:!0,[`${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.address))}`]:!0,[`${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.relationshipId))}`]:!0,participant:!0},alias:{[(0,p.nameof)((e=>e.createdBy))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdBy))}`,[(0,p.nameof)((e=>e.createdByDevice))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdByDevice))}`,[(0,p.nameof)((e=>e.createdAt))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdAt))}`,[`${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.address))}`]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.address))}`,[`${(0,p.nameof)((e=>e.content))}.@type`]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.content))}.@type`,[`${(0,p.nameof)((e=>e.content))}.body`]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.content))}.body`,[`${(0,p.nameof)((e=>e.content))}.subject`]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.content))}.subject`},custom:{[`${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.relationshipId))}`]:(e,t)=>{e[(0,p.nameof)((e=>e.relationshipIds))]={$containsAny:Array.isArray(t)?t:[t]}},[(0,p.nameof)((e=>e.attachments))]:(e,t)=>{e[`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.attachments))}`]={$containsAny:Array.isArray(t)?t:[t]}},participant:(e,t)=>{let r;if(Array.isArray(t)){if(0===t.length)return;r={};for(const e of t){const t=i.queryTranslator.parseString(e,!0);switch(t.field){case"$containsAny":case"$containsNone":r[t.field]=r[t.field]||[],r[t.field].push(t.value);break;default:r[t.field]=t.value}}}else r=i.queryTranslator.parseStringVal(t);e.$or=[{[`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdBy))}`]:r},{[`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.address))}`]:r}]}}}),t.GetMessagesUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.MessageController,y])],h)},6881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageMapper=void 0;const i=r(9663),n=r(7049),s=r(5076);t.MessageMapper=class MessageMapper{static toDownloadAttachmentResponse(e,t){if(!t.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,t.id.toString());return{content:e.buffer,filename:t.cache.filename?t.cache.filename:t.id.toString(),mimetype:t.cache.mimetype}}static toMessageWithAttachmentsDTO(e,t){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Message,e.id.toString());return{id:e.id.toString(),content:e.cache.content.toJSON(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),recipients:e.cache.recipients.map(((t,r)=>this.toRecipient(t,e.relationshipIds[r]))),createdAt:e.cache.createdAt.toString(),attachments:t.map((e=>s.FileMapper.toFileDTO(e))),isOwn:e.isOwn}}static toMessageDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Message,e.id.toString());return{id:e.id.toString(),content:e.cache.content.toJSON(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),recipients:e.cache.recipients.map(((t,r)=>this.toRecipient(t,e.relationshipIds[r]))),createdAt:e.cache.createdAt.toString(),attachments:e.cache.attachments.map((e=>e.toString())),isOwn:e.isOwn}}static toMessageDTOList(e){return e.map((e=>this.toMessageDTO(e)))}static toRecipient(e,t){return{address:e.address.toString(),receivedAt:e.receivedAt?.toString(),receivedByDevice:e.receivedByDevice?.toString(),relationshipId:t.toString()}}}},8400:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SendMessageUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(6881);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("SendMessageRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class SendMessageUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.messageController=e,this.fileController=t,this.accountController=r}async executeInternal(e){const t=await this.transformAttachments(e.attachments);if(t.isError)return o.Result.fail(t.error);const r=await this.messageController.sendMessage({recipients:e.recipients.map((e=>a.CoreAddress.from(e))),content:e.content,attachments:t.value});return await this.accountController.syncDatawallet(),o.Result.ok(p.MessageMapper.toMessageDTO(r))}async transformAttachments(e){if(!e||0===e.length)return o.Result.ok([]);const t=[];for(const r of e){const e=await this.fileController.getFile(a.CoreId.from(r));if(!e)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));t.push(e)}return o.Result.ok(t)}};t.SendMessageUseCase=d,t.SendMessageUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,a.AccountController,l])],d)},2290:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4860),t),n(r(9558),t),n(r(978),t),n(r(9231),t),n(r(6881),t),n(r(8400),t)},8580:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOwnRelationshipTemplateUseCase=void 0;const o=r(194),a=r(5172),c=r(3850),u=r(5030),p=r(9663),l=r(8565),d=r(4714),f=r(7071),y=r(7049),h=r(8434);let g=class Validator extends y.SchemaValidator{constructor(e){super(e.getSchema("CreateOwnRelationshipTemplateRequest"))}validate(e){const t=super.validate(e);return t.isValid()?(l.DateTime.fromISO(e.expiresAt)<=l.DateTime.utc()&&t.addFailure(new y.ValidationFailure(y.RuntimeErrors.general.invalidPropertyValue(`'${(0,d.nameof)((e=>e.expiresAt))}' must be in the future`),(0,d.nameof)((e=>e.expiresAt)))),t):t}};g=i([s(0,f.Inject),n("design:paramtypes",[y.SchemaRepository])],g);let m=class CreateOwnRelationshipTemplateUseCase extends y.UseCase{constructor(e,t,r,i){super(i),this.templateController=e,this.accountController=t,this.outgoingRequestsController=r}async executeInternal(e){const t=await this.validateRelationshipTemplateContent(e.content);if(t)return a.Result.fail(t);const r=await this.templateController.sendRelationshipTemplate({content:e.content,expiresAt:p.CoreDate.from(e.expiresAt),maxNumberOfAllocations:e.maxNumberOfAllocations});return await this.accountController.syncDatawallet(),a.Result.ok(h.RelationshipTemplateMapper.toRelationshipTemplateDTO(r))}async validateRelationshipTemplateContent(e){const t=o.Serializable.fromUnknown(e);if(!(t instanceof u.RelationshipTemplateContent))return;const r=await this.outgoingRequestsController.canCreate({content:t.onNewRelationship});if(r.isError())return r.error;if(t.onExistingRelationship){const e=await this.outgoingRequestsController.canCreate({content:t.onExistingRelationship});if(e.isError())return e.error}}};t.CreateOwnRelationshipTemplateUseCase=m,t.CreateOwnRelationshipTemplateUseCase=m=i([s(0,f.Inject),s(1,f.Inject),s(2,f.Inject),s(3,f.Inject),n("design:paramtypes",[p.RelationshipTemplateController,p.AccountController,c.OutgoingRequestsController,g])],m)},7921:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateQrCodeForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateQrCodeForOwnTemplateRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateQrCodeForOwnTemplateUseCase extends u.UseCase{constructor(e,t){super(t),this.templateController=e}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateQRCodeForPeerTemplate());const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};t.CreateQrCodeForOwnTemplateUseCase=l,t.CreateQrCodeForOwnTemplateUseCase=l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,p])],l)},7255:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenForOwnTemplateRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateTokenForOwnTemplateUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.templateController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const r=a.TokenContentRelationshipTemplate.from({templateId:t.id,secretKey:t.secretKey}),i=e.ephemeral??!0,n=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),s=e.expiresAt?a.CoreDate.from(e.expiresAt):n,c=await this.tokenController.sendToken({content:r,expiresAt:s,ephemeral:i});return i||await this.accountController.syncDatawallet(),o.Result.ok(p.TokenMapper.toTokenDTO(c,i))}};t.CreateTokenForOwnTemplateUseCase=d,t.CreateTokenForOwnTemplateUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,a.TokenController,a.AccountController,l])],d)},3683:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenQrCodeForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenQrCodeForOwnTemplateRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateTokenQrCodeForOwnTemplateUseCase extends u.UseCase{constructor(e,t,r){super(r),this.templateController=e,this.tokenController=t}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const r=a.TokenContentRelationshipTemplate.from({templateId:t.id,secretKey:t.secretKey}),i=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),n=e.expiresAt?a.CoreDate.from(e.expiresAt):i,s=await this.tokenController.sendToken({content:r,expiresAt:n,ephemeral:!0}),c=await u.QRCode.forTruncateable(s);return o.Result.ok({qrCodeBytes:c.asBase64()})}};t.CreateTokenQrCodeForOwnTemplateUseCase=l,t.CreateTokenQrCodeForOwnTemplateUseCase=l=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,a.TokenController,p])],l)},2603:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(8434);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipTemplateRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetRelationshipTemplateUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipTemplateController=e}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(a.CoreId.from(e.id));return t?o.Result.ok(p.RelationshipTemplateMapper.toRelationshipTemplateDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate))}};t.GetRelationshipTemplateUseCase=d,t.GetRelationshipTemplateUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,l])],d)},1371:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipTemplatesUseCase=void 0;const a=r(2937),c=r(5172),u=r(9663),p=r(4714),l=r(7071),d=r(7049),f=r(8434);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipTemplatesRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetRelationshipTemplatesUseCase extends d.UseCase{constructor(e,t){super(t),this.relationshipTemplateController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,p.nameof)((e=>e.isOwn))]=e.ownerRestriction===d.OwnerRestriction.Own);const r=await this.relationshipTemplateController.getRelationshipTemplates(t);return c.Result.ok(f.RelationshipTemplateMapper.toRelationshipTemplateDTOList(r))}};t.GetRelationshipTemplatesUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.isOwn))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.expiresAt))]:!0,[(0,p.nameof)((e=>e.createdBy))]:!0,[(0,p.nameof)((e=>e.createdByDevice))]:!0,[(0,p.nameof)((e=>e.maxNumberOfAllocations))]:!0},alias:{[(0,p.nameof)((e=>e.isOwn))]:(0,p.nameof)((e=>e.isOwn)),[(0,p.nameof)((e=>e.createdAt))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdAt))}`,[(0,p.nameof)((e=>e.expiresAt))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.expiresAt))}`,[(0,p.nameof)((e=>e.createdBy))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdBy))}`,[(0,p.nameof)((e=>e.createdByDevice))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdByDevice))}`,[(0,p.nameof)((e=>e.maxNumberOfAllocations))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.maxNumberOfAllocations))}`}}),t.GetRelationshipTemplatesUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.RelationshipTemplateController,y])],h)},3186:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerRelationshipTemplateUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(8434);function isLoadPeerRelationshipTemplateViaSecret(e){return"id"in e&&"secretKey"in e}function isLoadPeerRelationshipTemplateViaReference(e){return"reference"in e}let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerRelationshipTemplateRequest")),this.loadViaSecretSchema=e.getSchema("LoadPeerRelationshipTemplateViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("LoadPeerRelationshipTemplateViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new p.ValidationResult;if(isLoadPeerRelationshipTemplateViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isLoadPeerRelationshipTemplateViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new p.ValidationResult;return t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class LoadPeerRelationshipTemplateUseCase extends p.UseCase{constructor(e,t,r,i){super(i),this.templateController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){let t;if(isLoadPeerRelationshipTemplateViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.loadTemplate(c.CoreId.from(e.id),r)}else{if(!isLoadPeerRelationshipTemplateViaReference(e))throw new Error("Invalid request format.");t=await this.loadRelationshipTemplateFromReference(e.reference)}return await this.accountController.syncDatawallet(),t}async loadRelationshipTemplateFromReference(e){if(e.startsWith(p.Base64ForIdPrefix.RelationshipTemplate))return await this.loadRelationshipTemplateFromRelationshipTemplateReference(e);if(e.startsWith(p.Base64ForIdPrefix.Token))return await this.loadRelationshipTemplateFromTokenReference(e);throw p.RuntimeErrors.relationshipTemplates.invalidReference(e)}async loadRelationshipTemplateFromRelationshipTemplateReference(e){const t=await this.templateController.loadPeerRelationshipTemplateByTruncated(e);return o.Result.ok(l.RelationshipTemplateMapper.toRelationshipTemplateDTO(t))}async loadRelationshipTemplateFromTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw p.RuntimeErrors.general.cacheEmpty(c.Token,t.id.toString());if(!(t.cache.content instanceof c.TokenContentRelationshipTemplate))return o.Result.fail(p.RuntimeErrors.general.invalidTokenContent());const r=t.cache.content;return await this.loadTemplate(r.templateId,r.secretKey)}async loadTemplate(e,t){const r=await this.templateController.loadPeerRelationshipTemplate(e,t);return o.Result.ok(l.RelationshipTemplateMapper.toRelationshipTemplateDTO(r))}};t.LoadPeerRelationshipTemplateUseCase=f,t.LoadPeerRelationshipTemplateUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),s(3,u.Inject),n("design:paramtypes",[c.RelationshipTemplateController,c.TokenController,c.AccountController,d])],f)},8434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplateMapper=void 0;const i=r(9663),n=r(7049);t.RelationshipTemplateMapper=class RelationshipTemplateMapper{static toRelationshipTemplateDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.RelationshipTemplate,e.id.toString());return{id:e.id.toString(),isOwn:e.isOwn,createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),createdAt:e.cache.createdAt.toString(),content:e.cache.content.toJSON(),expiresAt:e.cache.expiresAt?.toString(),maxNumberOfAllocations:e.cache.maxNumberOfAllocations,secretKey:e.secretKey.toBase64(!1),truncatedReference:e.truncate()}}static toRelationshipTemplateDTOList(e){return e.map((e=>this.toRelationshipTemplateDTO(e)))}}},3084:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8580),t),n(r(7921),t),n(r(7255),t),n(r(3683),t),n(r(2603),t),n(r(1371),t),n(r(3186),t),n(r(8434),t)},3018:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("AcceptRelationshipChangeRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class AcceptRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.acceptChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(i))}};t.AcceptRelationshipChangeUseCase=d,t.AcceptRelationshipChangeUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,l])],d)},3986:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateRelationshipUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateRelationshipRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateRelationshipUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.relationshipsController=e,this.relationshipTemplateController=t,this.accountController=r}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));const r=await this.relationshipsController.sendRelationship({template:t,content:e.content});return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(r))}};t.CreateRelationshipUseCase=d,t.CreateRelationshipUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.RelationshipTemplateController,a.AccountController,l])],d)},1041:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributesForRelationshipUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(4714),p=r(7071),l=r(7049),d=r(3742);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class GetAttributesForRelationshipUseCase extends l.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.attributesController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(c.CoreId.from(e.id));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(c.Relationship));const r=t.peer.address.toString(),i={$or:[{[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.owner))}`]:r},{[`${(0,u.nameof)((e=>e.shareInfo))}.${(0,u.nameof)((e=>e.peer))}`]:r}]},n=await this.attributesController.getLocalAttributes(i,e.hideTechnical);return o.Result.ok(d.AttributeMapper.toAttributeDTOList(n))}};t.GetAttributesForRelationshipUseCase=y,t.GetAttributesForRelationshipUseCase=y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[c.RelationshipsController,a.AttributesController,f])],y)},9456:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetRelationshipUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.id));return t?o.Result.ok(p.RelationshipMapper.toRelationshipDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};t.GetRelationshipUseCase=d,t.GetRelationshipUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipsController,l])],d)},215:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipByAddressUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipByAddressRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetRelationshipByAddressUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=await this.relationshipsController.getRelationshipToIdentity(a.CoreAddress.from(e.address));return t?o.Result.ok(p.RelationshipMapper.toRelationshipDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};t.GetRelationshipByAddressUseCase=d,t.GetRelationshipByAddressUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipsController,l])],d)},3457:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipsUseCase=void 0;const a=r(2937),c=r(5172),u=r(9663),p=r(4714),l=r(7071),d=r(7049),f=r(4316);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipsRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetRelationshipsUseCase extends d.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query),r=await this.relationshipsController.getRelationships(t);return c.Result.ok(f.RelationshipMapper.toRelationshipDTOList(r))}};t.GetRelationshipsUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.peer))]:!0,[(0,p.nameof)((e=>e.status))]:!0,[`${(0,p.nameof)((e=>e.template))}.${(0,p.nameof)((e=>e.id))}`]:!0},alias:{[`${(0,p.nameof)((e=>e.template))}.${(0,p.nameof)((e=>e.id))}`]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.template))}.${(0,p.nameof)((e=>e.id))}`,[(0,p.nameof)((e=>e.status))]:(0,p.nameof)((e=>e.status)),[(0,p.nameof)((e=>e.peer))]:`${(0,p.nameof)((e=>e.peer))}.${(0,p.nameof)((e=>e.address))}`}}),t.GetRelationshipsUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.RelationshipsController,y])],h)},2214:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RejectRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RejectRelationshipChangeRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class RejectRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.rejectChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(i))}};t.RejectRelationshipChangeUseCase=d,t.RejectRelationshipChangeUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,l])],d)},4316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipMapper=void 0;const i=r(9663),n=r(7049),s=r(8434);t.RelationshipMapper=class RelationshipMapper{static toRelationshipDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Relationship,e.id.toString());return{id:e.id.toString(),template:s.RelationshipTemplateMapper.toRelationshipTemplateDTO(e.cache.template),status:e.status,peer:e.peer.address.toString(),peerIdentity:{address:e.peer.address.toString(),publicKey:e.peer.publicKey.toBase64(!1),realm:e.peer.realm},changes:e.cache.changes.map((e=>this.toRelationshipChangeDTO(e)))}}static toRelationshipDTOList(e){return e.map((e=>this.toRelationshipDTO(e)))}static toRelationshipChangeRequestDTO(e){return{createdBy:e.createdBy.toString(),createdByDevice:e.createdByDevice.toString(),createdAt:e.createdAt.toString(),content:e.content?.toJSON()}}static toRelationshipChangeResponseDTO(e){return{createdBy:e.createdBy.toString(),createdByDevice:e.createdByDevice.toString(),createdAt:e.createdAt.toString(),content:e.content?.toJSON()}}static toRelationshipChangeDTO(e){return{id:e.id.toString(),request:this.toRelationshipChangeRequestDTO(e.request),status:e.status,type:e.type,response:e.response?this.toRelationshipChangeResponseDTO(e.response):void 0}}}},5261:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RevokeRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RevokeRelationshipChangeRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class RevokeRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.revokeChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(i))}};t.RevokeRelationshipChangeUseCase=d,t.RevokeRelationshipChangeUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,l])],d)},7831:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3018),t),n(r(3986),t),n(r(1041),t),n(r(9456),t),n(r(215),t),n(r(3457),t),n(r(2214),t),n(r(4316),t),n(r(5261),t)},429:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOwnTokenUseCase=void 0;const o=r(194),a=r(5172),c=r(9663),u=r(8565),p=r(4714),l=r(7071),d=r(7049),f=r(7121);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("CreateOwnTokenRequest"))}validate(e){const t=super.validate(e);return t.isValid()?(u.DateTime.fromISO(e.expiresAt)<=u.DateTime.utc()&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.expiresAt))}' must be in the future`),(0,p.nameof)((e=>e.expiresAt)))),t):t}};y=i([s(0,l.Inject),n("design:paramtypes",[d.SchemaRepository])],y);let h=class CreateOwnTokenUseCase extends d.UseCase{constructor(e,t,r){super(r),this.tokenController=e,this.accountController=t}async executeInternal(e){let t;try{t=o.Serializable.fromUnknown(e.content)}catch{throw d.RuntimeErrors.general.invalidTokenContent()}const r=await this.tokenController.sendToken({content:t,expiresAt:c.CoreDate.from(e.expiresAt),ephemeral:e.ephemeral});return e.ephemeral||await this.accountController.syncDatawallet(),a.Result.ok(f.TokenMapper.toTokenDTO(r,e.ephemeral))}};t.CreateOwnTokenUseCase=h,t.CreateOwnTokenUseCase=h=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),n("design:paramtypes",[c.TokenController,c.AccountController,y])],h)},7896:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetQRCodeForTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetQRCodeForTokenRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class GetQRCodeForTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=await this.tokenController.getToken(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Token));const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};t.GetQRCodeForTokenUseCase=l,t.GetQRCodeForTokenUseCase=l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.TokenController,p])],l)},858:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetTokenRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=await this.tokenController.getToken(a.CoreId.from(e.id));return t?o.Result.ok(p.TokenMapper.toTokenDTO(t,!1)):o.Result.fail(u.RuntimeErrors.general.recordNotFound("Token"))}};t.GetTokenUseCase=d,t.GetTokenUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.TokenController,l])],d)},2093:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetTokensUseCase=void 0;const a=r(2937),c=r(5172),u=r(9663),p=r(4714),l=r(7071),d=r(7049),f=r(7121);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetTokensRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetTokensUseCase extends d.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,p.nameof)((e=>e.isOwn))]=e.ownerRestriction===d.OwnerRestriction.Own);const r=await this.tokenController.getTokens(t);return c.Result.ok(f.TokenMapper.toTokenDTOList(r,!1))}};t.GetTokensUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.createdBy))]:!0,[(0,p.nameof)((e=>e.createdByDevice))]:!0,[(0,p.nameof)((e=>e.expiresAt))]:!0},alias:{[(0,p.nameof)((e=>e.createdAt))]:`${(0,p.nameof)((e=>e.cache))}.${[(0,p.nameof)((e=>e.createdAt))]}`,[(0,p.nameof)((e=>e.createdBy))]:`${(0,p.nameof)((e=>e.cache))}.${[(0,p.nameof)((e=>e.createdBy))]}`,[(0,p.nameof)((e=>e.createdByDevice))]:`${(0,p.nameof)((e=>e.cache))}.${[(0,p.nameof)((e=>e.createdByDevice))]}`,[(0,p.nameof)((e=>e.expiresAt))]:`${(0,p.nameof)((e=>e.cache))}.${[(0,p.nameof)((e=>e.expiresAt))]}`}}),t.GetTokensUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.TokenController,y])],h)},8442:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(7121);function isLoadPeerTokenViaSecret(e){return"id"in e&&"secretKey"in e}function isLoadPeerTokenViaReference(e){return"reference"in e}let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenRequest")),this.loadViaSecretSchema=e.getSchema("LoadPeerTokenViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("LoadPeerTokenViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new p.ValidationResult;if(isLoadPeerTokenViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isLoadPeerTokenViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new p.ValidationResult;return t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class LoadPeerTokenUseCase extends p.UseCase{constructor(e,t,r){super(r),this.tokenController=e,this.accountController=t}async executeInternal(e){let t;if(isLoadPeerTokenViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.tokenController.loadPeerToken(c.CoreId.from(e.id),r,e.ephemeral)}else{if(!isLoadPeerTokenViaReference(e))throw new Error("Invalid request format.");t=await this.tokenController.loadPeerTokenByTruncated(e.reference,e.ephemeral)}return e.ephemeral||await this.accountController.syncDatawallet(),o.Result.ok(l.TokenMapper.toTokenDTO(t,e.ephemeral))}};t.LoadPeerTokenUseCase=f,t.LoadPeerTokenUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[c.TokenController,c.AccountController,d])],f)},7121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenMapper=void 0;const i=r(9663),n=r(7049);class TokenMapper{static toTokenDTO(e,t){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Token,e.id.toString());const r=e.toTokenReference();return{id:e.id.toString(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),content:e.cache.content.toJSON(),createdAt:e.cache.createdAt.toString(),expiresAt:e.cache.expiresAt.toString(),secretKey:e.secretKey.toBase64(!1),truncatedReference:r.truncate(),isEphemeral:t}}static toTokenDTOList(e,t){return e.map((e=>TokenMapper.toTokenDTO(e,t)))}}t.TokenMapper=TokenMapper},5631:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(429),t),n(r(7896),t),n(r(858),t),n(r(2093),t),n(r(8442),t),n(r(7121),t)},9126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryTranslator=void 0;class QueryTranslator{static defaultKeyRegex=/^[a-zA-Z_@][a-zA-Z@0-9-_]*(\.[a-zA-Z_@][a-zA-Z@0-9-_]*)*$/;static defaultValRegex=void 0;static defaultArrRegex=/^[a-zA-Zæøå0-9-_.]+(\[])?$/i;ops;alias;blacklist;whitelist;custom;string;keyRegex;valRegex;arrRegex;constructor(e={}){this.ops=e.ops??["!","^","$","~",">","<","$containsAny","$containsNone"],this.alias=e.alias??{},this.blacklist=e.blacklist??{},this.whitelist=e.whitelist??{},this.custom=e.custom??{},e.string=e.string??{},this.string=e.string,this.string.toBoolean="boolean"!=typeof e.string.toBoolean||e.string.toBoolean,this.string.toNumber="boolean"!=typeof e.string.toNumber||e.string.toNumber,this.keyRegex=e.keyRegex??QueryTranslator.defaultKeyRegex,this.valRegex=e.valRegex??QueryTranslator.defaultValRegex,this.arrRegex=e.arrRegex??QueryTranslator.defaultArrRegex}static setDefaultKeyRegex(e){QueryTranslator.defaultKeyRegex=e}static setDefaultValRegex(e){QueryTranslator.defaultValRegex=e}static setDefaultArrRegex(e){QueryTranslator.defaultArrRegex=e}parseString(e,t){let r=e[0]||"";const i="="===e[1];let n=e.substr(i?2:1)||"";const s=this.parseStringVal(n),o={op:r,org:n,value:s};switch(r){case"!":t?o.field="$containsNone":""===n?(o.field="$exists",o.value=!1):o.field="$ne";break;case">":o.field=i?"$gte":"$gt";break;case"<":o.field=i?"$lte":"$lt";break;case"^":case"$":case"~":switch(o.field="$regex",o.options="i",o.value=this.valRegex?n.replace(this.valRegex,""):o.value.toString(),r){case"^":o.value=`^${s}`;break;case"$":o.value=`${s}$`}break;default:o.org=n=r+n,o.op=r="",o.value=this.parseStringVal(n),t?o.field="$containsAny":""===n?(o.field="$exists",o.value=!0):o.field="$eq"}return o.parsed={},o.parsed[o.field]=o.value,o.options&&(o.parsed.$options=o.options),o}parseStringVal(e){return!(!this.string.toBoolean||"true"!==e.toLowerCase())||(!this.string.toBoolean||"false"!==e.toLowerCase())&&(this.string.toNumber&&!isNaN(parseInt(e,10))&&+e-+e+1>=0?parseFloat(e):e)}parse(e){if(!e)return{};const t={};for(let r of Object.keys(e)){if("__proto__"===r)continue;const i=e[r];if(Array.isArray(i)&&(r=r.replace(/\[]$/,"")),(!Object.keys(this.whitelist).length||this.whitelist[r])&&!this.blacklist[r]&&(this.alias[r]&&(r=this.alias[r]),("string"!=typeof i||this.keyRegex.test(r))&&(!Array.isArray(i)||this.arrRegex.test(r))))if("function"!=typeof this.custom[r])if(Array.isArray(i)){if(this.ops.includes("$containsAny")&&i.length>0){t[r]={};for(const e of i)if(this.ops.includes(e[0])){const i=this.parseString(e,!0);switch(i.field){case"$containsAny":case"$containsNone":t[r][i.field]=t[r][i.field]||[],t[r][i.field].push(i.value);break;case"$regex":t[r].$regex=i.value,t[r].$options=i.options;break;default:t[r][i.field]=i.value}}else t[r].$containsAny=t[r].$containsAny||[],t[r].$containsAny.push(this.parseStringVal(e))}}else"string"==typeof i&&(i?this.ops.includes(i[0])?t[r]=this.parseString(i).parsed:t[r]=this.parseStringVal(i):t[r]={$exists:!0});else this.custom[r].apply(null,[t,i])}return t}}t.QueryTranslator=QueryTranslator},2937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryTranslator=void 0;var i=r(9126);Object.defineProperty(t,"QueryTranslator",{enumerable:!0,get:function(){return i.QueryTranslator}})},1174:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9159:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventNamespaceFromObject=t.EventBus=void 0;t.EventBus=class EventBus{},t.getEventNamespaceFromObject=function getEventNamespaceFromObject(e){return e.namespace}},5970:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionTargetInfo=void 0;class SubscriptionTargetInfo{namespace;constructor(e){this.namespace=e}static from(e){return e instanceof Function?new ConstructorSubscriptionTargetInfo(e):new NamespaceSubscriptionTargetInfo(e)}}t.SubscriptionTargetInfo=SubscriptionTargetInfo;class ConstructorSubscriptionTargetInfo extends SubscriptionTargetInfo{constructorFunction;constructor(e){super(function getEventNamespaceFromClass(e){return e.namespace}(e)),this.constructorFunction=e}isCompatibleWith(e){return e instanceof this.constructorFunction}}class NamespaceSubscriptionTargetInfo extends SubscriptionTargetInfo{constructor(e){super(e)}isCompatibleWith(e){return!0}}},9729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter2EventBus=void 0;const i=r(6387);r(8660);const n=r(9159),s=r(5970);t.EventEmitter2EventBus=class EventEmitter2EventBus{errorCallback;emitter;listeners=new Map;nextId=0;invocationPromises=[];constructor(e,t){this.errorCallback=e,this.emitter=new i.EventEmitter2({maxListeners:50,verboseMemoryLeak:!0,...t,wildcard:!0})}subscribe(e,t){return this.registerHandler(e,t)}subscribeOnce(e,t){return this.registerHandler(e,t,!0)}unsubscribe(e){return this.unregisterHandler(e)}registerHandler(e,t,r=!1){const i=s.SubscriptionTargetInfo.from(e),n=this.nextId++,handlerWrapper=async e=>{if(!i.isCompatibleWith(e))return;const s=(async()=>await t(e))();this.invocationPromises.push(s),await s.catch((e=>this.errorCallback(e,i.namespace))),this.invocationPromises=this.invocationPromises.filter((e=>e!==s)),r&&this.listeners.delete(n)};if(r){const e=this.emitter.once(i.namespace,handlerWrapper,{objectify:!0});return this.listeners.set(n,e),n}const o=this.emitter.on(i.namespace,handlerWrapper,{objectify:!0});return this.listeners.set(n,o),n}unregisterHandler(e){const t=this.listeners.get(e);return!!t&&(t.off(),this.listeners.delete(e),!0)}publish(e){const t=(0,n.getEventNamespaceFromObject)(e);if(!t)throw Error("The event needs a namespace. Use the EventNamespace-decorator in order to define a namespace for a event.");this.emitter.emit(t,e)}async close(e){this.emitter.removeAllListeners();const t=Promise.all(this.invocationPromises).catch((()=>{}));if(!e)return void await t;let r;const i=new Promise(((t,i)=>{r=setTimeout((()=>{i(new Error("timeout exceeded while waiting for events to process"))}),e)}));await Promise.race([t,i]),clearTimeout(r)}}},9256:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9159),t),n(r(9729),t)},5917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataEvent=void 0;const i=r(8267);class DataEvent extends i.Event{data;constructor(e,t){super(e),this.data=t}}t.DataEvent=DataEvent},8267:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;t.Event=class Event{namespace;constructor(e){this.namespace=e}}},2636:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5917),t),n(r(8267),t)},5172:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9256),t),n(r(2636),t),n(r(9855),t),n(r(1809),t),n(r(4569),t),n(r(1174),t),n(r(7226),t),n(r(7374),t)},9855:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.log=void 0;const n=i(r(4530));t.log=function log(e){return function(t,r,i){const s=i.value;return i.value=function(...t){const i=this;try{e?.logParams?i.log.trace(`Calling ${r}(${t.map((e=>(0,n.default)(e))).join(", ")})`):i.log.trace(`Calling ${r}`);const o=s.apply(this,t);return e?.logReturnValue?i.log.trace(`Returning from ${r} with: ${(0,n.default)(o)}`):i.log.trace(`Returning from ${r}`),o}catch(e){throw e instanceof Error&&e.stack&&(e.stack=e.stack.split("\n").filter((e=>!e.includes(".propertyDescriptorDoNotChangeMyNamePlease.value"))).join("\n")),i.log.error(`Error in ${r}:`,e),e}},i}}},1809:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.measureExcecutionTime=void 0,t.measureExcecutionTime=function measureExcecutionTime(e,t,r){const i=r.value;return r.value=async function(...e){const t=Date.now(),r=await i.apply(this,e),n=Date.now();return console.info(`Execution time: ${n-t}ms`),r},r}},4569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomString=void 0,t.randomString=function randomString(e,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let r="";const i=t.length;for(let n=0;n<e;n++)r+=t.charAt(Math.floor(Math.random()*i));return r}},7807:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationError=void 0;class ApplicationError extends Error{code;data;constructor(e,t,r){super(t),this.code=e,this.data=r}equals(e){return this.code===e.code}toString(){return JSON.stringify({code:this.code,message:this.message,data:this.data},void 0,2)}}t.ApplicationError=ApplicationError},9278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Result=void 0;class Result{_isSuccess;_error;_value;constructor(e,t,r){if(e&&r)throw new Error("InvalidOperation: A result cannot be successful and contain an error");if(!e&&!r)throw new Error("InvalidOperation: A failing result needs to contain an error");if(void 0!==t&&!e)throw new Error("InvalidOperation: A value is only useful in case of a success.");this._value=t,this._isSuccess=e,this._error=r}get isSuccess(){return this._isSuccess}get isError(){return!this._isSuccess}get error(){return this._error}get value(){if(!this.isSuccess)throw new Error(`Can't get the value of an error result. Use 'error' instead. Root error: \r\n${this.error}`);return this._value}static ok(e){return new Result(!0,e)}static fail(e){return new Result(!1,void 0,e)}}t.Result=Result},7226:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7807),t),n(r(9278),t)},7374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0,t.sleep=function sleep(e){return new Promise((t=>{setTimeout(t,e)}))}},7239:e=>{"use strict";function resolvePath(e,t,r=null){let i=e;for(const e of t){if(!Object.keys(i).includes(e))return r;i=i[e]}return i}function match(e,t,r,i=void 0){const n=[];for(let s=0;s<e.length;s++){const o=resolvePath(e[s],t,null);void 0!==i&&e[s].value["@type"]!==i||null!==o&&r(o)&&n.push(s)}return n}function peg$SyntaxError(e,t,r,i){var n=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(n,peg$SyntaxError.prototype),n.expected=t,n.found=r,n.location=i,n.name="SyntaxError",n}function peg$padEnd(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}!function peg$subclass(e,t){function C(){this.constructor=e}C.prototype=t.prototype,e.prototype=new C}(peg$SyntaxError,Error),peg$SyntaxError.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var n=this.location.start,s=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(n):n,o=this.location.source+":"+s.line+":"+s.column;if(i){var a=this.location.end,c=peg$padEnd("",s.line.toString().length," "),u=i[n.line-1],p=(n.line===a.line?a.column:u.length+1)-n.column||1;t+="\n --\x3e "+o+"\n"+c+" |\n"+s.line+" | "+u+"\n"+c+" | "+peg$padEnd("",n.column-1," ")+peg$padEnd("",p,"^")}else t+="\n at "+o}return t},peg$SyntaxError.buildMessage=function(e,t){var r={literal:function(e){return'"'+literalEscape(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?classEscape(e[0])+"-"+classEscape(e[1]):classEscape(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function hex(e){return e.charCodeAt(0).toString(16).toUpperCase()}function literalEscape(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+hex(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+hex(e)}))}function classEscape(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+hex(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+hex(e)}))}function describeExpectation(e){return r[e.type](e)}return"Expected "+function describeExpected(e){var t,r,i=e.map(describeExpectation);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function describeFound(e){return e?'"'+literalEscape(e)+'"':"end of input"}(t)+" found."},e.exports={SyntaxError:peg$SyntaxError,parse:function peg$parse(e,t){var r,i={},n=(t=void 0!==t?t:{}).grammarSource,s={Expr:peg$parseExpr},o=peg$parseExpr,a="||",c="&&",u="!",p="(",l=")",d=".",f="#",y="'",h="\\\\",g="\\'",m=/^[=><~]/,v=/^[?]/,b=/^[^'\\]/,R=/^[^'\\ ]/,O=/^[a-z]/,S=/^[A-za-z0-9]/,I=/^[A-Z]/,P=/^[A-Za-z0-9]/,w=/^[ \t\n\r]/,j=peg$literalExpectation("||",!1),$=peg$literalExpectation("&&",!1),A=peg$literalExpectation("!",!1),N=peg$literalExpectation("(",!1),x=peg$literalExpectation(")",!1),T=peg$otherExpectation("metadata field term"),q=peg$literalExpectation(".",!1),E=peg$otherExpectation("tag term"),D=peg$literalExpectation("#",!1),M=peg$otherExpectation("primary field term"),k=peg$classExpectation(["=",">","<","~"],!1,!1),J=peg$classExpectation(["?"],!1,!1),F=peg$literalExpectation("'",!1),U=peg$literalExpectation("\\\\",!1),L=peg$literalExpectation("\\'",!1),V=peg$classExpectation(["'","\\"],!0,!1),B=peg$classExpectation(["'","\\"," "],!0,!1),H=peg$classExpectation([["a","z"]],!1,!1),z=peg$classExpectation([["A","z"],["a","z"],["0","9"]],!1,!1),G=peg$otherExpectation("attribute type"),Q=peg$classExpectation([["A","Z"]],!1,!1),K=peg$classExpectation([["A","Z"],["a","z"],["0","9"]],!1,!1),Z=peg$otherExpectation("whitespace"),W=peg$classExpectation([" ","\t","\n","\r"],!1,!1),peg$f0=function(e,t){return t.reduce(((e,t)=>function union(e,t){const r=Array.from(new Set([...e,...t]));return r.sort(((e,t)=>e-t)),r}(e,t)),e)},peg$f1=function(e,t){return t.reduce(((e,t)=>function intersect(e,...t){const r=[e,...t].reduce(((e,t)=>e.filter((e=>t.includes(e)))));return r.sort(((e,t)=>e-t)),r}(e,t)),e)},peg$f2=function(e){return function diffAsym(e,t){const r=e.filter((e=>!t.includes(e)));return r.sort(((e,t)=>e-t)),r}([...Array(t.attributes.length).keys()],e)},peg$f3=function(e,r,i){return match(t.attributes,[e,...r],i)},peg$f4=function(e){return match(t.attributes,["tags"],(t=>Array.isArray(t)&&t.includes(e)))},peg$f5=function(e,r,i){return match(t.attributes,["value",...r],i,e)},peg$f6=function(e,r){return match(t.attributes,["value","value"],r,e)},peg$f7=function(e){return match(t.attributes,["value","@type"],(t=>t===e))},peg$f8=function(e,t){switch(e){case"=":return e=>String(e)===t;case">":return e=>new Date(e)>=new Date(t);case"<":return e=>new Date(e)<=new Date(t);case"~":return e=>Array.isArray(e)&&e.includes(t)}},peg$f9=function(e){if("?"===e)return e=>Array.isArray(e)?e.length>0:"Object"===e.constructor.name?Object.keys(e).length>0:null!=e},peg$f10=function(e){return e.join("").replaceAll("\\\\","\\").replaceAll("\\'","'")},peg$f11=function(e){return e.join("").replaceAll("\\\\","\\").replaceAll("\\'","'")},Y=0,X=[{line:1,column:1}],ee=0,te=[],re=0;if("startRule"in t){if(!(t.startRule in s))throw new Error("Can't start parsing from rule \""+t.startRule+'".');o=s[t.startRule]}function peg$literalExpectation(e,t){return{type:"literal",text:e,ignoreCase:t}}function peg$classExpectation(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function peg$otherExpectation(e){return{type:"other",description:e}}function peg$computePosDetails(t){var r,i=X[t];if(i)return i;for(r=t-1;!X[r];)r--;for(i={line:(i=X[r]).line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return X[t]=i,i}function peg$computeLocation(e,t,r){var i=peg$computePosDetails(e),s=peg$computePosDetails(t),o={source:n,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:s.line,column:s.column}};return r&&n&&"function"==typeof n.offset&&(o.start=n.offset(o.start),o.end=n.offset(o.end)),o}function peg$fail(e){Y<ee||(Y>ee&&(ee=Y,te=[]),te.push(e))}function peg$buildStructuredError(e,t,r){return new peg$SyntaxError(peg$SyntaxError.buildMessage(e,t),e,t,r)}function peg$parseExpr(){var t,r,n,s,o,c,u,p;if(t=Y,(r=peg$parseExpr0())!==i){if(n=[],s=Y,o=[],(c=peg$parse_())!==i)for(;c!==i;)o.push(c),c=peg$parse_();else o=i;if(o!==i)if(e.substr(Y,2)===a?(c=a,Y+=2):(c=i,0===re&&peg$fail(j)),c!==i){if(u=[],(p=peg$parse_())!==i)for(;p!==i;)u.push(p),p=peg$parse_();else u=i;u!==i&&(p=peg$parseExpr0())!==i?s=p:(Y=s,s=i)}else Y=s,s=i;else Y=s,s=i;for(;s!==i;){if(n.push(s),s=Y,o=[],(c=peg$parse_())!==i)for(;c!==i;)o.push(c),c=peg$parse_();else o=i;if(o!==i)if(e.substr(Y,2)===a?(c=a,Y+=2):(c=i,0===re&&peg$fail(j)),c!==i){if(u=[],(p=peg$parse_())!==i)for(;p!==i;)u.push(p),p=peg$parse_();else u=i;u!==i&&(p=peg$parseExpr0())!==i?s=p:(Y=s,s=i)}else Y=s,s=i;else Y=s,s=i}t,t=peg$f0(r,n)}else Y=t,t=i;return t}function peg$parseExpr0(){var t,r,n,s,o,a,u,p;if(t=Y,(r=peg$parseExpr1())!==i){if(n=[],s=Y,o=[],(a=peg$parse_())!==i)for(;a!==i;)o.push(a),a=peg$parse_();else o=i;if(o!==i)if(e.substr(Y,2)===c?(a=c,Y+=2):(a=i,0===re&&peg$fail($)),a!==i){if(u=[],(p=peg$parse_())!==i)for(;p!==i;)u.push(p),p=peg$parse_();else u=i;u!==i&&(p=peg$parseExpr1())!==i?s=p:(Y=s,s=i)}else Y=s,s=i;else Y=s,s=i;for(;s!==i;){if(n.push(s),s=Y,o=[],(a=peg$parse_())!==i)for(;a!==i;)o.push(a),a=peg$parse_();else o=i;if(o!==i)if(e.substr(Y,2)===c?(a=c,Y+=2):(a=i,0===re&&peg$fail($)),a!==i){if(u=[],(p=peg$parse_())!==i)for(;p!==i;)u.push(p),p=peg$parse_();else u=i;u!==i&&(p=peg$parseExpr1())!==i?s=p:(Y=s,s=i)}else Y=s,s=i;else Y=s,s=i}t,t=peg$f1(r,n)}else Y=t,t=i;return t}function peg$parseExpr1(){var t,r,n;return t=Y,33===e.charCodeAt(Y)?(r=u,Y++):(r=i,0===re&&peg$fail(A)),r!==i&&(n=peg$parseExpr1())!==i?(t,t=peg$f2(n)):(Y=t,t=i),t===i&&(t=function peg$parseExpr2(){var t,r,n,s,o,a;t=Y,40===e.charCodeAt(Y)?(r=p,Y++):(r=i,0===re&&peg$fail(N));if(r!==i){if(n=[],(s=peg$parse_())!==i)for(;s!==i;)n.push(s),s=peg$parse_();else n=i;if(n!==i)if((s=peg$parseExpr())!==i){if(o=[],(a=peg$parse_())!==i)for(;a!==i;)o.push(a),a=peg$parse_();else o=i;o!==i?(41===e.charCodeAt(Y)?(a=l,Y++):(a=i,0===re&&peg$fail(x)),a!==i?t=s:(Y=t,t=i)):(Y=t,t=i)}else Y=t,t=i;else Y=t,t=i}else Y=t,t=i;t===i&&(t=function peg$parseTerm(){var t;t=function peg$parsePrimaryFieldTerm(){var t,r,n,s,o,a;if(re++,t=Y,r=peg$parseAttributeType(),r!==i){if(n=[],s=Y,46===e.charCodeAt(Y)?(o=d,Y++):(o=i,0===re&&peg$fail(q)),o!==i&&(a=peg$parsePathSegment())!==i?s=a:(Y=s,s=i),s!==i)for(;s!==i;)n.push(s),s=Y,46===e.charCodeAt(Y)?(o=d,Y++):(o=i,0===re&&peg$fail(q)),o!==i&&(a=peg$parsePathSegment())!==i?s=a:(Y=s,s=i);else n=i;n!==i&&(s=peg$parsePredicate())!==i?(t,t=peg$f5(r,n,s)):(Y=t,t=i)}else Y=t,t=i;t===i&&(t=Y,(r=peg$parseAttributeType())!==i&&(n=peg$parsePredicate())!==i?(t,t=peg$f6(r,n)):(Y=t,t=i),t===i&&(t=Y,(r=peg$parseAttributeType())!==i&&(t,r=peg$f7(r)),t=r));re--,t===i&&(r=i,0===re&&peg$fail(M));return t}(),t===i&&(t=function peg$parseMetadataFieldTerm(){var t,r,n,s,o,a;if(re++,t=Y,r=peg$parsePathSegment(),r!==i){for(n=[],s=Y,46===e.charCodeAt(Y)?(o=d,Y++):(o=i,0===re&&peg$fail(q)),o!==i&&(a=peg$parsePathSegment())!==i?s=a:(Y=s,s=i);s!==i;)n.push(s),s=Y,46===e.charCodeAt(Y)?(o=d,Y++):(o=i,0===re&&peg$fail(q)),o!==i&&(a=peg$parsePathSegment())!==i?s=a:(Y=s,s=i);(s=peg$parsePredicate())!==i?(t,t=peg$f3(r,n,s)):(Y=t,t=i)}else Y=t,t=i;re--,t===i&&(r=i,0===re&&peg$fail(T));return t}(),t===i&&(t=function peg$parseTagTerm(){var t,r,n;re++,t=Y,35===e.charCodeAt(Y)?(r=f,Y++):(r=i,0===re&&peg$fail(D));r!==i&&(n=peg$parsePredicateRHS())!==i?(t,t=peg$f4(n)):(Y=t,t=i);re--,t===i&&(r=i,0===re&&peg$fail(E));return t}()));return t}());return t}()),t}function peg$parsePredicate(){var t,r,n;return t=Y,m.test(e.charAt(Y))?(r=e.charAt(Y),Y++):(r=i,0===re&&peg$fail(k)),r!==i&&(n=peg$parsePredicateRHS())!==i?(t,t=peg$f8(r,n)):(Y=t,t=i),t===i&&(t=Y,v.test(e.charAt(Y))?(r=e.charAt(Y),Y++):(r=i,0===re&&peg$fail(J)),r!==i&&(t,r=peg$f9(r)),t=r),t}function peg$parsePredicateRHS(){var t,r,n,s;if(t=Y,39===e.charCodeAt(Y)?(r=y,Y++):(r=i,0===re&&peg$fail(F)),r!==i){for(n=[],e.substr(Y,2)===h?(s=h,Y+=2):(s=i,0===re&&peg$fail(U)),s===i&&(e.substr(Y,2)===g?(s=g,Y+=2):(s=i,0===re&&peg$fail(L)),s===i&&(b.test(e.charAt(Y))?(s=e.charAt(Y),Y++):(s=i,0===re&&peg$fail(V))));s!==i;)n.push(s),e.substr(Y,2)===h?(s=h,Y+=2):(s=i,0===re&&peg$fail(U)),s===i&&(e.substr(Y,2)===g?(s=g,Y+=2):(s=i,0===re&&peg$fail(L)),s===i&&(b.test(e.charAt(Y))?(s=e.charAt(Y),Y++):(s=i,0===re&&peg$fail(V))));39===e.charCodeAt(Y)?(s=y,Y++):(s=i,0===re&&peg$fail(F)),s!==i?(t,t=peg$f10(n)):(Y=t,t=i)}else Y=t,t=i;if(t===i){for(t=Y,r=[],e.substr(Y,2)===h?(n=h,Y+=2):(n=i,0===re&&peg$fail(U)),n===i&&(e.substr(Y,2)===g?(n=g,Y+=2):(n=i,0===re&&peg$fail(L)),n===i&&(R.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=i,0===re&&peg$fail(B))));n!==i;)r.push(n),e.substr(Y,2)===h?(n=h,Y+=2):(n=i,0===re&&peg$fail(U)),n===i&&(e.substr(Y,2)===g?(n=g,Y+=2):(n=i,0===re&&peg$fail(L)),n===i&&(R.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=i,0===re&&peg$fail(B))));t,t=r=peg$f11(r)}return t}function peg$parsePathSegment(){var t,r,n,s,o;if(t=Y,r=Y,O.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=i,0===re&&peg$fail(H)),n!==i){if(s=[],S.test(e.charAt(Y))?(o=e.charAt(Y),Y++):(o=i,0===re&&peg$fail(z)),o!==i)for(;o!==i;)s.push(o),S.test(e.charAt(Y))?(o=e.charAt(Y),Y++):(o=i,0===re&&peg$fail(z));else s=i;s!==i?r=n=[n,s]:(Y=r,r=i)}else Y=r,r=i;return t=r!==i?e.substring(t,Y):r}function peg$parseAttributeType(){var t,r,n,s,o;if(re++,t=Y,r=Y,I.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=i,0===re&&peg$fail(Q)),n!==i){for(s=[],P.test(e.charAt(Y))?(o=e.charAt(Y),Y++):(o=i,0===re&&peg$fail(K));o!==i;)s.push(o),P.test(e.charAt(Y))?(o=e.charAt(Y),Y++):(o=i,0===re&&peg$fail(K));r=n=[n,s]}else Y=r,r=i;return t=r!==i?e.substring(t,Y):r,re--,t===i&&(r=i,0===re&&peg$fail(G)),t}function peg$parse_(){var t;return re++,w.test(e.charAt(Y))?(t=e.charAt(Y),Y++):(t=i,0===re&&peg$fail(W)),re--,t===i&&(i,0===re&&peg$fail(Z)),t}if((r=o())!==i&&Y===e.length)return r;throw r!==i&&Y<e.length&&peg$fail({type:"end"}),peg$buildStructuredError(te,ee<e.length?e.charAt(ee):null,ee<e.length?peg$computeLocation(ee,ee+1):peg$computeLocation(ee,ee))}}},2173:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.execute=void 0;const i=r(7239);t.execute=function execute(e,t){return(0,i.parse)(e,{attributes:t})},t.validate=function validate(e){try{return(0,i.parse)(e,{attributes:[]}),{isValid:!0}}catch(e){if(e instanceof i.SyntaxError){const t=e;return{isValid:!1,error:{message:t.message,location:{start:t.location.start,end:t.location.end}}}}return{isValid:!1,error:{message:JSON.stringify(e),location:{start:{column:0,line:0,offset:0},end:{column:0,line:0,offset:0}}}}}}},3351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(1581),n=r(3487),s=r(7023),o=r(4815),a=r(4181),c=r(2141),u="errorMessage",p=new i.Name("emUsed"),l={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,f=/\$\{([^}]+)\}/g,y=/^""\s*\+\s*|\s*\+\s*""$/g;function errorMessage(e){return{keyword:u,schemaType:["string","object"],post:!0,code(t){const{gen:r,data:h,schema:g,schemaValue:m,it:v}=t;if(!1===v.createErrors)return;const b=g,R=n.strConcat(c.default.instancePath,v.errorPath);function matchKeywordError(e,t){return n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${p}`,i._`${e}.instancePath === ${R}`,i._`${e}.keyword in ${t}`,i._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${v.errSchemaPath.length}))`)}function getTemplatesCode(e,t){const i=[];for(const r in e){const e=t[r];d.test(e)&&i.push([r,templateFunc(e)])}return r.object(...i)}function templateExpr(e){return d.test(e)?new s._Code(s.safeStringify(e).replace(f,((e,t)=>`" + JSON.stringify(${o.getData(t,v)}) + "`)).replace(y,"")):i.stringify(e)}function templateFunc(e){return i._`function(){return ${templateExpr(e)}}`}r.if(i._`${c.default.errors} > 0`,(()=>{if("object"==typeof b){const[s,o]=function keywordErrorsConfig(e){let t,r;for(const i in e){if("properties"===i||"items"===i)continue;const n=e[i];if("object"==typeof n){t||(t={});const e=t[i]={};for(const t in n)e[t]=[]}else r||(r={}),r[i]=[]}return[t,r]}(b);o&&function processKeywordErrors(n){const s=r.const("emErrors",i.stringify(n)),o=r.const("templates",getTemplatesCode(n,g));r.forOf("err",c.default.vErrors,(e=>r.if(matchKeywordError(e,s),(()=>r.code(i._`${s}[${e}.keyword].push(${e})`).assign(i._`${e}.${p}`,!0)))));const{singleError:u}=e;if(u){const e=r.let("message",i._`""`),n=r.let("paramsErrors",i._`[]`);loopErrors((t=>{r.if(e,(()=>r.code(i._`${e} += ${"string"==typeof u?u:";"}`))),r.code(i._`${e} += ${errMessage(t)}`),r.assign(n,i._`${n}.concat(${s}[${t}])`)})),a.reportError(t,{message:e,params:i._`{errors: ${n}}`})}else loopErrors((e=>a.reportError(t,{message:errMessage(e),params:i._`{errors: ${s}[${e}]}`})));function loopErrors(e){r.forIn("key",s,(t=>r.if(i._`${s}[${t}].length`,(()=>e(t)))))}function errMessage(e){return i._`${e} in ${o} ? ${o}[${e}]() : ${m}[${e}]`}}(o),s&&function processKeywordPropErrors(e){const n=r.const("emErrors",i.stringify(e)),s=[];for(const t in e)s.push([t,getTemplatesCode(e[t],g[t])]);const o=r.const("templates",r.object(...s)),u=r.scopeValue("obj",{ref:l,code:i.stringify(l)}),d=r.let("emPropParams"),f=r.let("emParamsErrors");r.forOf("err",c.default.vErrors,(e=>r.if(matchKeywordError(e,n),(()=>{r.assign(d,i._`${u}[${e}.keyword]`),r.assign(f,i._`${n}[${e}.keyword][${e}.params[${d}]]`),r.if(f,(()=>r.code(i._`${f}.push(${e})`).assign(i._`${e}.${p}`,!0)))})))),r.forIn("key",n,(e=>r.forIn("keyProp",i._`${n}[${e}]`,(s=>{r.assign(f,i._`${n}[${e}][${s}]`),r.if(i._`${f}.length`,(()=>{const n=r.const("tmpl",i._`${o}[${e}] && ${o}[${e}][${s}]`);a.reportError(t,{message:i._`${n} ? ${n}() : ${m}[${e}][${s}]`,params:i._`{errors: ${f}}`})}))}))))}(s),function processChildErrors(e){const{props:s,items:o}=e;if(!s&&!o)return;const l=i._`typeof ${h} == "object"`,d=i._`Array.isArray(${h})`,f=r.let("emErrors");let y,v;const b=r.let("templates");s&&o?(y=r.let("emChildKwd"),r.if(l),r.if(d,(()=>{init(o,g.items),r.assign(y,i.str`items`)}),(()=>{init(s,g.properties),r.assign(y,i.str`properties`)})),v=i._`[${y}]`):o?(r.if(d),init(o,g.items),v=i._`.items`):s&&(r.if(n.and(l,n.not(d))),init(s,g.properties),v=i._`.properties`);function init(e,t){r.assign(f,i.stringify(e)),r.assign(b,getTemplatesCode(e,t))}r.forOf("err",c.default.vErrors,(e=>function ifMatchesChildError(e,t,s){r.if(n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${p}`,i._`${e}.instancePath.indexOf(${R}) === 0`),(()=>{const n=r.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),o=r.const("emMatches",i._`${n}.exec(${e}.instancePath.slice(${R}.length))`),a=r.const("emChild",i._`${o} && ${o}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);r.if(i._`${a} !== undefined && ${a} in ${t}`,(()=>s(a)))}))}(e,f,(t=>r.code(i._`${f}[${t}].push(${e})`).assign(i._`${e}.${p}`,!0))))),r.forIn("key",f,(e=>r.if(i._`${f}[${e}].length`,(()=>{a.reportError(t,{message:i._`${e} in ${b} ? ${b}[${e}]() : ${m}${v}[${e}]`,params:i._`{errors: ${f}[${e}]}`}),r.assign(i._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,i._`${R} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),r.endIf()}(function childErrorsConfig({properties:e,items:t}){const r={};if(e){r.props={};for(const t in e)r.props[t]=[]}if(t){r.items={};for(let e=0;e<t.length;e++)r.items[e]=[]}return r}(b))}const s="string"==typeof b?b:b._;s&&function processAllErrors(e){const s=r.const("emErrs",i._`[]`);r.forOf("err",c.default.vErrors,(e=>r.if(function matchAnyError(e){return n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${p}`,n.or(i._`${e}.instancePath === ${R}`,n.and(i._`${e}.instancePath.indexOf(${R}) === 0`,i._`${e}.instancePath[${R}.length] === "/"`)),i._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,i._`${e}.schemaPath[${v.errSchemaPath}.length] === "/"`)}(e),(()=>r.code(i._`${s}.push(${e})`).assign(i._`${e}.${p}`,!0))))),r.if(i._`${s}.length`,(()=>a.reportError(t,{message:templateExpr(e),params:i._`{errors: ${s}}`})))}(s),e.keepErrors||function removeUsedErrors(){const e=r.const("emErrs",i._`[]`);r.forOf("err",c.default.vErrors,(t=>r.if(i._`!${t}.${p}`,(()=>r.code(i._`${e}.push(${t})`))))),r.assign(c.default.vErrors,e).assign(c.default.errors,i._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const ajvErrors=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(errorMessage(t))};t.default=ajvErrors,e.exports=ajvErrors,e.exports.default=ajvErrors},6870:(e,t)=>{"use strict";function fmtDef(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(time,compareTime),"date-time":fmtDef((function date_time(e){const t=e.split(s);return 2===t.length&&date(t[0])&&time(t[1],!0)}),compareDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function uri(e){return o.test(e)&&a.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function regex(e){if(l.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function byte(e){return c.lastIndex=0,c.test(e)},int32:{type:"number",validate:function validateInt32(e){return Number.isInteger(e)&&e<=p&&e>=u}},int64:{type:"number",validate:function validateInt64(e){return Number.isInteger(e)}},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(e){const t=r.exec(e);if(!t)return!1;const n=+t[1],s=+t[2],o=+t[3];return s>=1&&s<=12&&o>=1&&o<=(2===s&&function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}(n)?29:i[s])}function compareDate(e,t){if(e&&t)return e>t?1:e<t?-1:0}const n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function time(e,t){const r=n.exec(e);if(!r)return!1;const i=+r[1],s=+r[2],o=+r[3],a=r[5];return(i<=23&&s<=59&&o<=59||23===i&&59===s&&60===o)&&(!t||""!==a)}function compareTime(e,t){if(!e||!t)return;const r=n.exec(e),i=n.exec(t);return r&&i?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=i[1]+i[2]+i[3]+(i[4]||""))?1:e<t?-1:0:void 0}const s=/t|\s/i;function compareDateTime(e,t){if(!e||!t)return;const[r,i]=e.split(s),[n,o]=t.split(s),a=compareDate(r,n);return void 0!==a?a||compareTime(i,o):void 0}const o=/\/|:/,a=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;const c=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;const u=-(2**31),p=2**31-1;function validateNumber(){return!0}const l=/[^\\]\\Z/},5477:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(6870),n=r(7963),s=r(3487),o=new s.Name("fullFormats"),a=new s.Name("fastFormats"),formatsPlugin=(e,t={keywords:!0})=>{if(Array.isArray(t))return addFormats(e,t,i.fullFormats,o),e;const[r,s]="fast"===t.mode?[i.fastFormats,a]:[i.fullFormats,o];return addFormats(e,t.formats||i.formatNames,r,s),t.keywords&&n.default(e),e};function addFormats(e,t,r,i){var n,o;null!==(n=(o=e.opts.code).formats)&&void 0!==n||(o.formats=s._`require("ajv-formats/dist/formats").${i}`);for(const i of t)e.addFormat(i,r[i])}formatsPlugin.get=(e,t="full")=>{const r=("fast"===t?i.fastFormats:i.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=formatsPlugin,Object.defineProperty(t,"__esModule",{value:!0}),t.default=formatsPlugin},7963:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const i=r(1581),n=r(3487),s=n.operators,o={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:e,schemaCode:t})=>n.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:s,keyword:a,it:c}=e,{opts:u,self:p}=c;if(!u.validateFormats)return;const l=new i.KeywordCxt(c,p.RULES.all.format.definition,"format");function compareCode(e){return n._`${e}.compare(${r}, ${s}) ${o[a].fail} 0`}l.$data?function validate$DataFormat(){const r=t.scopeValue("formats",{ref:p.formats,code:u.code.formats}),i=t.const("fmt",n._`${r}[${l.schemaCode}]`);e.fail$data(n.or(n._`typeof ${i} != "object"`,n._`${i} instanceof RegExp`,n._`typeof ${i}.compare != "function"`,compareCode(i)))}():function validateFormat(){const r=l.schema,i=p.formats[r];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const s=t.scopeValue("formats",{key:r,ref:i,code:u.code.formats?n._`${u.code.formats}${n.getProperty(r)}`:void 0});e.fail$data(compareCode(s))}()},dependencies:["format"]};t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},1581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const i=r(7159),n=r(3924),s=r(1240),o=r(98),a=["/properties"],c="http://json-schema.org/draft-07/schema";class Ajv extends i.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=Ajv,Object.defineProperty(t,"__esModule",{value:!0}),t.default=Ajv;var u=r(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var p=r(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var l=r(7426);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var d=r(6646);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})},7023:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class _CodeOrName{}t._CodeOrName=_CodeOrName,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=Name;class _Code extends _CodeOrName{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof Name&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function _(e,...t){const r=[e[0]];let i=0;for(;i<t.length;)addCodeArg(r,t[i]),r.push(e[++i]);return new _Code(r)}t._Code=_Code,t.nil=new _Code(""),t._=_;const r=new _Code("+");function str(e,...t){const i=[safeStringify(e[0])];let n=0;for(;n<t.length;)i.push(r),addCodeArg(i,t[n]),i.push(r,safeStringify(e[++n]));return function optimize(e){let t=1;for(;t<e.length-1;){if(e[t]===r){const r=mergeExprItems(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(i),new _Code(i)}function addCodeArg(e,t){t instanceof _Code?e.push(...t._items):t instanceof Name?e.push(t):e.push(function interpolate(e){return"number"==typeof e||"boolean"==typeof e||null===e?e:safeStringify(Array.isArray(e)?e.join(","):e)}(t))}function mergeExprItems(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof Name||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof Name?void 0:`"${e}${t.slice(1)}`}function safeStringify(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=str,t.addCodeArg=addCodeArg,t.strConcat=function strConcat(e,t){return t.emptyStr()?e:e.emptyStr()?t:str`${e}${t}`},t.stringify=function stringify(e){return new _Code(safeStringify(e))},t.safeStringify=safeStringify,t.getProperty=function getProperty(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new _Code(`.${e}`):_`[${e}]`},t.getEsmExportName=function getEsmExportName(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new _Code(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function regexpCode(e){return new _Code(e.toString())}},3487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const i=r(7023),n=r(8490);var s=r(7023);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var o=r(8490);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Def extends Node{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?n.varKinds.var:this.varKind,i=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=optimizeExpr(this.rhs,e,t)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof i.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=optimizeExpr(this.rhs,e,t),this}get names(){return addExprNames(this.lhs instanceof i.Name?{}:{...this.lhs.names},this.rhs)}}class AssignOp extends Assign{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Label extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Break extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Throw extends Node{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class AnyCode extends Node{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=optimizeExpr(this.code,e,t),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let i=r.length;for(;i--;){const n=r[i];n.optimizeNames(e,t)||(subtractNames(e,n.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>addNames(e,t.names)),{})}}class BlockNode extends ParentNode{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new Else(e):e}return t?!1===e?t instanceof If?t:t.nodes:this.nodes.length?this:new If(not(e),t instanceof If?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=optimizeExpr(this.condition,e,t),this}get names(){const e=super.names;return addExprNames(e,this.condition),this.else&&addNames(e,this.else.names),e}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=optimizeExpr(this.iteration,e,t),this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){const t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:s}=this;return`for(${t} ${r}=${i}; ${r}<${s}; ${r}++)`+super.render(e)}get names(){const e=addExprNames(super.names,this.from);return addExprNames(e,this.to)}}class ForIter extends For{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=optimizeExpr(this.iterable,e,t),this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Func.kind="func";class Return extends ParentNode{render(e){return"return "+super.render(e)}}Return.kind="return";class Try extends BlockNode{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(i=this.finally)||void 0===i||i.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&addNames(e,this.catch.names),this.finally&&addNames(e,this.finally.names),e}}class Catch extends BlockNode{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Catch.kind="catch";class Finally extends BlockNode{render(e){return"finally"+super.render(e)}}Finally.kind="finally";function addNames(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function addExprNames(e,t){return t instanceof i._CodeOrName?addNames(e,t.names):e}function optimizeExpr(e,t,r){return e instanceof i.Name?replaceName(e):function canOptimize(e){return e instanceof i._Code&&e._items.some((e=>e instanceof i.Name&&1===t[e.str]&&void 0!==r[e.str]))}(e)?new i._Code(e._items.reduce(((e,t)=>(t instanceof i.Name&&(t=replaceName(t)),t instanceof i._Code?e.push(...t._items):e.push(t),e)),[])):e;function replaceName(e){const i=r[e.str];return void 0===i||1!==t[e.str]?e:(delete t[e.str],i)}}function subtractNames(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function not(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:i._`!${par(e)}`}t.CodeGen=class CodeGen{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){const n=this._scope.toName(t);return void 0!==r&&i&&(this._constants[n.str]=r),this._leafNode(new Def(e,n,r)),n}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Assign(e,t,r))}add(e,r){return this._leafNode(new AssignOp(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==i.nil&&this._leafNode(new AnyCode(e)),this}object(...e){const t=["{"];for(const[r,n]of e)t.length>1&&t.push(","),t.push(r),(r!==n||this.opts.es5)&&(t.push(":"),(0,i.addCodeArg)(t,n));return t.push("}"),new i._Code(t)}if(e,t,r){if(this._blockNode(new If(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new If(e))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new ForLoop(e),t)}forRange(e,t,r,i,s=(this.opts.es5?n.varKinds.var:n.varKinds.let)){const o=this._scope.toName(e);return this._for(new ForRange(s,o,t,r),(()=>i(o)))}forOf(e,t,r,s=n.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof i.Name?t:this.var("_arr",t);return this.forRange("_i",0,i._`${e}.length`,(t=>{this.var(o,i._`${e}[${t}]`),r(o)}))}return this._for(new ForIter("of",s,o,t),(()=>r(o)))}forIn(e,t,r,s=(this.opts.es5?n.varKinds.var:n.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,i._`Object.keys(${t})`,r);const o=this._scope.toName(e);return this._for(new ForIter("in",s,o,t),(()=>r(o)))}endFor(){return this._endBlockNode(For)}label(e){return this._leafNode(new Label(e))}break(e){return this._leafNode(new Break(e))}return(e){const t=new Return;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const i=new Try;if(this._blockNode(i),this.code(e),t){const e=this.name("e");this._currNode=i.catch=new Catch(e),t(e)}return r&&(this._currNode=i.finally=new Finally,this.code(r)),this._endBlockNode(Catch,Finally)}throw(e){return this._leafNode(new Throw(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=i.nil,r,n){return this._blockNode(new Func(e,t,r)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Func)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof If))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=not;const a=mappend(t.operators.AND);t.and=function and(...e){return e.reduce(a)};const c=mappend(t.operators.OR);function mappend(e){return(t,r)=>t===i.nil?r:r===i.nil?t:i._`${par(t)} ${e} ${par(r)}`}function par(e){return e instanceof i.Name?e:i._`(${e})`}t.or=function or(...e){return e.reduce(c)}},8490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const i=r(7023);class ValueError extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class Scope{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof i.Name?e:this.name(e)}name(e){return new i.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=Scope;class ValueScopeName extends i.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=i._`.${new i.Name(t)}[${r}]`}}t.ValueScopeName=ValueScopeName;const s=i._`\n`;t.ValueScope=class ValueScope extends Scope{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:i.nil}}get(){return this._scope}name(e){return new ValueScopeName(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const i=this.toName(e),{prefix:n}=i,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let o=this._values[n];if(o){const e=o.get(s);if(e)return e}else o=this._values[n]=new Map;o.set(s,i);const a=this._scope[n]||(this._scope[n]=[]),c=a.length;return a[c]=t.ref,i.setValue(t,{property:n,itemIndex:c}),i}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return i._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},o){let a=i.nil;for(const c in e){const u=e[c];if(!u)continue;const p=s[c]=s[c]||new Map;u.forEach((e=>{if(p.has(e))return;p.set(e,n.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;a=i._`${a}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==o?void 0:o(e)))throw new ValueError(e);a=i._`${a}${s}${this.opts._n}`}p.set(e,n.Completed)}))}return a}}},4181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const i=r(3487),n=r(6776),s=r(2141);function addError(e,t){const r=e.const("err",t);e.if(i._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,i._`[${r}]`)),i._`${s.default.vErrors}.push(${r})`),e.code(i._`${s.default.errors}++`)}function returnErrors(e,t){const{gen:r,validateName:n,schemaEnv:s}=e;s.$async?r.throw(i._`new ${e.ValidationError}(${t})`):(r.assign(i._`${n}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>i.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?i.str`"${e}" keyword must be ${t} ($data)`:i.str`"${e}" keyword is invalid ($data)`},t.reportError=function reportError(e,r=t.keywordError,n,s){const{it:o}=e,{gen:a,compositeRule:c,allErrors:u}=o,p=errorObjectCode(e,r,n);(null!=s?s:c||u)?addError(a,p):returnErrors(o,i._`[${p}]`)},t.reportExtraError=function reportExtraError(e,r=t.keywordError,i){const{it:n}=e,{gen:o,compositeRule:a,allErrors:c}=n;addError(o,errorObjectCode(e,r,i)),a||c||returnErrors(n,s.default.vErrors)},t.resetErrorsCount=function resetErrorsCount(e,t){e.assign(s.default.errors,t),e.if(i._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(i._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function extendErrors({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,s.default.errors,(o=>{e.const(c,i._`${s.default.vErrors}[${o}]`),e.if(i._`${c}.instancePath === undefined`,(()=>e.assign(i._`${c}.instancePath`,(0,i.strConcat)(s.default.instancePath,a.errorPath)))),e.assign(i._`${c}.schemaPath`,i.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(i._`${c}.schema`,r),e.assign(i._`${c}.data`,n))}))};const o={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function errorObjectCode(e,t,r){const{createErrors:n}=e.it;return!1===n?i._`{}`:function errorObject(e,t,r={}){const{gen:n,it:a}=e,c=[errorInstancePath(a,r),errorSchemaPath(e,r)];return function extraErrorProps(e,{params:t,message:r},n){const{keyword:a,data:c,schemaValue:u,it:p}=e,{opts:l,propertyName:d,topSchemaRef:f,schemaPath:y}=p;n.push([o.keyword,a],[o.params,"function"==typeof t?t(e):t||i._`{}`]),l.messages&&n.push([o.message,"function"==typeof r?r(e):r]);l.verbose&&n.push([o.schema,u],[o.parentSchema,i._`${f}${y}`],[s.default.data,c]);d&&n.push([o.propertyName,d])}(e,t,c),n.object(...c)}(e,t,r)}function errorInstancePath({errorPath:e},{instancePath:t}){const r=t?i.str`${e}${(0,n.getErrorPath)(t,n.Type.Str)}`:e;return[s.default.instancePath,(0,i.strConcat)(s.default.instancePath,r)]}function errorSchemaPath({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let a=s?t:i.str`${t}/${e}`;return r&&(a=i.str`${a}${(0,n.getErrorPath)(r,n.Type.Str)}`),[o.schemaPath,a]}},5173:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const i=r(3487),n=r(7426),s=r(2141),o=r(2531),a=r(6776),c=r(4815);class SchemaEnv{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function compileSchema(e){const t=getCompilingSchema.call(this,e);if(t)return t;const r=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:u}=this.opts.code,{ownProperties:p}=this.opts,l=new i.CodeGen(this.scope,{es5:a,lines:u,ownProperties:p});let d;e.$async&&(d=l.scopeValue("Error",{ref:n.default,code:i._`require("ajv/dist/runtime/validation_error").default`}));const f=l.scopeName("validate");e.validateName=f;const y={gen:l,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,i.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:i.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:i._`""`,opts:this.opts,self:this};let h;try{this._compilations.add(e),(0,c.validateFunctionCode)(y),l.optimize(this.opts.code.optimize);const t=l.toString();h=`${l.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(h=this.opts.code.process(h,e));const r=new Function(`${s.default.self}`,`${s.default.scope}`,h)(this,this.scope.get());if(this.scope.value(f,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:f,validateCode:t,scopeValues:l._values}),this.opts.unevaluated){const{props:e,items:t}=y;r.evaluated={props:e instanceof i.Name?void 0:e,items:t instanceof i.Name?void 0:t,dynamicProps:e instanceof i.Name,dynamicItems:t instanceof i.Name},r.source&&(r.source.evaluated=(0,i.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,h&&this.logger.error("Error compiling schema, function code:",h),t}finally{this._compilations.delete(e)}}function inlineOrCompile(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:compileSchema.call(this,e)}function getCompilingSchema(e){for(const i of this._compilations)if(r=e,(t=i).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i;var t,r}function resolve(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||resolveSchema.call(this,e,t)}function resolveSchema(e,t){const r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r);let n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return getJsonPointer.call(this,r,e);const s=(0,o.normalizeId)(i),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=resolveSchema.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return getJsonPointer.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||compileSchema.call(this,a),s===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new SchemaEnv({schema:t,schemaId:r,root:e,baseId:n})}return getJsonPointer.call(this,r,a)}}t.SchemaEnv=SchemaEnv,t.compileSchema=compileSchema,t.resolveRef=function resolveRef(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let s=resolve.call(this,e,r);if(void 0===s){const n=null===(i=e.localRefs)||void 0===i?void 0:i[r],{schemaId:o}=this.opts;n&&(s=new SchemaEnv({schema:n,schemaId:o,root:e,baseId:t}))}return void 0!==s?e.refs[r]=inlineOrCompile.call(this,s):void 0},t.getCompilingSchema=getCompilingSchema,t.resolveSchema=resolveSchema;const u=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,{baseId:t,schema:r,root:i}){var n;if("/"!==(null===(n=e.fragment)||void 0===n?void 0:n[0]))return;for(const i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(i)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!u.has(i)&&n&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,n))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=resolveSchema.call(this,i,e)}const{schemaId:c}=this.opts;return s=s||new SchemaEnv({schema:r,schemaId:c,root:i,baseId:t}),s.schema!==s.root.schema?s:void 0}},2141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={data:new i.Name("data"),valCxt:new i.Name("valCxt"),instancePath:new i.Name("instancePath"),parentData:new i.Name("parentData"),parentDataProperty:new i.Name("parentDataProperty"),rootData:new i.Name("rootData"),dynamicAnchors:new i.Name("dynamicAnchors"),vErrors:new i.Name("vErrors"),errors:new i.Name("errors"),this:new i.Name("this"),self:new i.Name("self"),scope:new i.Name("scope"),json:new i.Name("json"),jsonPos:new i.Name("jsonPos"),jsonLen:new i.Name("jsonLen"),jsonPart:new i.Name("jsonPart")};t.default=n},6646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(2531);class MissingRefError extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,i.resolveUrl)(e,t,r),this.missingSchema=(0,i.normalizeId)((0,i.getFullPath)(e,this.missingRef))}}t.default=MissingRefError},2531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const i=r(6776),n=r(4063),s=r(9461),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function inlineRef(e,t=!0){return"boolean"==typeof e||(!0===t?!hasRef(e):!!t&&countKeys(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(hasRef))return!0;if("object"==typeof r&&hasRef(r))return!0}return!1}function countKeys(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!o.has(r)&&("object"==typeof e[r]&&(0,i.eachItem)(e[r],(e=>t+=countKeys(e))),t===1/0))return 1/0}return t}function getFullPath(e,t="",r){!1!==r&&(t=normalizeId(t));const i=e.parse(t);return _getFullPath(e,i)}function _getFullPath(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=getFullPath,t._getFullPath=_getFullPath;const c=/#\/?$/;function normalizeId(e){return e?e.replace(c,""):""}t.normalizeId=normalizeId,t.resolveUrl=function resolveUrl(e,t,r){return r=normalizeId(r),e.resolve(t,r)};const u=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function getSchemaRefs(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:i}=this.opts,o=normalizeId(e[r]||t),a={"":o},c=getFullPath(i,o,!1),p={},l=new Set;return s(e,{allKeys:!0},((e,t,i,n)=>{if(void 0===n)return;const s=c+t;let o=a[n];function addRef(t){const r=this.opts.uriResolver.resolve;if(t=normalizeId(o?r(o,t):t),l.has(t))throw ambiguos(t);l.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?checkAmbiguosRef(e,i.schema,t):t!==normalizeId(s)&&("#"===t[0]?(checkAmbiguosRef(e,p[t],t),p[t]=e):this.refs[t]=s),t}function addAnchor(e){if("string"==typeof e){if(!u.test(e))throw new Error(`invalid anchor "${e}"`);addRef.call(this,`#${e}`)}}"string"==typeof e[r]&&(o=addRef.call(this,e[r])),addAnchor.call(this,e.$anchor),addAnchor.call(this,e.$dynamicAnchor),a[t]=o})),p;function checkAmbiguosRef(e,t,r){if(void 0!==t&&!n(e,t))throw ambiguos(r)}function ambiguos(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},3141:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function isJSONType(e){return"string"==typeof e&&r.has(e)},t.getRules=function getRules(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},6776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const i=r(3487),n=r(7023);function checkUnknownRules(e,t=e.schema){const{opts:r,self:i}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const n=i.RULES.keywords;for(const r in t)n[r]||checkStrictMode(e,`unknown keyword: "${r}"`)}function schemaHasRules(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function escapeJsonPointer(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function makeMergeEvaluated({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(s,o,a,c)=>{const u=void 0===a?o:a instanceof i.Name?(o instanceof i.Name?e(s,o,a):t(s,o,a),a):o instanceof i.Name?(t(s,a,o),o):r(o,a);return c!==i.Name||u instanceof i.Name?u:n(s,u)}}function evaluatedPropsToName(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",i._`{}`);return void 0!==t&&setEvaluated(e,r,t),r}function setEvaluated(e,t,r){Object.keys(r).forEach((r=>e.assign(i._`${t}${(0,i.getProperty)(r)}`,!0)))}t.toHash=function toHash(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function alwaysValidSchema(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(checkUnknownRules(e,t),!schemaHasRules(t,e.self.RULES.all))},t.checkUnknownRules=checkUnknownRules,t.schemaHasRules=schemaHasRules,t.schemaHasRulesButRef=function schemaHasRulesButRef(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function schemaRefOrVal({topSchemaRef:e,schemaPath:t},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return i._`${r}`}return i._`${e}${t}${(0,i.getProperty)(n)}`},t.unescapeFragment=function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))},t.escapeFragment=function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))},t.escapeJsonPointer=escapeJsonPointer,t.unescapeJsonPointer=unescapeJsonPointer,t.eachItem=function eachItem(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if(i._`${r} !== true && ${t} !== undefined`,(()=>{e.if(i._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,i._`${r} || {}`).code(i._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(i._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,i._`${r} || {}`),setEvaluated(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if(i._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,i._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(i._`${r} !== true`,(()=>e.assign(r,!0===t||i._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=evaluatedPropsToName,t.setEvaluated=setEvaluated;const s={};var o;function checkStrictMode(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function useFunc(e,t){return e.scopeValue("func",{ref:t,code:s[t.code]||(s[t.code]=new n._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(o=t.Type||(t.Type={})),t.getErrorPath=function getErrorPath(e,t,r){if(e instanceof i.Name){const n=t===o.Num;return r?n?i._`"[" + ${e} + "]"`:i._`"['" + ${e} + "']"`:n?i._`"/" + ${e}`:i._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,i.getProperty)(e).toString():"/"+escapeJsonPointer(e)},t.checkStrictMode=checkStrictMode},8876:(e,t)=>{"use strict";function shouldUseGroup(e,t){return t.rules.some((t=>shouldUseRule(e,t)))}function shouldUseRule(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function schemaHasRulesForType({schema:e,self:t},r){const i=t.RULES.types[r];return i&&!0!==i&&shouldUseGroup(e,i)},t.shouldUseGroup=shouldUseGroup,t.shouldUseRule=shouldUseRule},5667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const i=r(4181),n=r(3487),s=r(2141),o={message:"boolean schema is false"};function falseSchemaError(e,t){const{gen:r,data:n}=e,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,i.reportError)(s,o,void 0,t)}t.topBoolOrEmptySchema=function topBoolOrEmptySchema(e){const{gen:t,schema:r,validateName:i}=e;!1===r?falseSchemaError(e,!1):"object"==typeof r&&!0===r.$async?t.return(s.default.data):(t.assign(n._`${i}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function boolOrEmptySchema(e,t){const{gen:r,schema:i}=e;!1===i?(r.var(t,!1),falseSchemaError(e)):r.var(t,!0)}},453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const i=r(3141),n=r(8876),s=r(4181),o=r(3487),a=r(6776);var c;function getJSONTypes(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function getSchemaTypes(e){const t=getJSONTypes(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=getJSONTypes,t.coerceAndCheckDataType=function coerceAndCheckDataType(e,t){const{gen:r,data:i,opts:s}=e,a=function coerceToTypes(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),p=t.length>0&&!(0===a.length&&1===t.length&&(0,n.schemaHasRulesForType)(e,t[0]));if(p){const n=checkDataTypes(t,i,s.strictNumbers,c.Wrong);r.if(n,(()=>{a.length?function coerceData(e,t,r){const{gen:i,data:n,opts:s}=e,a=i.let("dataType",o._`typeof ${n}`),c=i.let("coerced",o._`undefined`);"array"===s.coerceTypes&&i.if(o._`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,(()=>i.assign(n,o._`${n}[0]`).assign(a,o._`typeof ${n}`).if(checkDataTypes(t,n,s.strictNumbers),(()=>i.assign(c,n)))));i.if(o._`${c} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===s.coerceTypes)&&coerceSpecificType(e);function coerceSpecificType(e){switch(e){case"string":return void i.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(c,o._`"" + ${n}`).elseIf(o._`${n} === null`).assign(c,o._`""`);case"number":return void i.elseIf(o._`${a} == "boolean" || ${n} === null
|
|
2
|
+
var NMSHDRuntime;(()=>{var e={594:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UPGRADE_LOGIC=t.DatabaseSchemaUpgrader=void 0;const a=r(194),c=r(3850),u=r(9663),p=o(r(6486));let l=i=class RuntimeDatabaseSchemaMetadata extends a.Serializable{static preFrom(e){return e.id||(e.id=i.DATABASE_SCHEMA_ID),e}static from(e){return this.fromAny(e)}};l.DATABASE_SCHEMA_ID="databaseSchema",n([(0,a.serialize)(),(0,a.validate)({customValidator:e=>e===l.DATABASE_SCHEMA_ID?void 0:"Invalid database schema id"}),s("design:type",String)],l.prototype,"id",void 0),n([(0,a.serialize)(),(0,a.validate)({min:0}),s("design:type",Number)],l.prototype,"version",void 0),l=i=n([(0,a.type)("RuntimeDatabaseSchemaMetadata")],l);function extractPayloadFromObject(e,t){const r=e.toJSON();return p.default.pickBy(r,((e,r)=>void 0!==e&&t.includes(r)))}t.DatabaseSchemaUpgrader=class DatabaseSchemaUpgrader{constructor(e,t,r){this.accountController=e,this.consumptionController=t,this.loggerFactory=r,this.CURRENT_DATABASE_SCHEMA_VERSION=2,this.DATABASE_SCHEMA_QUERY={id:l.DATABASE_SCHEMA_ID}}async upgradeSchemaVersion(){let e=await this.getVersionFromDB();for(;e<this.CURRENT_DATABASE_SCHEMA_VERSION;){e++;const r=t.UPGRADE_LOGIC[e];if(!r)throw new Error(`No upgrade logic found for version '${e}'`);await r(this.accountController,this.consumptionController,this.loggerFactory.getLogger(`DatabaseSchemaUpgrader.v${e}`)),await this.writeVersionToDB(e)}}async getVersionFromDB(){const e=await this.accountController.db.getCollection("meta"),t=await e.findOne(this.DATABASE_SCHEMA_QUERY);if(!t)return 0;return l.from(t).version}async writeVersionToDB(e){const t=await this.accountController.db.getCollection("meta"),r=l.from({version:e}),i=await t.findOne(this.DATABASE_SCHEMA_QUERY);i?await t.update(i,r):await t.create(r)}},t.UPGRADE_LOGIC=Object.freeze({1:(e,t,r)=>{r.info(`Upgrading database schema to version 1 for account '${e.identity.address.toString()}'`)},2:async(e,t,r)=>{if(r.info(`Upgrading database schema to version 2 for account '${e.identity.address.toString()}'`),!e.config.datawalletEnabled)return;const i=e.unpushedDatawalletModifications,n=e.config.supportedDatawalletVersion,s=await e.getSynchronizedCollection("Requests"),o=await s.find({});for(const e of o){let t;r.info(`Processing Request '${e.id}'`);try{t=c.LocalRequest.from(e)}catch(t){r.error(`Failed to parse Request '${e.id}'`,t);continue}const s=t.id;await i.create(u.DatawalletModification.from({localId:await u.TransportIds.datawalletModification.generate(),type:u.DatawalletModificationType.Create,collection:"Requests",objectIdentifier:s,payloadCategory:u.DatawalletModificationCategory.TechnicalData,payload:extractPayloadFromObject(t,t.technicalProperties),datawalletVersion:n})),await i.create(u.DatawalletModification.from({localId:await u.TransportIds.datawalletModification.generate(),type:u.DatawalletModificationType.Create,collection:"Requests",objectIdentifier:s,payloadCategory:u.DatawalletModificationCategory.Userdata,payload:extractPayloadFromObject(t,t.userdataProperties),datawalletVersion:n})),r.info(`Successfully created datawallet modifications for Request '${e.id}'.`)}const a=await e.getSynchronizedCollection("Attributes"),p=await a.find({});for(const e of p){let t;r.info(`Processing Attribute '${e.id}'`);try{t=c.LocalAttribute.from(e)}catch(t){r.error(`Failed to parse Attribute '${e.id}'`,t);continue}const s=extractPayloadFromObject(t,t.technicalProperties);"succeededBy"in s||"shareInfo"in s||"parentId"in s?(await i.create(u.DatawalletModification.from({localId:await u.TransportIds.datawalletModification.generate(),type:u.DatawalletModificationType.Update,collection:"Attributes",objectIdentifier:t.id,payloadCategory:u.DatawalletModificationCategory.TechnicalData,payload:s,datawalletVersion:n})),r.info(`Successfully created a datawallet modification for Attribute '${e.id}'.`)):r.info(`Attribute '${e.id}' does not contain any new technical properties. Skipping.`)}await e.syncDatawallet()}})},6984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Runtime=void 0;const i=r(5172),n=r(3850),s=r(9663),o=r(7071),a=r(2500),c=r(594),u=r(4086),p=r(2205),l=r(1496),d=r(5200),f=r(9662),y=r(986),h=r(485),g=r(2746);t.Runtime=class Runtime{get logger(){return this._logger}get anonymousServices(){return this._anonymousServices}isLoggedIn(){return!!this._accountController}getAccountController(){if(!this._accountController)throw h.RuntimeErrors.startup.noActiveAccount();return this._accountController}getConsumptionController(){if(!this._consumptionController)throw h.RuntimeErrors.startup.noActiveConsumptionController();return this._consumptionController}async login(e,t){this._accountController=e,this._consumptionController=t;const r=o.Container.get(d.TransportServices),i=o.Container.get(d.ConsumptionServices),n=o.Container.get(u.DataViewExpander);return await new c.DatabaseSchemaUpgrader(e,t,this.loggerFactory).upgradeSchemaVersion(),{transportServices:r,consumptionServices:i,dataViewExpander:n}}get modules(){return this._modules}get eventBus(){return this._eventBus}constructor(e,t,r){this.runtimeConfig=e,this.loggerFactory=t,this._isInitialized=!1,this._isStarted=!1,this._logger=this.loggerFactory.getLogger(this.constructor.name),this._eventBus=r??new i.EventEmitter2EventBus(((e,t)=>{this.logger.error(`An error was thrown in an event handler of the runtime event bus (namespace: '${t}'). Root error: ${e}`)}))}get isInitialized(){return this._isInitialized}async init(){if(this._isInitialized)throw h.RuntimeErrors.general.alreadyInitialized();this.eventBus.publish(new p.RuntimeInitializingEvent),await this.initDIContainer(),await this.initTransportLibrary(),await this.initAccount(),this._modules=new d.RuntimeModuleRegistry,await this.loadModules(),await this.initInfrastructure(),await this.initModules(),this._eventProxy=new l.EventProxy(this._eventBus,this.transport.eventBus).start(),this._isInitialized=!0,this.eventBus.publish(new p.RuntimeInitializedEvent)}initInfrastructure(){}async getSupportInformation(){return{health:await this.getHealth(),configuration:JSON.parse(JSON.stringify(this.runtimeConfig))}}async initTransportLibrary(){this.logger.debug("Initializing Database connection... ");const e=await this.createDatabaseConnection(),t=this.createTransportConfigWithAdditionalHeaders({...this.runtimeConfig.transportLibrary,supportedIdentityVersion:1}),r=new i.EventEmitter2EventBus(((e,t)=>{this.logger.error(`An error was thrown in an event handler of the transport event bus (namespace: '${t}'). Root error: ${e}`)}));this.transport=new s.Transport(e,t,r,this.loggerFactory),this.logger.debug("Initializing Transport Library..."),await this.transport.init(),this.logger.debug("Finished initialization of Transport Library."),this._anonymousServices=o.Container.get(d.AnonymousServices)}createTransportConfigWithAdditionalHeaders(e){const t=e.platformAdditionalHeaders??{};return t["X-RUNTIME-VERSION"]=a.buildInformation.version,{...e,platformAdditionalHeaders:t}}async initDIContainer(){o.Container.bind(i.EventBus).factory((()=>this.eventBus)).scope(o.Scope.Singleton),o.Container.bind(y.RuntimeLoggerFactory).factory((()=>this.loggerFactory)).scope(o.Scope.Singleton),o.Container.bind(s.AccountController).factory((()=>this.getAccountController())).scope(o.Scope.Request),o.Container.bind(s.DevicesController).factory((()=>this.getAccountController().devices)).scope(o.Scope.Request),o.Container.bind(s.DeviceController).factory((()=>this.getAccountController().activeDevice)).scope(o.Scope.Request),o.Container.bind(s.FileController).factory((()=>this.getAccountController().files)).scope(o.Scope.Request),o.Container.bind(s.IdentityController).factory((()=>this.getAccountController().identity)).scope(o.Scope.Request),o.Container.bind(s.MessageController).factory((()=>this.getAccountController().messages)).scope(o.Scope.Request),o.Container.bind(s.RelationshipTemplateController).factory((()=>this.getAccountController().relationshipTemplates)).scope(o.Scope.Request),o.Container.bind(s.RelationshipsController).factory((()=>this.getAccountController().relationships)).scope(o.Scope.Request),o.Container.bind(s.TokenController).factory((()=>this.getAccountController().tokens)).scope(o.Scope.Request),o.Container.bind(s.ChallengeController).factory((()=>this.getAccountController().challenges)).scope(o.Scope.Request),o.Container.bind(n.ConsumptionController).factory((()=>this.getConsumptionController())).scope(o.Scope.Request),o.Container.bind(n.AttributesController).factory((()=>this.getConsumptionController().attributes)).scope(o.Scope.Request),o.Container.bind(n.AttributeListenersController).factory((()=>this.getConsumptionController().attributeListeners)).scope(o.Scope.Request),o.Container.bind(n.DraftsController).factory((()=>this.getConsumptionController().drafts)).scope(o.Scope.Request),o.Container.bind(n.IncomingRequestsController).factory((()=>this.getConsumptionController().incomingRequests)).scope(o.Scope.Request),o.Container.bind(n.OutgoingRequestsController).factory((()=>this.getConsumptionController().outgoingRequests)).scope(o.Scope.Request),o.Container.bind(n.SettingsController).factory((()=>this.getConsumptionController().settings)).scope(o.Scope.Request),o.Container.bind(s.AnonymousTokenController).factory((()=>new s.AnonymousTokenController(this.transport.config))).scope(o.Scope.Singleton);const e=new g.SchemaRepository;await e.loadSchemas(),o.Container.bind(g.SchemaRepository).factory((()=>e)).scope(o.Scope.Singleton)}async loadModules(){this.logger.info("Loading modules...");for(const e in this.runtimeConfig.modules){const t=this.runtimeConfig.modules[e];t.enabled?t.location?t.location.startsWith("@nmshd/runtime:")?this.loadBuiltinModule(t):await this.loadModule(t):this.logger.error(`Skip loading module '${this.getModuleName(t)}' because has no location.`):this.logger.debug(`Skip loading module '${this.getModuleName(t)}' because it is not enabled.`)}this.eventBus.publish(new p.ModulesLoadedEvent)}loadBuiltinModule(e){switch(e.location.split(":")[1]){case"DeciderModule":const t=new f.DeciderModule(this,e,this.loggerFactory.getLogger(f.DeciderModule));this.modules.add(t);break;case"RequestModule":const r=new f.RequestModule(this,e,this.loggerFactory.getLogger(f.RequestModule));this.modules.add(r);break;case"MessageModule":const i=new f.MessageModule(this,e,this.loggerFactory.getLogger(f.MessageModule));this.modules.add(i);break;case"AttributeListenerModule":const n=new f.AttributeListenerModule(this,e,this.loggerFactory.getLogger(f.AttributeListenerModule));this.modules.add(n);break;default:throw new Error(`Module ${e.name} is not a builtin module.`)}}async initModules(){this.logger.info("Initializing modules...");for(const e of this.modules.toArray())try{await e.init(),this.logger.info(`Module '${this.getModuleName(e)}' was initialized successfully.`)}catch(t){throw this.logger.error(`Module '${this.getModuleName(e)}' could not be initialized.`,t),t}this.eventBus.publish(new p.ModulesInitializedEvent)}get isStarted(){return this._isStarted}async start(){if(!this._isInitialized)throw h.RuntimeErrors.general.notInitialized();if(this._isStarted)throw h.RuntimeErrors.general.alreadyStarted();await this.startInfrastructure(),await this.startModules(),this._isStarted=!0}startInfrastructure(){}async stop(){if(!this._isInitialized)throw h.RuntimeErrors.general.notInitialized();if(!this._isStarted)throw h.RuntimeErrors.general.notStarted();await this.stopModules(),await this.stopInfrastructure(),await this.transport.eventBus.close(),this._eventProxy.stop(),await this._eventBus.close(),this.logger.info("Closing AccountController..."),await(this._accountController?.close()),this._accountController=void 0,this.logger.info("AccountController was closed successfully."),this._isInitialized=!1,this._isStarted=!1}stopInfrastructure(){}async stopModules(){this.logger.info("Stopping modules...");for(const e of this.modules.toArray())try{await e.stop(),this.logger.info(`Module '${this.getModuleName(e)}' was stopped successfully.`)}catch(t){this.logger.error(`An Error occured while stopping module '${this.getModuleName(e)}': `,t)}this.logger.info("Stopped all modules.")}async startModules(){this.logger.info("Starting modules...");for(const e of this.modules.toArray())try{await e.start(),this.logger.info(`Module '${this.getModuleName(e)}' was started successfully.`)}catch(t){throw this.logger.error(`Module '${this.getModuleName(e)}' could not be started.`,t),t}this.eventBus.publish(new p.ModulesStartedEvent),this.logger.info("Started all modules.")}getModuleName(e){return e.displayName||e.name||JSON.stringify(e)}}},9757:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},986:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeLoggerFactory=void 0;t.RuntimeLoggerFactory=class RuntimeLoggerFactory{}},2500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildInformation=void 0;const i=r(194),n=r(3850),s=r(5030),o=r(2890),a=r(9663);t.buildInformation={version:"2.8.3",build:"172",date:"2023-10-20T10:54:54+00:00",commit:"4c2920768495e1467d200b244e51d4a1ffe13f67",dependencies:{"@js-soft/docdb-querytranslator":"1.1.1","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"2.0.9","@js-soft/ts-utils":"^2.3.1","@nmshd/consumption":"3.4.3","@nmshd/content":"2.7.4","@nmshd/crypto":"2.0.4","@nmshd/transport":"2.1.2",ajv:"^8.12.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","json-stringify-safe":"^5.0.1",lodash:"^4.17.21",luxon:"^3.4.3",qrcode:"1.5.3","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},libraries:{serval:i.buildInformation,consumption:n.buildInformation,content:s.buildInformation,crypto:o.buildInformation,transport:a.buildInformation}}},4869:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DataViewExpander=void 0;const o=r(194),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(5200),d=r(4629),f=r(485),y=r(2043),h=r(4700),g=r(2466);let m=class DataViewExpander{constructor(e,t,r,i){this.transport=e,this.consumption=t,this.consumptionController=r,this.identityController=i}async expand(e,t){let r=t;if(e["@type"]&&(r=e["@type"]),Array.isArray(e)){if(!(e.length>0))return[];r=e[0]["@type"]}if(!r)throw f.RuntimeErrors.general.invalidPayload("No type found.");switch(r){case"Message":return Array.isArray(e)?await this.expandMessageDTOs(e):await this.expandMessageDTO(e);case"Attribute":return Array.isArray(e)?await this.expandAttributes(e):await this.expandAttribute(e);case"Address":return Array.isArray(e)?await this.expandAddresses(e):await this.expandAddress(e);case"FileId":return Array.isArray(e)?await this.expandFileIds(e):await this.expandFileId(e);case"File":return Array.isArray(e)?await this.expandFileDTOs(e):await this.expandFileDTO(e);case"Recipient":return Array.isArray(e)?await this.expandRecipientDTOs(e):await this.expandAddress(e);case"Relationship":return Array.isArray(e)?await this.expandRelationshipDTOs(e):await this.expandRelationshipDTO(e);case"LocalAttribute":return Array.isArray(e)?await this.expandLocalAttributeDTOs(e):await this.expandLocalAttributeDTO(e);default:throw f.RuntimeErrors.general.notSupported(`No expander is defined for the @type '${r}'.`)}}async expandMessageDTO(e){const t=await this.expandRecipientDTOs(e.recipients),r={};t.forEach((e=>r[e.id]=e));const i=await this.expandAddress(e.createdBy),n=[],s=[];for(const t of e.attachments)"string"==typeof t?(s.push(this.expandFileId(t)),n.push(t)):(s.push(this.expandFileDTO(t)),n.push(t.id));const o=await Promise.all(s),a=e.isOwn;let c,u=h.MessageStatus.Received;if(a){u=e.recipients.every((e=>!!e.receivedAt))?h.MessageStatus.Delivered:h.MessageStatus.Delivering,c={...t[0],type:"IdentityDVO"}}else c=i;const p=y.DataViewTranslateable.transport.messageName,l={id:e.id,name:p,date:e.createdAt,type:"MessageDVO",createdByDevice:e.createdByDevice,createdAt:e.createdAt,createdBy:i,recipients:t,attachments:o,isOwn:a,recipientCount:e.recipients.length,attachmentCount:e.attachments.length,status:u,statusText:`i18n://dvo.message.${u}`,image:"",peer:c,content:e.content};if("Mail"===e.content["@type"]||"RequestMail"===e.content["@type"]){const t=e.content,i=t.to.map((e=>r[e]));let n=[];t.cc&&(n=t.cc.map((e=>r[e])));return{...l,type:"MailDVO",name:t.subject?t.subject:y.DataViewTranslateable.consumption.mails.mailSubjectFallback,subject:t.subject,body:t.body,to:i,toCount:t.to.length,cc:n,ccCount:n.length}}if("Request"===e.content["@type"]){let t;if(a){const r=await this.consumption.outgoingRequests.getRequests({query:{"source.reference":e.id}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}else{const r=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}return{...l,type:"RequestMessageDVO",request:await this.expandLocalRequestDTO(t)}}if("Response"===e.content["@type"]){let t;if(a){const r=await this.consumption.incomingRequests.getRequests({query:{id:e.content.requestId}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}else{const r=await this.consumption.outgoingRequests.getRequests({query:{id:e.content.requestId}});if(0===r.value.length)throw new Error("No LocalRequest has been found for this message id.");if(r.value.length>1)throw new Error("More than one LocalRequest has been found for this message id.");t=r.value[0]}return{...l,type:"RequestMessageDVO",request:await this.expandLocalRequestDTO(t)}}return l}async expandMessageDTOs(e){const t=e.map((e=>this.expandMessageDTO(e)));return await Promise.all(t)}async expandRelationshipTemplateDTO(e){let t,r;const i=await this.expandAddress(e.createdBy),n=e.isOwn?"RelationshipTemplateDVO":"PeerRelationshipTemplateDVO";let s=e.isOwn?"i18n://dvo.template.outgoing.name":"i18n://dvo.template.incoming.name";const o=e.isOwn?"i18n://dvo.template.outgoing.description":"i18n://dvo.template.incoming.description";let u;if("RelationshipTemplateContent"===e.content["@type"]){const i=c.RelationshipTemplateContent.from(e.content).toJSON();let n;if(i.title&&(s=i.title),!e.isOwn){const t=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id,status:a.LocalRequestStatus.ManualDecisionRequired}});if(t.value.length>0)n=t.value[0],u=await this.expandLocalRequestDTO(n);else{const t=await this.consumption.incomingRequests.getRequests({query:{"source.reference":e.id,status:[a.LocalRequestStatus.Decided,a.LocalRequestStatus.Completed]}});t.value.length>0&&(n=t.value[0],u=await this.expandLocalRequestDTO(n))}}t=await this.expandRequest(i.onNewRelationship),i.onExistingRelationship&&(r=await this.expandRequest(i.onExistingRelationship))}return{name:s,description:o,type:n,date:e.createdAt,...e,createdBy:i,request:u,onNewRelationship:t,onExistingRelationship:r}}async expandRelationshipTemplateDTOs(e){const t=e.map((e=>this.expandRelationshipTemplateDTO(e)));return await Promise.all(t)}async expandRequest(e,t,r){const i=e.id?e.id:"",n=[];for(let i=0;i<e.items.length;i++){const s=e.items[i],o=r?.content.items[i];n.push(await this.expandRequestGroupOrItem(s,t,o))}return{id:i,name:`${e["@type"]} ${i}`,type:"RequestDVO",date:e.expiresAt,...e,items:n,response:r?.content}}async expandRequests(e){const t=e.map((e=>this.expandRequest(e)));return await Promise.all(t)}async expandRequestItem(e,t,r){let i,n=!1;switch(!t||t.isOwn||"DecisionRequired"!==t.status&&"ManualDecisionRequired"!==t.status||(n=!0),e["@type"]){case"ReadAttributeRequestItem":const s=e;if(n){const t=await this.processAttributeQuery(s.query);return"ProcessedThirdPartyRelationshipAttributeQueryDVO"===t.type&&0===t.results.length&&(n=!1,i={code:"dvo.requestItem.error.noResultsForThirdPartyRelationshipAttributeQuery",message:"There are no matching Attributes for this ThirdPartyRelationshipAttributeQuery."}),"ProcessedIQLQueryDVO"!==t.type||0!==t.results.length||s.query.attributeCreationHints||(n=!1,i={code:"dvo.requestItem.error.noResultsForIQLQueryDVO",message:"There are no matching Attributes for this IQLQuery and no attributeCreationHint is set."}),{...s,type:"DecidableReadAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableReadAttributeRequestItem.name",query:t,isDecidable:n,error:i,response:r}}return{...s,type:"ReadAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ReadAttributeRequestItem.name",query:await this.expandAttributeQuery(s.query),isDecidable:n,response:r};case"CreateAttributeRequestItem":const o=e,a=await this.expandAttribute(o.attribute);let u=!1;"DraftIdentityAttributeDVO"===a.type&&(u=!0);const p=e.title,l=e.description;let d;return n?(d="i18n://dvo.requestItem.DecidableCreateRelationshipAttributeRequestItem.name",u&&(d="i18n://dvo.requestItem.DecidableCreateIdentityAttributeRequestItem.name"),{...o,type:"DecidableCreateAttributeRequestItemDVO",id:"",name:p??d,description:l??d,attribute:a,isDecidable:n,response:r}):(d="i18n://dvo.requestItem.CreateRelationshipAttributeRequestItem.name",u&&(d="i18n://dvo.requestItem.CreateIdentityAttributeRequestItem.name"),{...o,type:"CreateAttributeRequestItemDVO",id:"",name:p??d,description:l??d,attribute:a,isDecidable:n,response:r});case"ProposeAttributeRequestItem":const f=e;t&&(f.attribute.owner=t.isOwn?t.peer:this.identityController.address.toString());let y=!1;if(r&&r.result===c.ResponseItemResult.Accepted){const e=r;JSON.stringify(e.attribute.content.value)!==JSON.stringify(f.attribute.value)&&(y=!0)}return n?{...f,type:"DecidableProposeAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableProposeAttributeRequestItem.name",attribute:await this.expandAttribute(f.attribute),query:await this.processAttributeQuery(f.query),isDecidable:n,response:r}:{...f,type:"ProposeAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ProposeAttributeRequestItem.name",attribute:await this.expandAttribute(f.attribute),query:await this.expandAttributeQuery(f.query),isDecidable:n,response:r,proposedValueOverruled:y};case"ShareAttributeRequestItem":const h=e,g=await this.expandAttribute(h.attribute);if(n)return{...h,type:"DecidableShareAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableProposeAttributeRequestItem.name",attribute:g,isDecidable:n,response:r};const m=r;return m&&(g.id=m.attributeId),{...h,type:"ShareAttributeRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ProposeAttributeRequestItem.name",attribute:g,isDecidable:n,response:r};case"AuthenticationRequestItem":const v=e;return n?{...v,type:"DecidableAuthenticationRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableAuthenticationRequestItem.name",isDecidable:n,response:r}:{...v,type:"AuthenticationRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.AuthenticationRequestItem.name",isDecidable:n,response:r};case"ConsentRequestItem":const b=e;return n?{...b,type:"DecidableConsentRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.DecidableConsentRequestItem.name",isDecidable:n,response:r}:{...b,type:"ConsentRequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.ConsentRequestItem.name",isDecidable:n,response:r};case"RegisterAttributeListenerRequestItem":const R=e,O=await this.expandAttributeQuery(R.query);return n?{...R,type:"DecidableRegisterAttributeListenerRequestItemDVO",id:"",query:O,name:e.title?e.title:"i18n://dvo.requestItem.DecidableRegisterAttributeListenerRequestItem.name",isDecidable:n,response:r}:{...R,type:"RegisterAttributeListenerRequestItemDVO",id:"",query:O,name:e.title?e.title:"i18n://dvo.requestItem.RegisterAttributeListenerRequestItem.name",isDecidable:n,response:r};default:return{...e,type:"RequestItemDVO",id:"",name:e.title?e.title:"i18n://dvo.requestItem.name",isDecidable:n,response:r}}}async expandRequestGroupOrItem(e,t,r){if("RequestItemGroup"===e["@type"]){let i=!1;!t||t.isOwn||"DecisionRequired"!==t.status&&"ManualDecisionRequired"!==t.status||(i=!0);const n=e,s=r,o=[];for(let e=0;e<n.items.length;e++){const r=n.items[e],i=s?.items[e];o.push(await this.expandRequestItem(r,t,i))}return{type:"RequestItemGroupDVO",items:o,isDecidable:i,title:e.title,description:e.description,mustBeAccepted:e.mustBeAccepted,response:s}}return await this.expandRequestItem(e,t,r)}async expandResponseItem(e){if("Accepted"!==e.result){if("Rejected"===e.result){return{...e,type:"RejectResponseItemDVO",id:"",name:"i18n://dvo.responseItem.rejected"}}return{...e,type:"ErrorResponseItemDVO",id:"",name:"i18n://dvo.responseItem.error"}}{const t=`i18n://dvo.responseItem.${e["@type"]}.acceptedName`;switch(e["@type"]){case"ReadAttributeAcceptResponseItem":const r=e,i=await this.consumption.attributes.getAttribute({id:r.attributeId}),n=await this.expandLocalAttributeDTO(i.value);return{...r,type:"ReadAttributeAcceptResponseItemDVO",id:r.attributeId,name:t,attribute:n};case"CreateAttributeAcceptResponseItem":const s=e,o=await this.consumption.attributes.getAttribute({id:s.attributeId}),a=await this.expandLocalAttributeDTO(o.value);return{...s,type:"CreateAttributeAcceptResponseItemDVO",id:s.attributeId,name:t,attribute:a};case"ProposeAttributeAcceptResponseItem":const c=e,u=await this.consumption.attributes.getAttribute({id:c.attributeId}),p=await this.expandLocalAttributeDTO(u.value);return{...c,type:"ProposeAttributeAcceptResponseItemDVO",id:c.attributeId,name:t,attribute:p};case"ShareAttributeAcceptResponseItem":const l=e,d=await this.consumption.attributes.getAttribute({id:l.attributeId}),f=await this.expandLocalAttributeDTO(d.value);return{...l,type:"ShareAttributeAcceptResponseItemDVO",id:l.attributeId,name:t,attribute:f};case"RegisterAttributeListenerAcceptResponseItem":const y=e,h=await this.consumption.attributeListeners.getAttributeListener({id:y.listenerId}),g=await this.expandLocalAttributeListenerDTO(h.value);return{...y,type:"RegisterAttributeListenerAcceptResponseItemDVO",id:y.listenerId,name:t,listener:g};default:return{...e,type:"AcceptResponseItemDVO",id:"",name:t}}}}async expandLocalAttributeListenerDTO(e){const t=await this.expandAttributeQuery(e.query),r=await this.expandIdentityForAddress(e.peer);return{type:"LocalAttributeListenerDVO",name:"dvo.localAttributeListener.name",description:"dvo.localAttributeListener.description",...e,query:t,peer:r}}async expandResponseGroupOrItem(e){if("ResponseItemGroup"===e["@type"]){const t=e,r=[];for(const e of t.items)r.push(await this.expandResponseItem(e));return{type:"ResponseItemGroupDVO",items:r}}return await this.expandResponseItem(e)}async expandLocalRequestDTO(e){const t=e.response?await this.expandLocalResponseDTO(e.response,e):void 0,r=await this.expandRequest(e.content,e,t),i=await this.expandAddress(e.peer);let n=!1;e.isOwn||"DecisionRequired"!==e.status&&"ManualDecisionRequired"!==e.status||(n=!0);const s=e.isOwn?"outgoing":"incoming",o=`i18n://dvo.localRequest.status.${e.status}`,a=e.source?.type??"unknown",c=e.response?e.response.content.requestId:"";return{...e,id:e.id?e.id:c,content:r,items:r.items,name:`i18n://dvo.localRequest.${a}.${s}.${e.status}.name`,directionText:`i18n://dvo.localRequest.direction.${s}`,description:`i18n://dvo.localRequest.${a}.${s}.${e.status}.description`,sourceTypeText:`i18n://dvo.localRequest.sourceType.${a}`,type:"LocalRequestDVO",date:e.createdAt,createdBy:e.isOwn?this.expandSelf():i,decider:e.isOwn?i:this.expandSelf(),peer:i,response:t,statusText:o,isDecidable:n}}async expandLocalRequestDTOs(e){const t=e.map((e=>this.expandLocalRequestDTO(e)));return await Promise.all(t)}async expandResponse(e,t){const r=[];for(const t of e.items)r.push(await this.expandResponseGroupOrItem(t));return{id:t.id,name:"i18n://dvo.response.name",type:"ResponseDVO",...e,items:r}}async expandLocalResponseDTO(e,t){const r=await this.expandResponse(e.content,t);return{...e,id:t.id,name:"i18n://dvo.localResponse.name",type:"LocalResponseDVO",date:e.createdAt,content:r,items:e.content.items}}async expandLocalAttributeDTO(e){const t=e.content.value["@type"],r=await this.consumptionController.attributes.getLocalAttribute(u.CoreId.from(e.id));if(!r)throw new Error("Attribute not found");const i=e.content.owner;let n=`i18n://dvo.attribute.name.${t}`,s=`i18n://dvo.attribute.description.${t}`;const o=r.content.value.renderHints.toJSON(),a=r.content.value.valueHints.toJSON();if(r.shareInfo){const u=r.shareInfo.peer.toString();if(r.content instanceof c.RelationshipAttribute){const c=r.content,p=c.value;return"title"in p&&(n=p.title),"description"in p&&p.description&&(s=p.description),c.owner===r.shareInfo.peer?{type:"PeerRelationshipAttributeDVO",id:e.id,name:n,key:c.key,confidentiality:c.confidentiality,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!1,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),valueType:t,isTechnical:c.isTechnical}:{type:"OwnRelationshipAttributeDVO",id:e.id,name:n,key:c.key,confidentiality:c.confidentiality,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),valueType:t,isTechnical:c.isTechnical}}const p=r.content;return r.shareInfo.sourceAttribute?{type:"SharedToPeerAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),sourceAttribute:r.shareInfo.sourceAttribute.toString(),tags:p.tags?p.tags:[],valueType:t}:{type:"PeerAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!1,peer:u,isDraft:!1,requestReference:r.shareInfo.requestReference.toString(),tags:p.tags?p.tags:[],valueType:t}}const p=r.content,l=await this.consumption.attributes.getAttributes({query:{"shareInfo.sourceAttribute":e.id}}),d=await this.expandLocalAttributeDTOs(l.value);return{type:"RepositoryAttributeDVO",id:e.id,name:n,description:s,content:e.content,value:e.content.value,date:e.createdAt,owner:i,renderHints:o,valueHints:a,isValid:!0,createdAt:e.createdAt,isOwn:!0,isDraft:!1,sharedWith:d,tags:p.tags?p.tags:[],valueType:t}}async expandLocalAttributeDTOs(e){const t=e.map((e=>this.expandLocalAttributeDTO(e)));return await Promise.all(t)}async expandAttributeQuery(e){switch(e["@type"]){case"IdentityAttributeQuery":return this.expandIdentityAttributeQuery(e);case"RelationshipAttributeQuery":return await this.expandRelationshipAttributeQuery(e);case"ThirdPartyRelationshipAttributeQuery":return await this.expandThirdPartyRelationshipAttributeQuery(e);case"IQLQuery":return this.expandIQLQuery(e);default:throw new Error("Wrong attribute query")}}expandIdentityAttributeQuery(e){const t=e.valueType,r=`i18n://dvo.attribute.name.${t}`,i=`i18n://dvo.attribute.description.${t}`,n=this.getHintsForValueType(t);return{type:"IdentityAttributeQueryDVO",id:"",name:r,description:i,valueType:t,validFrom:e.validFrom,validTo:e.validTo,renderHints:n.renderHints,valueHints:n.valueHints,isProcessed:!1}}async expandRelationshipAttributeQuery(e){const t=e.attributeCreationHints.valueType;let r="i18n://dvo.attributeQuery.name.RelationshipAttributeQuery",i="i18n://dvo.attributeQuery.description.RelationshipAttributeQuery";e.attributeCreationHints.title&&(r=e.attributeCreationHints.title),e.attributeCreationHints.description&&(i=e.attributeCreationHints.description);const n=this.getHintsForValueType(t);return e.attributeCreationHints.valueHints&&(n.valueHints=e.attributeCreationHints.valueHints),{type:"RelationshipAttributeQueryDVO",id:"",name:r,description:i,validFrom:e.validFrom,validTo:e.validTo,owner:await this.expandAddress(e.owner),key:e.key,attributeCreationHints:e.attributeCreationHints,renderHints:n.renderHints,valueHints:n.valueHints,isProcessed:!1,valueType:t}}async expandThirdPartyRelationshipAttributeQuery(e){const t=await Promise.all(e.thirdParty.map((e=>this.expandAddress(e))));return{type:"ThirdPartyRelationshipAttributeQueryDVO",id:"",name:"i18n://dvo.attributeQuery.name.ThirdPartyRelationshipAttributeQuery",description:"i18n://dvo.attributeQuery.description.ThirdPartyRelationshipAttributeQuery",validFrom:e.validFrom,validTo:e.validTo,owner:await this.expandAddress(e.owner),thirdParty:t,key:e.key,isProcessed:!1}}expandIQLQuery(e){let t,r,i,n;if(e.attributeCreationHints?.valueType&&(i=e.attributeCreationHints.valueType),i){const e=this.getHintsForValueType(i);t=e.renderHints,r=e.valueHints}return e.attributeCreationHints?.tags&&(n=e.attributeCreationHints.tags),{type:"IQLQueryDVO",id:"",name:"i18n://dvo.attributeQuery.name.IQLQuery",description:"i18n://dvo.attributeQuery.description.IQLQuery",queryString:e.queryString,isProcessed:!1,attributeCreationHints:e.attributeCreationHints,valueType:i,renderHints:t,valueHints:r,tags:n}}getHintsForValueType(e){const t=o.SerializableBase.getModule(e,1);if(!t)throw new Error(`No class implementation found for ${e}`);let r={"@type":"RenderHints",editType:c.RenderHintsEditType.InputLike,technicalType:c.RenderHintsTechnicalType.String},i={"@type":"ValueHints",max:200};return t.renderHints&&t.renderHints instanceof c.RenderHints&&(r=t.renderHints.toJSON()),t.valueHints&&t.valueHints instanceof c.ValueHints&&(i=t.valueHints.toJSON()),{renderHints:r,valueHints:i}}async processAttributeQuery(e){switch(e["@type"]){case"IdentityAttributeQuery":return await this.processIdentityAttributeQuery(e);case"RelationshipAttributeQuery":return await this.processRelationshipAttributeQuery(e);case"ThirdPartyRelationshipAttributeQuery":return await this.processThirdPartyRelationshipAttributeQuery(e);case"IQLQuery":return await this.processIQLQuery(e);default:throw new Error("Wrong attribute query")}}async processIdentityAttributeQuery(e){const t=await this.consumption.attributes.executeIdentityAttributeQuery({query:e}),r=await this.expandLocalAttributeDTOs(t.value);return{...this.expandIdentityAttributeQuery(e),type:"ProcessedIdentityAttributeQueryDVO",results:r,isProcessed:!0}}async processRelationshipAttributeQuery(e){const t=await this.consumption.attributes.executeRelationshipAttributeQuery({query:e});if(t.isError){if("error.runtime.recordNotFound"!==t.error.code)throw t.error;return{...await this.expandRelationshipAttributeQuery(e),type:"ProcessedRelationshipAttributeQueryDVO",results:[],isProcessed:!0}}const r=await this.expandLocalAttributeDTO(t.value);return{...await this.expandRelationshipAttributeQuery(e),type:"ProcessedRelationshipAttributeQueryDVO",results:[r],isProcessed:!0}}async processThirdPartyRelationshipAttributeQuery(e){const t=await this.consumption.attributes.executeThirdPartyRelationshipAttributeQuery({query:e}),r=await this.expandLocalAttributeDTOs(t.value);return{...await this.expandThirdPartyRelationshipAttributeQuery(e),type:"ProcessedThirdPartyRelationshipAttributeQueryDVO",results:r,isProcessed:!0}}async processIQLQuery(e){const t=await this.consumption.attributes.executeIQLQuery({query:e}),r=await this.expandLocalAttributeDTOs(t.value);let i,n,s;if(r.length>0&&r.every((e=>e.valueType===r[0].valueType)))i=r[0].valueType,n=r[0].renderHints,s=r[0].valueHints;else if(e.attributeCreationHints?.valueType&&(i=e.attributeCreationHints.valueType),i){const e=this.getHintsForValueType(i);n=e.renderHints,s=e.valueHints}return{...this.expandIQLQuery(e),type:"ProcessedIQLQueryDVO",results:r,isProcessed:!0,valueType:i,renderHints:n,valueHints:s}}async expandIdentityAttribute(e,t){const r=e.value["@type"],i=`i18n://dvo.attribute.name.${r}`,n=`i18n://dvo.attribute.description.${r}`,s=t.value.renderHints.toJSON(),o=t.value.valueHints.toJSON(),a=await this.expandAddress(e.owner);return{type:"DraftIdentityAttributeDVO",content:e,name:i,description:n,id:"",owner:a,renderHints:s,valueHints:o,value:e.value,isDraft:!0,isOwn:a.isSelf,valueType:r,tags:t.tags?t.tags:[]}}async expandRelationshipAttribute(e,t){const r=e.value["@type"];let i=`i18n://dvo.attribute.name.${r}`,n=`i18n://dvo.attribute.description.${r}`;const s=t.value.renderHints.toJSON(),o=t.value.valueHints.toJSON(),a=t.value;"title"in a&&(i=a.title),"description"in a&&a.description&&(n=a.description);const c=await this.expandAddress(e.owner);return{type:"DraftRelationshipAttributeDVO",content:e,name:i,description:n,key:e.key,confidentiality:e.confidentiality,isTechnical:!!e.isTechnical,id:"",owner:c,renderHints:s,valueHints:o,value:e.value,isDraft:!0,isOwn:c.isSelf,valueType:r}}async expandAttribute(e){const t=o.Serializable.fromUnknown(e);if(t instanceof c.IdentityAttribute)return await this.expandIdentityAttribute(e,t);if(t instanceof c.RelationshipAttribute)return await this.expandRelationshipAttribute(e,t);throw new Error("Wrong attribute instance")}async expandAttributes(e){const t=e.map((e=>this.expandAttribute(e)));return await Promise.all(t)}expandSelf(){return{id:this.identityController.address.toString(),type:"IdentityDVO",name:"i18n://dvo.identity.self.name",initials:"i18n://dvo.identity.self.initials",realm:u.Realm.Prod,description:"i18n://dvo.identity.self.description",isSelf:!0,hasRelationship:!1}}expandUnknown(e){const t=e.substring(3,9),r=(t.match(/\b\w/g)??[]).join("");return{id:e,type:"IdentityDVO",name:t,initials:r,realm:u.Realm.Prod,description:"i18n://dvo.identity.unknown.description",isSelf:!1,hasRelationship:!1}}async expandAddress(e){if(this.identityController.isMe(u.CoreAddress.from(e)))return this.expandSelf();const t=await this.transport.relationships.getRelationshipByAddress({address:e});return t.isError?this.expandUnknown(e):await this.expandRelationshipDTO(t.value)}async expandAddresses(e){const t=e.map((e=>this.expandAddress(e)));return await Promise.all(t)}async expandRecipientDTO(e){return{...await this.expandAddress(e.address),type:"RecipientDVO",receivedAt:e.receivedAt,receivedByDevice:e.receivedByDevice}}async expandRecipientDTOs(e){const t=e.map((e=>this.expandRecipientDTO(e)));return await Promise.all(t)}expandRelationshipChangeDTO(e,t){const r=t.response?t.response.createdAt:t.request.createdAt;let i,n=!1;return this.identityController.isMe(u.CoreAddress.from(t.request.createdBy))&&(n=!0),t.response&&(i={...t.response,id:`${t.id}_response`,name:"i18n://dvo.relationshipChange.response.name",type:"RelationshipChangeResponseDVO"}),Promise.resolve({type:"RelationshipChangeDVO",id:t.id,name:"",date:r,status:t.status,statusText:`i18n://dvo.relationshipChange.${t.status}`,changeType:t.type,changeTypeText:`i18n://dvo.relationshipChange.${t.type}`,isOwn:n,request:{...t.request,id:`${t.id}_request`,name:"i18n://dvo.relationshipChange.request.name",type:"RelationshipChangeRequestDVO"},response:i})}async expandRelationshipChangeDTOs(e){const t=e.changes.map((t=>this.expandRelationshipChangeDTO(e,t)));return await Promise.all(t)}async createRelationshipDVO(e){let t;const r=await this.consumption.settings.getSettings({query:{reference:e.id}});t=r.value.length>0?r.value[0].value:{isPinned:!1};const i={},n=await this.consumption.attributes.getPeerAttributes({onlyValid:!0,peer:e.peer}),s=await this.expandLocalAttributeDTOs(n.value),o={};for(const e of s){const t=e.content.value["@type"],r=o[t];r?r.push(e):o[t]=[e];if(["DisplayName","GivenName","MiddleName","Surname","Sex"].includes(t)){const r=e.content.value;i[t]&&"GivenName"===t?i[t]+=` ${r.value}`:i[t]=r.value}}let a=g.RelationshipDirection.Incoming;this.identityController.isMe(u.CoreAddress.from(e.changes[0].request.createdBy))&&(a=g.RelationshipDirection.Outgoing);let c="";e.status===u.RelationshipStatus.Pending&&a===g.RelationshipDirection.Outgoing?c=y.DataViewTranslateable.transport.relationshipOutgoing:e.status===u.RelationshipStatus.Pending?c=y.DataViewTranslateable.transport.relationshipIncoming:e.status===u.RelationshipStatus.Rejected?c=y.DataViewTranslateable.transport.relationshipRejected:e.status===u.RelationshipStatus.Revoked?c=y.DataViewTranslateable.transport.relationshipRevoked:e.status===u.RelationshipStatus.Active&&(c=y.DataViewTranslateable.transport.relationshipActive);const p=await this.expandRelationshipChangeDTOs(e);let l;return l=i.DisplayName?i.DisplayName:i.MiddleName&&i.GivenName&&i.Surname?`${i.GivenName} ${i.MiddleName} ${i.Surname}`:i.GivenName&&i.Surname?`${i.GivenName} ${i.Surname}`:i.Sex&&i.Surname?`i18n://dvo.identity.Salutation.${i.Sex} ${i.Surname}`:i.Surname?`${i.Surname}`:e.peer.substring(3,9),{id:e.id,name:t.userTitle??l,description:t.userDescription??c,date:e.changes[0].request.createdAt,image:"",type:"RelationshipDVO",status:e.status,statusText:c,direction:a,isPinned:t.isPinned,attributeMap:o,items:s,nameMap:i,changes:p,changeCount:p.length,templateId:e.template.id}}async expandRelationshipDTO(e){const t=await this.createRelationshipDVO(e),r=(t.name.match(/\b\w/g)??[]).join("");return{type:"IdentityDVO",id:e.peer,name:t.name,date:t.date,description:t.description,publicKey:e.peerIdentity.publicKey,realm:e.peerIdentity.realm,initials:r,isSelf:!1,hasRelationship:!0,relationship:t,items:t.items}}async expandIdentityForAddress(e){if(e===this.identityController.address.toString())return this.expandSelf();const t=await this.transport.relationships.getRelationshipByAddress({address:e});if(t.isSuccess)return await this.expandRelationshipDTO(t.value);if(t.error.code!==f.RuntimeErrors.general.recordNotFound(u.Relationship).code)throw t.error;const r=e.substring(3,9),i=(r.match(/\b\w/g)??[]).join("");return{id:e,type:"IdentityDVO",name:r,initials:i,publicKey:"i18n://dvo.identity.publicKey.unknown",realm:this.identityController.realm.toString(),description:"i18n://dvo.identity.unknown",isSelf:!1,hasRelationship:!1}}async expandIdentityDTO(e){return await this.expandIdentityForAddress(e.address)}async expandRelationshipDTOs(e){const t=e.map((e=>this.expandRelationshipDTO(e)));return await Promise.all(t)}async expandFileId(e){const t=await this.transport.files.getFile({id:e});if(t.isError)throw t.error;return await this.expandFileDTO(t.value)}async expandFileIds(e){const t=e.map((e=>this.expandFileId(e)));return await Promise.all(t)}async expandFileDTO(e){return{...e,type:"FileDVO",id:e.id,name:e.title?e.title:e.filename,date:e.createdAt,image:"",filename:e.filename,filesize:e.filesize,createdBy:await this.expandAddress(e.createdBy)}}async expandFileDTOs(e){const t=e.map((e=>this.expandFileDTO(e)));return await Promise.all(t)}};t.DataViewExpander=m,t.DataViewExpander=m=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),s(3,p.Inject),n("design:paramtypes",[l.TransportServices,d.ConsumptionServices,a.ConsumptionController,u.IdentityController])],m)},9121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2043:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataViewTranslateable=void 0;class DataViewTranslateable{}t.DataViewTranslateable=DataViewTranslateable,DataViewTranslateable.prefix="i18n://dvo.",DataViewTranslateable.transport={messageName:`${DataViewTranslateable.prefix}message.name`,relationshipOutgoing:`${DataViewTranslateable.prefix}relationship.Outgoing`,relationshipIncoming:`${DataViewTranslateable.prefix}relationship.Incoming`,relationshipRejected:`${DataViewTranslateable.prefix}relationship.Rejected`,relationshipRevoked:`${DataViewTranslateable.prefix}relationship.Revoked`,relationshipActive:`${DataViewTranslateable.prefix}relationship.Active`,fileName:`${DataViewTranslateable.prefix}file.name`},DataViewTranslateable.consumption={mails:{mailSubjectFallback:`${DataViewTranslateable.prefix}mails.mailSubjectFallback`,requestMailSubjectFallback:`${DataViewTranslateable.prefix}mails.requestMailSubjectFallback`},attributes:{unknownAttributeName:`${DataViewTranslateable.prefix}attributes.UnknownAttributeName`},requests:{attributesShareRequestName:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.name`,attributesShareRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.namePlural`,attributesShareRequestNoRelationship:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.noRelationship`,attributesShareRequestOnlyRelationships:`${DataViewTranslateable.prefix}requests.AttributesShareRequest.onlyRelationships`,attributesChangeRequestName:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.name`,attributesChangeRequestNamePlural:`${DataViewTranslateable.prefix}requests.AttributesChangeRequest.namePlural`},identities:{self:`${DataViewTranslateable.prefix}identities.self.name`}}},2706:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8306:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2706),t),n(r(6911),t)},1403:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8691:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1952:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8472:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9542:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1403),t),n(r(8691),t),n(r(1952),t),n(r(2421),t),n(r(1600),t),n(r(8472),t)},1039:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6519:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9005:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2161:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},843:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},166:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1039),t),n(r(6519),t),n(r(9802),t),n(r(9005),t),n(r(2161),t),n(r(843),t)},4086:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8306),t),n(r(9542),t),n(r(166),t),n(r(4869),t),n(r(9121),t),n(r(2043),t),n(r(6574),t)},4457:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6342:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4700:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MessageStatus=void 0,function(e){e.Received="Received",e.Delivering="Delivering",e.Delivered="Delivered"}(r||(t.MessageStatus=r={}))},2466:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipDirection=void 0,function(e){e.Outgoing="Outgoing",e.Incoming="Incoming"}(r||(t.RelationshipDirection=r={}))},9893:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6574:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4457),t),n(r(6342),t),n(r(4700),t),n(r(2466),t),n(r(9893),t)},1291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataEvent=void 0;const i=r(5172);class DataEvent extends i.DataEvent{constructor(e,t,r){super(e,r),this.eventTargetAddress=t}}t.DataEvent=DataEvent},1496:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.EventProxy=void 0;const o=s(r(3850)),a=s(r(9663)),c=r(485),u=r(2226),p=r(7747);t.EventProxy=class EventProxy{constructor(e,t){this.targetEventBus=e,this.sourceEventBus=t,this.subscriptionIds=[]}start(){if(this.subscriptionIds.length>0)throw new Error("EventProxy is already started");return this.proxyConsumptionEvents(),this.proxyTransportEvents(),this}proxyTransportEvents(){this.subscribeToSourceEvent(a.MessageDeliveredEvent,(e=>{this.targetEventBus.publish(new p.MessageDeliveredEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.MessageReceivedEvent,(e=>{this.targetEventBus.publish(new p.MessageReceivedEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.MessageSentEvent,(e=>{this.targetEventBus.publish(new p.MessageSentEvent(e.eventTargetAddress,c.MessageMapper.toMessageDTO(e.data)))})),this.subscribeToSourceEvent(a.PeerRelationshipTemplateLoadedEvent,(e=>{this.targetEventBus.publish(new p.PeerRelationshipTemplateLoadedEvent(e.eventTargetAddress,c.RelationshipTemplateMapper.toRelationshipTemplateDTO(e.data)))})),this.subscribeToSourceEvent(a.RelationshipChangedEvent,(e=>{this.targetEventBus.publish(new p.RelationshipChangedEvent(e.eventTargetAddress,c.RelationshipMapper.toRelationshipDTO(e.data)))}))}proxyConsumptionEvents(){this.subscribeToSourceEvent(o.AttributeCreatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeCreatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeDeletedEvent,(e=>{this.targetEventBus.publish(new u.AttributeDeletedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeSucceededEvent,(e=>{this.targetEventBus.publish(new u.AttributeSucceededEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeUpdatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeUpdatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.IncomingRequestReceivedEvent,(e=>{this.targetEventBus.publish(new u.IncomingRequestReceivedEvent(e.eventTargetAddress,c.RequestMapper.toLocalRequestDTO(e.data)))})),this.subscribeToSourceEvent(o.IncomingRequestStatusChangedEvent,(e=>{this.targetEventBus.publish(new u.IncomingRequestStatusChangedEvent(e.eventTargetAddress,{request:c.RequestMapper.toLocalRequestDTO(e.data.request),oldStatus:e.data.oldStatus,newStatus:e.data.newStatus}))})),this.subscribeToSourceEvent(o.OutgoingRequestCreatedEvent,(e=>{this.targetEventBus.publish(new u.OutgoingRequestCreatedEvent(e.eventTargetAddress,c.RequestMapper.toLocalRequestDTO(e.data)))})),this.subscribeToSourceEvent(o.OutgoingRequestCreatedAndCompletedEvent,(e=>{const t=c.RequestMapper.toLocalRequestDTO(e.data);this.targetEventBus.publish(new u.OutgoingRequestCreatedAndCompletedEvent(e.eventTargetAddress,t)),"RelationshipChange"===e.data.response?.source?.type&&this.targetEventBus.publish(new u.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent(e.eventTargetAddress,t))})),this.subscribeToSourceEvent(o.OutgoingRequestStatusChangedEvent,(e=>{this.targetEventBus.publish(new u.OutgoingRequestStatusChangedEvent(e.eventTargetAddress,{request:c.RequestMapper.toLocalRequestDTO(e.data.request),oldStatus:e.data.oldStatus,newStatus:e.data.newStatus}))})),this.subscribeToSourceEvent(o.SharedAttributeCopyCreatedEvent,(e=>{this.targetEventBus.publish(new u.SharedAttributeCopyCreatedEvent(e.eventTargetAddress,c.AttributeMapper.toAttributeDTO(e.data)))})),this.subscribeToSourceEvent(o.AttributeListenerCreatedEvent,(e=>{this.targetEventBus.publish(new u.AttributeListenerCreatedEvent(e.eventTargetAddress,c.AttributeListenerMapper.toAttributeListenerDTO(e.data)))}))}subscribeToSourceEvent(e,t){const r=this.sourceEventBus.subscribe(e,t);this.subscriptionIds.push(r)}stop(){this.subscriptionIds.forEach((e=>this.sourceEventBus.unsubscribe(e)))}}},3635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeCreatedEvent=void 0;const i=r(1291);class AttributeCreatedEvent extends i.DataEvent{constructor(e,t){super(AttributeCreatedEvent.namespace,e,t)}}t.AttributeCreatedEvent=AttributeCreatedEvent,AttributeCreatedEvent.namespace="consumption.attributeCreated"},5046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeDeletedEvent=void 0;const i=r(1291);class AttributeDeletedEvent extends i.DataEvent{constructor(e,t){super(AttributeDeletedEvent.namespace,e,t)}}t.AttributeDeletedEvent=AttributeDeletedEvent,AttributeDeletedEvent.namespace="consumption.attributeDeleted"},2593:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerCreatedEvent=void 0;const i=r(1291);class AttributeListenerCreatedEvent extends i.DataEvent{constructor(e,t){super(AttributeListenerCreatedEvent.namespace,e,t)}}t.AttributeListenerCreatedEvent=AttributeListenerCreatedEvent,AttributeListenerCreatedEvent.namespace="consumption.attributeListenerCreated"},1365:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerTriggeredEvent=void 0;const i=r(1291);class AttributeListenerTriggeredEvent extends i.DataEvent{constructor(e,t){super(AttributeListenerTriggeredEvent.namespace,e,t)}}t.AttributeListenerTriggeredEvent=AttributeListenerTriggeredEvent,AttributeListenerTriggeredEvent.namespace="consumption.attributeListenerTriggered"},2314:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeSucceededEvent=void 0;const i=r(1291);class AttributeSucceededEvent extends i.DataEvent{constructor(e,t){super(AttributeSucceededEvent.namespace,e,t)}}t.AttributeSucceededEvent=AttributeSucceededEvent,AttributeSucceededEvent.namespace="consumption.attributeSucceded"},9846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeUpdatedEvent=void 0;const i=r(1291);class AttributeUpdatedEvent extends i.DataEvent{constructor(e,t){super(AttributeUpdatedEvent.namespace,e,t)}}t.AttributeUpdatedEvent=AttributeUpdatedEvent,AttributeUpdatedEvent.namespace="consumption.attributeUpdated"},8099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestReceivedEvent=void 0;const i=r(1291);class IncomingRequestReceivedEvent extends i.DataEvent{constructor(e,t){if(super(IncomingRequestReceivedEvent.namespace,e,t),t.isOwn)throw new Error("Cannot create this event for an outgoing Request")}}t.IncomingRequestReceivedEvent=IncomingRequestReceivedEvent,IncomingRequestReceivedEvent.namespace="consumption.incomingRequestReceived"},4795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestStatusChangedEvent=void 0;const i=r(1291);class IncomingRequestStatusChangedEvent extends i.DataEvent{constructor(e,t){if(super(IncomingRequestStatusChangedEvent.namespace,e,t),t.request.isOwn)throw new Error("Cannot create this event for an outgoing Request")}}t.IncomingRequestStatusChangedEvent=IncomingRequestStatusChangedEvent,IncomingRequestStatusChangedEvent.namespace="consumption.incomingRequestStatusChanged"},4209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MailReceivedEvent=void 0;const i=r(1291);class MailReceivedEvent extends i.DataEvent{constructor(e,t,r){super(MailReceivedEvent.namespace,e,r),this.mail=t}}t.MailReceivedEvent=MailReceivedEvent,MailReceivedEvent.namespace="consumption.mailReceived"},6425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageProcessedResult=t.MessageProcessedEvent=void 0;const i=r(1291);class MessageProcessedEvent extends i.DataEvent{constructor(e,t,r){super(MessageProcessedEvent.namespace,e,{message:t,result:r})}}var n;t.MessageProcessedEvent=MessageProcessedEvent,MessageProcessedEvent.namespace="consumption.messageProcessed",function(e){e.ManualRequestDecisionRequired="ManualRequestDecisionRequired",e.NoRequest="NoRequest",e.Error="Error"}(n||(t.MessageProcessedResult=n={}))},8302:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestCreatedAndCompletedEvent=void 0;const i=r(1291);class OutgoingRequestCreatedAndCompletedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestCreatedAndCompletedEvent.namespace,e,t),!t.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestCreatedAndCompletedEvent=OutgoingRequestCreatedAndCompletedEvent,OutgoingRequestCreatedAndCompletedEvent.namespace="consumption.outgoingRequestCreatedAndCompleted"},9260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestCreatedEvent=void 0;const i=r(1291);class OutgoingRequestCreatedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestCreatedEvent.namespace,e,t),!t.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestCreatedEvent=OutgoingRequestCreatedEvent,OutgoingRequestCreatedEvent.namespace="consumption.outgoingRequestCreated"},370:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent=void 0;const i=r(1291);class OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent.namespace,e,t),!t.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent=OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent,OutgoingRequestFromRelationshipCreationChangeCreatedAndCompletedEvent.namespace="consumption.outgoingRequestFromRelationshipCreationChangeCreatedAndCompleted"},5107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestStatusChangedEvent=void 0;const i=r(1291);class OutgoingRequestStatusChangedEvent extends i.DataEvent{constructor(e,t){if(super(OutgoingRequestStatusChangedEvent.namespace,e,t),!t.request.isOwn)throw new Error("Cannot create this event for an incoming Request")}}t.OutgoingRequestStatusChangedEvent=OutgoingRequestStatusChangedEvent,OutgoingRequestStatusChangedEvent.namespace="consumption.outgoingRequestStatusChanged"},7834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipEvent=void 0;const i=r(1291);class RelationshipEvent extends i.DataEvent{constructor(e,t,r){super(RelationshipEvent.namespace+r.id,e,r),this.event=t}}t.RelationshipEvent=RelationshipEvent,RelationshipEvent.namespace="consumption.relationshipEvent."},1908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplateProcessedResult=t.RelationshipTemplateProcessedEvent=void 0;const i=r(1291);class RelationshipTemplateProcessedEvent extends i.DataEvent{constructor(e,t){if(super(RelationshipTemplateProcessedEvent.namespace,e,t),t.template.isOwn)throw new Error("Cannot create this event for an own Relationship Template.")}}var n;t.RelationshipTemplateProcessedEvent=RelationshipTemplateProcessedEvent,RelationshipTemplateProcessedEvent.namespace="consumption.relationshipTemplateProcessed",function(e){e.ManualRequestDecisionRequired="ManualRequestDecisionRequired",e.NonCompletedRequestExists="NonCompletedRequestExists",e.RelationshipExists="RelationshipExists",e.NoRequest="NoRequest",e.Error="Error"}(n||(t.RelationshipTemplateProcessedResult=n={}))},43:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedAttributeCopyCreatedEvent=void 0;const i=r(1291);class SharedAttributeCopyCreatedEvent extends i.DataEvent{constructor(e,t){super(SharedAttributeCopyCreatedEvent.namespace,e,t)}}t.SharedAttributeCopyCreatedEvent=SharedAttributeCopyCreatedEvent,SharedAttributeCopyCreatedEvent.namespace="consumption.sharedAttributeCopyCreated"},2226:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3635),t),n(r(5046),t),n(r(2593),t),n(r(1365),t),n(r(2314),t),n(r(9846),t),n(r(8099),t),n(r(4795),t),n(r(4209),t),n(r(6425),t),n(r(8302),t),n(r(9260),t),n(r(370),t),n(r(5107),t),n(r(7834),t),n(r(1908),t),n(r(43),t)},2205:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2226),t),n(r(1291),t),n(r(4696),t),n(r(7747),t)},6762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesInitializedEvent=void 0;const i=r(5172);class ModulesInitializedEvent extends i.Event{constructor(){super(ModulesInitializedEvent.namespace)}}t.ModulesInitializedEvent=ModulesInitializedEvent,ModulesInitializedEvent.namespace="runtime.modulesInitialized"},188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesLoadedEvent=void 0;const i=r(5172);class ModulesLoadedEvent extends i.Event{constructor(){super(ModulesLoadedEvent.namespace)}}t.ModulesLoadedEvent=ModulesLoadedEvent,ModulesLoadedEvent.namespace="runtime.modulesLoaded"},4737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesStartedEvent=void 0;const i=r(5172);class ModulesStartedEvent extends i.Event{constructor(){super(ModulesStartedEvent.namespace)}}t.ModulesStartedEvent=ModulesStartedEvent,ModulesStartedEvent.namespace="runtime.modulesStarted"},7856:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeInitializedEvent=void 0;const i=r(5172);class RuntimeInitializedEvent extends i.Event{constructor(){super(RuntimeInitializedEvent.namespace)}}t.RuntimeInitializedEvent=RuntimeInitializedEvent,RuntimeInitializedEvent.namespace="runtime.initialized"},8061:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeInitializingEvent=void 0;const i=r(5172);class RuntimeInitializingEvent extends i.Event{constructor(){super(RuntimeInitializingEvent.namespace)}}t.RuntimeInitializingEvent=RuntimeInitializingEvent,RuntimeInitializingEvent.namespace="runtime.initializing"},4696:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(6762),t),n(r(188),t),n(r(4737),t),n(r(7856),t),n(r(8061),t)},5984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageDeliveredEvent=void 0;const i=r(1291);class MessageDeliveredEvent extends i.DataEvent{constructor(e,t){super(MessageDeliveredEvent.namespace,e,t)}}t.MessageDeliveredEvent=MessageDeliveredEvent,MessageDeliveredEvent.namespace="transport.messageDelivered"},8994:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageReceivedEvent=void 0;const i=r(1291);class MessageReceivedEvent extends i.DataEvent{constructor(e,t){super(MessageReceivedEvent.namespace,e,t)}}t.MessageReceivedEvent=MessageReceivedEvent,MessageReceivedEvent.namespace="transport.messageReceived"},4769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageSentEvent=void 0;const i=r(1291);class MessageSentEvent extends i.DataEvent{constructor(e,t){super(MessageSentEvent.namespace,e,t)}}t.MessageSentEvent=MessageSentEvent,MessageSentEvent.namespace="transport.messageSent"},2182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PeerRelationshipTemplateLoadedEvent=void 0;const i=r(1291);class PeerRelationshipTemplateLoadedEvent extends i.DataEvent{constructor(e,t){super(PeerRelationshipTemplateLoadedEvent.namespace,e,t)}}t.PeerRelationshipTemplateLoadedEvent=PeerRelationshipTemplateLoadedEvent,PeerRelationshipTemplateLoadedEvent.namespace="transport.peerRelationshipTemplateLoaded"},1690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipChangedEvent=void 0;const i=r(1291);class RelationshipChangedEvent extends i.DataEvent{constructor(e,t){super(RelationshipChangedEvent.namespace,e,t)}}t.RelationshipChangedEvent=RelationshipChangedEvent,RelationshipChangedEvent.namespace="transport.relationshipChanged"},7747:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5984),t),n(r(8994),t),n(r(4769),t),n(r(2182),t),n(r(1690),t)},7371:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousServices=void 0;const o=r(7071),a=r(8346);let c=class AnonymousServices{constructor(e){this.tokens=e}};t.AnonymousServices=c,t.AnonymousServices=c=i([s(0,o.Inject),n("design:paramtypes",[a.AnonymousTokensFacade])],c)},4629:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsumptionServices=void 0;const o=r(7071),a=r(6013);let c=class ConsumptionServices{constructor(e,t,r,i,n,s){this.attributes=e,this.drafts=t,this.settings=r,this.incomingRequests=i,this.outgoingRequests=n,this.attributeListeners=s}};t.ConsumptionServices=c,t.ConsumptionServices=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),n("design:paramtypes",[a.AttributesFacade,a.DraftsFacade,a.SettingsFacade,a.IncomingRequestsFacade,a.OutgoingRequestsFacade,a.AttributeListenersFacade])],c)},4164:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TransportServices=void 0;const o=r(7071),a=r(9728);let c=class TransportServices{constructor(e,t,r,i,n,s,o,a){this.files=e,this.messages=t,this.relationships=r,this.relationshipTemplates=i,this.tokens=n,this.account=s,this.devices=o,this.challenges=a}};t.TransportServices=c,t.TransportServices=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.FilesFacade,a.MessagesFacade,a.RelationshipsFacade,a.RelationshipTemplatesFacade,a.TokensFacade,a.AccountFacade,a.DevicesFacade,a.ChallengesFacade])],c)},7306:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousTokensFacade=void 0;const o=r(7071),a=r(485);let c=class AnonymousTokensFacade{constructor(e,t){this.loadPeerTokenByTruncatedReferenceUseCase=e,this.loadPeerTokenByIdAndKeyUseCase=t}async loadPeerTokenByTruncatedReference(e){return await this.loadPeerTokenByTruncatedReferenceUseCase.execute(e)}async loadPeerTokenByIdAndKey(e){return await this.loadPeerTokenByIdAndKeyUseCase.execute(e)}};t.AnonymousTokensFacade=c,t.AnonymousTokensFacade=c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.LoadPeerTokenAnonymousByTruncatedReferenceUseCase,a.LoadPeerTokenAnonymousByIdAndKeyUseCase])],c)},8346:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7306),t)},1582:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenersFacade=void 0;const o=r(7071),a=r(485);let c=class AttributeListenersFacade{constructor(e,t){this.getAttributeListenerUseCase=e,this.getAttributeListenersUseCase=t}async getAttributeListener(e){return await this.getAttributeListenerUseCase.execute(e)}async getAttributeListeners(){return await this.getAttributeListenersUseCase.execute()}};t.AttributeListenersFacade=c,t.AttributeListenersFacade=c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.GetAttributeListenerUseCase,a.GetAttributeListenersUseCase])],c)},2534:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AttributesFacade=void 0;const o=r(7071),a=r(485);let c=class AttributesFacade{constructor(e,t,r,i,n,s,o,a,c,u,p,l,d,f,y){this.createAttributeUseCase=e,this.createSharedAttributeCopyUseCase=t,this.deleteAttributeUseCase=r,this.getPeerAttributesUseCase=i,this.getSharedToPeerAttributesUseCase=n,this.getAttributeUseCase=s,this.getAttributesUseCase=o,this.succeedAttributeUseCase=a,this.updateAttributeUseCase=c,this.executeIdentityAttributeQueryUseCase=u,this.executeRelationshipAttributeQueryUseCase=p,this.executeThirdPartyRelationshipAttributeQueryUseCase=l,this.executeIQLQueryUseCase=d,this.validateIQLQueryUseCase=f,this.shareAttributeUseCase=y}async createAttribute(e){return await this.createAttributeUseCase.execute(e)}async createSharedAttributeCopy(e){return await this.createSharedAttributeCopyUseCase.execute(e)}async deleteAttribute(e){return await this.deleteAttributeUseCase.execute(e)}async getPeerAttributes(e){return await this.getPeerAttributesUseCase.execute(e)}async getSharedToPeerAttributes(e){return await this.getSharedToPeerAttributesUseCase.execute(e)}async getAttribute(e){return await this.getAttributeUseCase.execute(e)}async getAttributes(e){return await this.getAttributesUseCase.execute(e)}async executeIdentityAttributeQuery(e){return await this.executeIdentityAttributeQueryUseCase.execute(e)}async executeRelationshipAttributeQuery(e){return await this.executeRelationshipAttributeQueryUseCase.execute(e)}async executeThirdPartyRelationshipAttributeQuery(e){return await this.executeThirdPartyRelationshipAttributeQueryUseCase.execute(e)}async executeIQLQuery(e){return await this.executeIQLQueryUseCase.execute(e)}async validateIQLQuery(e){return await this.validateIQLQueryUseCase.execute(e)}async succeedAttribute(e){return await this.succeedAttributeUseCase.execute(e)}async updateAttribute(e){return await this.updateAttributeUseCase.execute(e)}async shareAttribute(e){return await this.shareAttributeUseCase.execute(e)}};t.AttributesFacade=c,t.AttributesFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),s(9,o.Inject),s(10,o.Inject),s(11,o.Inject),s(12,o.Inject),s(13,o.Inject),s(14,o.Inject),n("design:paramtypes",[a.CreateAttributeUseCase,a.CreateSharedAttributeCopyUseCase,a.DeleteAttributeUseCase,a.GetPeerAttributesUseCase,a.GetSharedToPeerAttributesUseCase,a.GetAttributeUseCase,a.GetAttributesUseCase,a.SucceedAttributeUseCase,a.UpdateAttributeUseCase,a.ExecuteIdentityAttributeQueryUseCase,a.ExecuteRelationshipAttributeQueryUseCase,a.ExecuteThirdPartyRelationshipAttributeQueryUseCase,a.ExecuteIQLQueryUseCase,a.ValidateIQLQueryUseCase,a.ShareAttributeUseCase])],c)},3514:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DraftsFacade=void 0;const o=r(7071),a=r(485);let c=class DraftsFacade{constructor(e,t,r,i,n){this.createDraftUseCase=e,this.deleteDraftUseCase=t,this.getDraftUseCase=r,this.getDraftsUseCase=i,this.updateDraftUseCase=n}async createDraft(e){return await this.createDraftUseCase.execute(e)}async deleteDraft(e){return await this.deleteDraftUseCase.execute(e)}async getDraft(e){return await this.getDraftUseCase.execute(e)}async getDrafts(e){return await this.getDraftsUseCase.execute(e)}async updateDraft(e){return await this.updateDraftUseCase.execute(e)}};t.DraftsFacade=c,t.DraftsFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.CreateDraftUseCase,a.DeleteDraftUseCase,a.GetDraftUseCase,a.GetDraftsUseCase,a.UpdateDraftUseCase])],c)},9617:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.IncomingRequestsFacade=void 0;const o=r(7071),a=r(485);let c=class IncomingRequestsFacade{constructor(e,t,r,i,n,s,o,a,c,u){this.receivedUseCase=e,this.checkPrerequisitesUseCase=t,this.requireManualDecisionUseCase=r,this.canAcceptUseCase=i,this.acceptUseCase=n,this.canRejectUseCase=s,this.rejectUseCase=o,this.completeUseCase=a,this.getRequestUseCase=c,this.getRequestsUseCase=u}async received(e){return await this.receivedUseCase.execute(e)}async checkPrerequisites(e){return await this.checkPrerequisitesUseCase.execute(e)}async requireManualDecision(e){return await this.requireManualDecisionUseCase.execute(e)}async canAccept(e){return await this.canAcceptUseCase.execute(e)}async accept(e){return await this.acceptUseCase.execute(e)}async canReject(e){return await this.canRejectUseCase.execute(e)}async reject(e){return await this.rejectUseCase.execute(e)}async complete(e){return await this.completeUseCase.execute(e)}async getRequest(e){return await this.getRequestUseCase.execute(e)}async getRequests(e){return await this.getRequestsUseCase.execute(e)}};t.IncomingRequestsFacade=c,t.IncomingRequestsFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),s(9,o.Inject),n("design:paramtypes",[a.ReceivedIncomingRequestUseCase,a.CheckPrerequisitesOfIncomingRequestUseCase,a.RequireManualDecisionOfIncomingRequestUseCase,a.CanAcceptIncomingRequestUseCase,a.AcceptIncomingRequestUseCase,a.CanRejectIncomingRequestUseCase,a.RejectIncomingRequestUseCase,a.CompleteIncomingRequestUseCase,a.GetIncomingRequestUseCase,a.GetIncomingRequestsUseCase])],c)},1881:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OutgoingRequestsFacade=void 0;const o=r(7071),a=r(485);let c=class OutgoingRequestsFacade{constructor(e,t,r,i,n,s,o,a){this.canCreateUseCase=e,this.createUseCase=t,this.sentUseCase=r,this.createAndCompleteFromRelationshipTemplateResponseUseCase=i,this.completeUseCase=n,this.getRequestUseCase=s,this.getRequestsUseCase=o,this.discardRequestUseCase=a}async canCreate(e){return await this.canCreateUseCase.execute(e)}async create(e){return await this.createUseCase.execute(e)}async createAndCompleteFromRelationshipTemplateResponse(e){return await this.createAndCompleteFromRelationshipTemplateResponseUseCase.execute(e)}async sent(e){return await this.sentUseCase.execute(e)}async complete(e){return await this.completeUseCase.execute(e)}async getRequest(e){return await this.getRequestUseCase.execute(e)}async getRequests(e){return await this.getRequestsUseCase.execute(e)}async discard(e){return await this.discardRequestUseCase.execute(e)}};t.OutgoingRequestsFacade=c,t.OutgoingRequestsFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.CanCreateOutgoingRequestUseCase,a.CreateOutgoingRequestUseCase,a.SentOutgoingRequestUseCase,a.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseUseCase,a.CompleteOutgoingRequestUseCase,a.GetOutgoingRequestUseCase,a.GetOutgoingRequestsUseCase,a.DiscardOutgoingRequestUseCase])],c)},6615:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsFacade=void 0;const o=r(7071),a=r(485);let c=class SettingsFacade{constructor(e,t,r,i,n,s){this.createSettingUseCase=e,this.updateSettingUseCase=t,this.deleteSettingUseCase=r,this.getSettingsUseCase=i,this.getSettingUseCase=n,this.getSettingByKeyUseCase=s}async createSetting(e){return await this.createSettingUseCase.execute(e)}async getSetting(e){return await this.getSettingUseCase.execute(e)}async getSettingByKey(e){return await this.getSettingByKeyUseCase.execute(e)}async getSettings(e){return await this.getSettingsUseCase.execute(e)}async deleteSetting(e){return await this.deleteSettingUseCase.execute(e)}async updateSetting(e){return await this.updateSettingUseCase.execute(e)}};t.SettingsFacade=c,t.SettingsFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),n("design:paramtypes",[a.CreateSettingUseCase,a.UpdateSettingUseCase,a.DeleteSettingUseCase,a.GetSettingsUseCase,a.GetSettingUseCase,a.GetSettingByKeyUseCase])],c)},6013:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1582),t),n(r(2534),t),n(r(3514),t),n(r(9617),t),n(r(1881),t),n(r(6615),t)},941:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountFacade=void 0;const o=r(7071),a=r(485);let c=class AccountFacade{constructor(e,t,r,i,n,s,o,a,c){this.getIdentityInfoUseCase=e,this.getDeviceInfoUseCase=t,this.registerPushNotificationTokenUseCase=r,this.syncDatawalletUseCase=i,this.syncEverythingUseCase=n,this.getSyncInfoUseCase=s,this.disableAutoSyncUseCase=o,this.enableAutoSyncUseCase=a,this.loadItemFromTruncatedReferenceUseCase=c}async getIdentityInfo(){return await this.getIdentityInfoUseCase.execute()}async getDeviceInfo(){return await this.getDeviceInfoUseCase.execute()}async registerPushNotificationToken(e){return await this.registerPushNotificationTokenUseCase.execute(e)}async syncDatawallet(e={}){return await this.syncDatawalletUseCase.execute(e)}async syncEverything(e={}){return await this.syncEverythingUseCase.execute(e)}async getSyncInfo(){return await this.getSyncInfoUseCase.execute()}async enableAutoSync(){return await this.enableAutoSyncUseCase.execute()}async disableAutoSync(){return await this.disableAutoSyncUseCase.execute()}async loadItemFromTruncatedReference(e){return await this.loadItemFromTruncatedReferenceUseCase.execute(e)}};t.AccountFacade=c,t.AccountFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),s(8,o.Inject),n("design:paramtypes",[a.GetIdentityInfoUseCase,a.GetDeviceInfoUseCase,a.RegisterPushNotificationTokenUseCase,a.SyncDatawalletUseCase,a.SyncEverythingUseCase,a.GetSyncInfoUseCase,a.DisableAutoSyncUseCase,a.EnableAutoSyncUseCase,a.LoadItemFromTruncatedReferenceUseCase])],c)},4213:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChallengesFacade=void 0;const o=r(7071),a=r(485);let c=class ChallengesFacade{constructor(e,t){this.createChallengeUseCase=e,this.validateChallengeUseCase=t}async createChallenge(e){return await this.createChallengeUseCase.execute(e)}async validateChallenge(e){return await this.validateChallengeUseCase.execute(e)}};t.ChallengesFacade=c,t.ChallengesFacade=c=i([s(0,o.Inject),s(1,o.Inject),n("design:paramtypes",[a.CreateChallengeUseCase,a.ValidateChallengeUseCase])],c)},7974:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DevicesFacade=void 0;const o=r(7071),a=r(485);let c=class DevicesFacade{constructor(e,t,r,i,n,s,o){this.getDeviceUseCase=e,this.getDevicesUseCase=t,this.createDeviceUseCase=r,this.updateDeviceUseCase=i,this.deleteDeviceUseCase=n,this.getDeviceOnboardingInfoUseCase=s,this.getDeviceOnboardingTokenUseCase=o}async getDevice(e){return await this.getDeviceUseCase.execute(e)}async getDevices(){return await this.getDevicesUseCase.execute()}async createDevice(e){return await this.createDeviceUseCase.execute(e)}async getDeviceOnboardingInfo(e){return await this.getDeviceOnboardingInfoUseCase.execute(e)}async getDeviceOnboardingToken(e){return await this.getDeviceOnboardingTokenUseCase.execute(e)}async updateDevice(e){return await this.updateDeviceUseCase.execute(e)}async deleteDevice(e){return await this.deleteDeviceUseCase.execute(e)}};t.DevicesFacade=c,t.DevicesFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),n("design:paramtypes",[a.GetDeviceUseCase,a.GetDevicesUseCase,a.CreateDeviceUseCase,a.UpdateDeviceUseCase,a.DeleteDeviceUseCase,a.GetDeviceOnboardingInfoUseCase,a.CreateDeviceOnboardingTokenUseCase])],c)},360:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.FilesFacade=void 0;const o=r(7071),a=r(485);let c=class FilesFacade{constructor(e,t,r,i,n,s,o,a){this.uploadOwnFileUseCase=e,this.getOrLoadFileUseCase=t,this.getFilesUseCase=r,this.downloadFileUseCase=i,this.getFileUseCase=n,this.createQrCodeForFileUseCase=s,this.createTokenForFileUseCase=o,this.createTokenQrCodeForFileUseCase=a}async getFiles(e){return await this.getFilesUseCase.execute(e)}async getOrLoadFile(e){return await this.getOrLoadFileUseCase.execute(e)}async downloadFile(e){return await this.downloadFileUseCase.execute(e)}async getFile(e){return await this.getFileUseCase.execute(e)}async uploadOwnFile(e){return await this.uploadOwnFileUseCase.execute(e)}async createQrCodeForFile(e){return await this.createQrCodeForFileUseCase.execute(e)}async createTokenForFile(e){return await this.createTokenForFileUseCase.execute(e)}async createTokenQrCodeForFile(e){return await this.createTokenQrCodeForFileUseCase.execute(e)}};t.FilesFacade=c,t.FilesFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.UploadOwnFileUseCase,a.GetOrLoadFileUseCase,a.GetFilesUseCase,a.DownloadFileUseCase,a.GetFileUseCase,a.CreateQrCodeForFileUseCase,a.CreateTokenForFileUseCase,a.CreateTokenQrCodeForFileUseCase])],c)},1106:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityFacade=void 0;const o=r(7071),a=r(485);let c=class IdentityFacade{constructor(e){this.checkIdentityUseCase=e}async checkIdentity(e){return await this.checkIdentityUseCase.execute(e)}};t.IdentityFacade=c,t.IdentityFacade=c=i([s(0,o.Inject),n("design:paramtypes",[a.CheckIdentityUseCase])],c)},1532:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MessagesFacade=void 0;const o=r(7071),a=r(485);let c=class MessagesFacade{constructor(e,t,r,i,n){this.getMessagesUseCase=e,this.getMessageUseCase=t,this.sendMessageUseCase=r,this.downloadAttachmentUseCase=i,this.getAttachmentMetadataUseCase=n}async sendMessage(e){return await this.sendMessageUseCase.execute(e)}async getMessages(e){return await this.getMessagesUseCase.execute(e)}async getMessage(e){return await this.getMessageUseCase.execute(e)}async downloadAttachment(e){return await this.downloadAttachmentUseCase.execute(e)}async getAttachmentMetadata(e){return await this.getAttachmentMetadataUseCase.execute(e)}};t.MessagesFacade=c,t.MessagesFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.GetMessagesUseCase,a.GetMessageUseCase,a.SendMessageUseCase,a.DownloadAttachmentUseCase,a.GetAttachmentMetadataUseCase])],c)},7349:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplatesFacade=void 0;const o=r(7071),a=r(485);let c=class RelationshipTemplatesFacade{constructor(e,t,r,i,n,s,o){this.createOwnRelationshipTemplateUseCase=e,this.loadPeerRelationshipTemplateUseCase=t,this.getRelationshipTemplatesUseCase=r,this.getRelationshipTemplateUseCase=i,this.createQrCodeForOwnTemplateUseCase=n,this.createTokenQrCodeForOwnTemplateUseCase=s,this.createTokenForOwnTemplateUseCase=o}async createOwnRelationshipTemplate(e){return await this.createOwnRelationshipTemplateUseCase.execute(e)}async loadPeerRelationshipTemplate(e){return await this.loadPeerRelationshipTemplateUseCase.execute(e)}async getRelationshipTemplates(e){return await this.getRelationshipTemplatesUseCase.execute(e)}async getRelationshipTemplate(e){return await this.getRelationshipTemplateUseCase.execute(e)}async createQrCodeForOwnTemplate(e){return await this.createQrCodeForOwnTemplateUseCase.execute(e)}async createTokenQrCodeForOwnTemplate(e){return await this.createTokenQrCodeForOwnTemplateUseCase.execute(e)}async createTokenForOwnTemplate(e){return await this.createTokenForOwnTemplateUseCase.execute(e)}};t.RelationshipTemplatesFacade=c,t.RelationshipTemplatesFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),n("design:paramtypes",[a.CreateOwnRelationshipTemplateUseCase,a.LoadPeerRelationshipTemplateUseCase,a.GetRelationshipTemplatesUseCase,a.GetRelationshipTemplateUseCase,a.CreateQrCodeForOwnTemplateUseCase,a.CreateTokenQrCodeForOwnTemplateUseCase,a.CreateTokenForOwnTemplateUseCase])],c)},8586:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipsFacade=void 0;const o=r(7071),a=r(485);let c=class RelationshipsFacade{constructor(e,t,r,i,n,s,o,a){this.getRelationshipsUseCase=e,this.getRelationshipUseCase=t,this.getRelationshipByAddressUseCase=r,this.createRelationshipUseCase=i,this.acceptRelationshipChangeUseCase=n,this.rejectRelationshipChangeUseCase=s,this.revokeRelationshipChangeUseCase=o,this.getAttributesForRelationshipUseCase=a}async getRelationships(e){return await this.getRelationshipsUseCase.execute(e)}async getRelationship(e){return await this.getRelationshipUseCase.execute(e)}async getRelationshipByAddress(e){return await this.getRelationshipByAddressUseCase.execute(e)}async createRelationship(e){return await this.createRelationshipUseCase.execute(e)}async acceptRelationshipChange(e){return await this.acceptRelationshipChangeUseCase.execute(e)}async rejectRelationshipChange(e){return await this.rejectRelationshipChangeUseCase.execute(e)}async revokeRelationshipChange(e){return await this.revokeRelationshipChangeUseCase.execute(e)}async getAttributesForRelationship(e){return await this.getAttributesForRelationshipUseCase.execute(e)}};t.RelationshipsFacade=c,t.RelationshipsFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),s(5,o.Inject),s(6,o.Inject),s(7,o.Inject),n("design:paramtypes",[a.GetRelationshipsUseCase,a.GetRelationshipUseCase,a.GetRelationshipByAddressUseCase,a.CreateRelationshipUseCase,a.AcceptRelationshipChangeUseCase,a.RejectRelationshipChangeUseCase,a.RevokeRelationshipChangeUseCase,a.GetAttributesForRelationshipUseCase])],c)},5392:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TokensFacade=void 0;const o=r(7071),a=r(485);let c=class TokensFacade{constructor(e,t,r,i,n){this.createOwnTokenUseCase=e,this.loadPeerTokenUseCase=t,this.getTokensUseCase=r,this.getTokenUseCase=i,this.getQRCodeForTokenUseCase=n}async createOwnToken(e){return await this.createOwnTokenUseCase.execute(e)}async loadPeerToken(e){return await this.loadPeerTokenUseCase.execute(e)}async getTokens(e){return await this.getTokensUseCase.execute(e)}async getToken(e){return await this.getTokenUseCase.execute(e)}async getQRCodeForToken(e){return await this.getQRCodeForTokenUseCase.execute(e)}};t.TokensFacade=c,t.TokensFacade=c=i([s(0,o.Inject),s(1,o.Inject),s(2,o.Inject),s(3,o.Inject),s(4,o.Inject),n("design:paramtypes",[a.CreateOwnTokenUseCase,a.LoadPeerTokenUseCase,a.GetTokensUseCase,a.GetTokenUseCase,a.GetQRCodeForTokenUseCase])],c)},9728:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(941),t),n(r(4213),t),n(r(7974),t),n(r(360),t),n(r(1106),t),n(r(1532),t),n(r(8586),t),n(r(7349),t),n(r(5392),t)},5200:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7371),t),n(r(4629),t),n(r(2432),t),n(r(5372),t),n(r(4164),t)},2432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeModule=void 0;t.RuntimeModule=class RuntimeModule{constructor(e,t,r){this.runtime=e,this.configuration=t,this.logger=r,this.subscriptionIds=[]}get name(){return this.configuration.name}get displayName(){return this.configuration.displayName}subscribeToEvent(e,t){const r=this.runtime.eventBus.subscribe(e,t);this.subscriptionIds.push(r)}unsubscribeFromAllEvents(){this.subscriptionIds.forEach((e=>this.runtime.eventBus.unsubscribe(e))),this.subscriptionIds.splice(0)}}},5372:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModulesIterator=t.RuntimeModuleRegistry=void 0;class RuntimeModuleRegistry{constructor(){this.modules=[]}getByName(e){return this.modules.find((t=>t.name.toLowerCase()===e.toLowerCase()))}add(e){this.modules.push(e)}toArray(){return this.modules.slice()}[Symbol.iterator](){return new ModulesIterator(this.modules)}}t.RuntimeModuleRegistry=RuntimeModuleRegistry;class ModulesIterator{constructor(e){this.items=e,this.currentIndex=0}next(e){return{value:this.items[this.currentIndex++],done:this.currentIndex>this.items.length}}}t.ModulesIterator=ModulesIterator},5590:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2500),t),n(r(4086),t),n(r(2205),t),n(r(5200),t),n(r(9662),t),n(r(6984),t),n(r(9757),t),n(r(986),t),n(r(3377),t),n(r(485),t)},8518:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerModule=void 0;const i=r(5030),n=r(2205),s=r(5200);class AttributeListenerModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.AttributeCreatedEvent,this.handleAttributeCreated.bind(this))}async handleAttributeCreated(e){const t=await this.runtime.getServices(e.eventTargetAddress),r=e.data;if("IdentityAttribute"===r.content["@type"]&&r.shareInfo)return;if("RelationshipAttribute"===r.content["@type"]&&r.content.confidentiality===i.RelationshipAttributeConfidentiality.Private)return;const n=await t.consumptionServices.attributeListeners.getAttributeListeners();if(n.isError)return void this.logger.error("Could not get attribute listeners",n.error);const s=n.value.map((r=>this.createRequestIfAttributeMatchesQuery(t,r,e.data,e.eventTargetAddress)));await Promise.all(s)}async createRequestIfAttributeMatchesQuery(e,t,r,i){if(!await this.doesAttributeMatchQuery(e,t,r))return;const s={"@type":"ShareAttributeRequestItem",attribute:r.content,sourceAttributeId:r.id,mustBeAccepted:!0,metadata:{attributeListenerId:t.id}},o=await e.consumptionServices.outgoingRequests.canCreate({content:{items:[s]},peer:t.peer});if(!o.value.isSuccess)return void this.logger.error("Could not validate outgoing request",o.value);const a=await e.consumptionServices.outgoingRequests.create({content:{items:[s]},peer:t.peer});a.isError?this.logger.error("Could not create request",a.error):this.runtime.eventBus.publish(new n.AttributeListenerTriggeredEvent(i,{attributeListener:t,attribute:r,request:a.value}))}async doesAttributeMatchQuery(e,t,r){const i=t.query;switch(i["@type"]){case"IdentityAttributeQuery":{if("IdentityAttribute"!==r.content["@type"])return!1;const t=await e.consumptionServices.attributes.executeIdentityAttributeQuery({query:i});return t.isError?(this.logger.error("Could not execute IdentityAttributeQuery",t.error),!1):!!t.value.find((e=>e.id===r.id))}case"ThirdPartyRelationshipAttributeQuery":{if("RelationshipAttribute"!==r.content["@type"])return!1;const t=await e.consumptionServices.attributes.executeThirdPartyRelationshipAttributeQuery({query:i});return t.isError?(this.logger.error("Could not execute ThirdPartyRelationshipAttributeQuery",t.error),!1):t.value.some((e=>e.id===r.id))}}}stop(){this.unsubscribeFromAllEvents()}}t.AttributeListenerModule=AttributeListenerModule},4777:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeciderModule=void 0;const i=r(3850),n=r(2205),s=r(5200);class DeciderModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.IncomingRequestStatusChangedEvent,this.handleIncomingRequestStatusChanged.bind(this))}async handleIncomingRequestStatusChanged(e){if(e.data.newStatus===i.LocalRequestStatus.DecisionRequired)return e.data.request.content.items.some(flaggedAsManualDecisionRequired),await this.requireManualDecision(e)}async requireManualDecision(e){const t=e.data.request,r=await this.runtime.getServices(e.eventTargetAddress),i=await r.consumptionServices.incomingRequests.requireManualDecision({requestId:t.id});if(i.isError)return this.logger.error(`Could not require manual decision for request ${t.id}`,i.error),void await this.publishEvent(e,r,"Error");await this.publishEvent(e,r,"ManualRequestDecisionRequired",t.id)}async publishEvent(e,t,r,i){const s=e.data.request;switch(s.source.type){case"RelationshipTemplate":const o=(await t.transportServices.relationshipTemplates.getRelationshipTemplate({id:s.source.reference})).value;if("NoRequest"!==r&&"Error"!==r||this.runtime.eventBus.publish(new n.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:o,result:r})),"ManualRequestDecisionRequired"===r){if(!i)throw new Error("Request ID is required for manual decision required result.");this.runtime.eventBus.publish(new n.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:o,result:r,requestId:i}))}break;case"Message":const a=await t.transportServices.messages.getMessage({id:s.source.reference}),c={...a.value,attachments:a.value.attachments.map((e=>e.id))};this.runtime.eventBus.publish(new n.MessageProcessedEvent(e.eventTargetAddress,c,r))}}stop(){this.unsubscribeFromAllEvents()}}function flaggedAsManualDecisionRequired(e){return e.requireManualDecision??e.items?.some((e=>e.requireManualDecision))}t.DeciderModule=DeciderModule},6432:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageModule=void 0;const i=r(5030),n=r(2205),s=r(2432);class MessageModule extends s.RuntimeModule{init(){}start(){this.subscribeToEvent(n.MessageReceivedEvent,this.handleMessageReceived.bind(this))}async handleMessageReceived(e){const t=e.data;this.logger.trace(`Incoming MessageReceivedEvent for ${t.id}`);let r;if("Mail"!==t.content["@type"])return;{const s=i.Mail.from(t.content);r=new n.MailReceivedEvent(e.eventTargetAddress,s,t),this.runtime.eventBus.publish(r),this.logger.trace(`Published MailReceivedEvent for ${t.id}`)}const s=await this.runtime.getServices(e.eventTargetAddress),o=await s.transportServices.relationships.getRelationshipByAddress({address:t.createdBy});if(!o.isSuccess)return void this.logger.error(`Could not find relationship for address '${t.createdBy}'.`,o.error);const a=o.value;this.runtime.eventBus.publish(new n.RelationshipEvent(e.eventTargetAddress,r,a)),this.logger.trace(`Published RelationshipEvent for ${t.id} to ${a.id}`)}stop(){this.unsubscribeFromAllEvents()}}t.MessageModule=MessageModule},7570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestModule=void 0;const i=r(3850),n=r(5030),s=r(2205),o=r(1908),a=r(2432),c=r(3377);class RequestModule extends a.RuntimeModule{init(){}start(){this.subscribeToEvent(s.PeerRelationshipTemplateLoadedEvent,this.handlePeerRelationshipTemplateLoaded.bind(this)),this.subscribeToEvent(s.MessageReceivedEvent,this.handleMessageReceivedEvent.bind(this)),this.subscribeToEvent(s.MessageSentEvent,this.handleMessageSentEvent.bind(this)),this.subscribeToEvent(s.IncomingRequestStatusChangedEvent,this.handleIncomingRequestStatusChanged.bind(this)),this.subscribeToEvent(s.RelationshipChangedEvent,this.handleRelationshipChangedEvent.bind(this))}async handlePeerRelationshipTemplateLoaded(e){const t=e.data;if("RelationshipTemplateContent"!==t.content["@type"])return void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.NoRequest}));const r=t.content,n=await this.runtime.getServices(e.eventTargetAddress),s=(await n.consumptionServices.incomingRequests.getRequests({query:{"source.reference":t.id}})).value.filter((e=>e.status!==i.LocalRequestStatus.Completed));if(0!==s.length)return this.logger.info(`There is already an open Request for the RelationshipTemplate '${t.id}'.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.NonCompletedRequestExists,requestId:s[0].id}));const a=(await n.transportServices.relationships.getRelationships({query:{peer:t.createdBy}})).value,u=a.filter((e=>e.status===c.RelationshipStatus.Pending));if(0!==u.length)return this.logger.info(`There is already a pending Relationship for the RelationshipTemplate '${t.id}'. Skipping creation of a new request.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.RelationshipExists,relationshipId:u[0].id}));const p=a.filter((e=>e.status===c.RelationshipStatus.Active));if(0!==p.length){if(r.onExistingRelationship){return void(await this.createIncomingRequest(n,r.onExistingRelationship,t.id)||this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.Error})))}return this.logger.info(`There is already an open Relationship for the RelationshipTemplate '${t.id}' and onExistingRelationship is not defined. Skipping creation of a new request.`),void this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.RelationshipExists,relationshipId:p[0].id}))}await this.createIncomingRequest(n,r.onNewRelationship,t.id)||this.runtime.eventBus.publish(new o.RelationshipTemplateProcessedEvent(e.eventTargetAddress,{template:t,result:o.RelationshipTemplateProcessedResult.Error}))}async handleMessageReceivedEvent(e){const t=await this.runtime.getServices(e.eventTargetAddress),r=e.data,i=r.content["@type"];switch(i){case"Request":await this.createIncomingRequest(t,r.content,r.id);break;case"Response":await this.completeExistingRequestWithResponseReceivedByMessage(t,r.id,r.content);break;case"ResponseWrapper":const e=r.content;if("Message"===e.requestSourceType){await this.completeExistingRequestWithResponseReceivedByMessage(t,r.id,e.response);break}await t.consumptionServices.outgoingRequests.createAndCompleteFromRelationshipTemplateResponse({responseSourceId:r.id,templateId:e.requestSourceReference,response:e.response})}"Request"!==i&&this.runtime.eventBus.publish(new s.MessageProcessedEvent(e.eventTargetAddress,r,s.MessageProcessedResult.NoRequest))}async completeExistingRequestWithResponseReceivedByMessage(e,t,r){const i=await e.consumptionServices.outgoingRequests.complete({receivedResponse:r,messageId:t});i.isError&&this.logger.error(`Could not complete outgoing request for message id ${t} due to ${i.error}. Root error:`,i.error)}async handleMessageSentEvent(e){const t=e.data;if("Request"!==t.content["@type"])return;const r=await this.runtime.getServices(e.eventTargetAddress),i=t.content,n=await r.consumptionServices.outgoingRequests.sent({requestId:i.id,messageId:t.id});n.isError&&this.logger.error(`Could not mark request '${i.id}' as sent using message '${t.id}'. Root error:`,n.error)}async createIncomingRequest(e,t,r){const i=await e.consumptionServices.incomingRequests.received({receivedRequest:t,requestSourceId:r});if(i.isError)return this.logger.error(`Could not receive request ${t.id}. Root error:`,i.error),!1;const n=await e.consumptionServices.incomingRequests.checkPrerequisites({requestId:i.value.id});return!n.isError||(this.logger.error(`Could not check prerequisites for request ${t.id}. Root error:`,n.error),!1)}async handleIncomingRequestStatusChanged(e){if(e.data.newStatus!==i.LocalRequestStatus.Decided)return;const t=e.data.request;switch(t.source.type){case"RelationshipTemplate":await this.handleIncomingRequestDecidedForRelationshipTemplate(e);break;case"Message":await this.handleIncomingRequestDecidedForMessage(e);break;default:throw new Error(`Cannot handle source.type '${t.source.type}'.`)}}async handleIncomingRequestDecidedForRelationshipTemplate(e){const t=e.data.request,r=await this.runtime.getServices(e.eventTargetAddress);0===(await r.transportServices.relationships.getRelationships({query:{peer:e.data.request.peer,status:c.RelationshipStatus.Active}})).value.length?await this.respondToRequestViaRelationship(t,e.eventTargetAddress):await this.respondToRequestViaMessage(t,e.eventTargetAddress)}async respondToRequestViaRelationship(e,t){const r=await this.runtime.getServices(t),i=e.source.reference;if(e.response.content.result===n.ResponseResult.Rejected)return void await r.consumptionServices.incomingRequests.complete({requestId:e.id});const s=n.RelationshipCreationChangeRequestContent.from({response:e.response.content}),o=await r.transportServices.relationships.createRelationship({templateId:i,content:s});if(o.isError)return void this.logger.error(`Could not create relationship for templateId '${i}'. Root error:`,o.error);const a=e.id,c=await r.consumptionServices.incomingRequests.complete({requestId:a,responseSourceId:o.value.changes[0].id});c.isError&&this.logger.error(`Could not complete the request '${a}'. Root error:`,c.error)}async respondToRequestViaMessage(e,t){const r=e.id,i=await this.runtime.getServices(t),s=n.ResponseWrapper.from({response:e.response.content,requestId:r,requestSourceReference:e.source.reference,requestSourceType:e.source.type}).toJSON(),o=await i.transportServices.messages.sendMessage({recipients:[e.peer],content:s});if(o.isError)return void this.logger.error(`Could not send message to answer the request '${r}'.`,o.error);const a=await i.consumptionServices.incomingRequests.complete({requestId:r,responseSourceId:o.value.id});a.isError&&this.logger.error(`Could not complete the request '${r}'. Root error:`,a.error)}async handleIncomingRequestDecidedForMessage(e){await this.respondToRequestViaMessage(e.data.request,e.eventTargetAddress)}async handleRelationshipChangedEvent(e){const t=e.data;if(t.status!==c.RelationshipStatus.Pending||!t.template.isOwn)return;const r=await this.runtime.getServices(e.eventTargetAddress),i=t.template,n=i.id;if("RelationshipTemplateContent"!==i.content["@type"])return;const s=t.changes[0],o=s.id;if("RelationshipCreationChangeRequestContent"!==s.request.content["@type"])return;const a=s.request.content,u=await r.consumptionServices.outgoingRequests.createAndCompleteFromRelationshipTemplateResponse({templateId:n,responseSourceId:o,response:a.response});u.isError&&this.logger.error(`Could not create and complete request for templateId '${n}' and changeId '${o}'. Root error:`,u.error)}stop(){this.unsubscribeFromAllEvents()}}t.RequestModule=RequestModule},9662:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8518),t),n(r(4777),t),n(r(6432),t),n(r(7570),t)},5953:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5292:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2693:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7118:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9371:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7564:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7946:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5292),t),n(r(2693),t),n(r(7118),t),n(r(8678),t),n(r(9371),t),n(r(7564),t)},3377:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7946),t),n(r(5953),t),n(r(450),t)},3456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7891:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3462:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6261:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},641:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2944:(e,t)=>{"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipChangeType=t.RelationshipChangeStatus=void 0,function(e){e.Pending="Pending",e.Rejected="Rejected",e.Revoked="Revoked",e.Accepted="Accepted"}(r||(t.RelationshipChangeStatus=r={})),function(e){e.Creation="Creation",e.Termination="Termination",e.TerminationCancellation="TerminationCancellation"}(i||(t.RelationshipChangeType=i={}))},2220:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipStatus=void 0,function(e){e.Pending="Pending",e.Active="Active",e.Rejected="Rejected",e.Revoked="Revoked",e.Terminating="Terminating",e.Terminated="Terminated"}(r||(t.RelationshipStatus=r={}))},6081:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},450:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3456),t),n(r(7891),t),n(r(9475),t),n(r(3462),t),n(r(6261),t),n(r(6623),t),n(r(641),t),n(r(5968),t),n(r(2944),t),n(r(2220),t),n(r(6081),t),n(r(4561),t)},9365:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7771),t)},807:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenAnonymousByIdAndKeyUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(7121);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenAnonymousByIdAndKeyRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class LoadPeerTokenAnonymousByIdAndKeyUseCase extends p.UseCase{constructor(e,t){super(t),this.anonymousTokenController=e}async executeInternal(e){const t=a.CryptoSecretKey.fromBase64(e.secretKey),r=await this.anonymousTokenController.loadPeerToken(c.CoreId.from(e.id),t);return o.Result.ok(l.TokenMapper.toTokenDTO(r,!0))}};t.LoadPeerTokenAnonymousByIdAndKeyUseCase=f,t.LoadPeerTokenAnonymousByIdAndKeyUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[c.AnonymousTokenController,d])],f)},6297:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenAnonymousByTruncatedReferenceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class LoadPeerTokenAnonymousByTruncatedReferenceUseCase extends u.UseCase{constructor(e,t){super(t),this.anonymousTokenController=e}async executeInternal(e){const t=await this.anonymousTokenController.loadPeerTokenByTruncated(e.reference);return o.Result.ok(p.TokenMapper.toTokenDTO(t,!0))}};t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=d,t.LoadPeerTokenAnonymousByTruncatedReferenceUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.AnonymousTokenController,l])],d)},7771:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(807),t),n(r(6297),t)},2627:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Base64ForIdPrefix=void 0,function(e){e.RelationshipTemplate="UkxU",e.Token="VE9L",e.File="RklM"}(r||(t.Base64ForIdPrefix=r={}))},6819:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.OwnerRestriction=void 0,function(e){e.Own="o",e.Peer="p"}(r||(t.OwnerRestriction=r={}))},8728:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformErrorCodes=void 0;class PlatformErrorCodes{static isNotFoundError(e){return e.code===PlatformErrorCodes.NOT_FOUND}static isValidationError(e){return e.code.startsWith("error.platform.validation")}static isUnexpectedError(e){return e.code.startsWith("error.platform.validation")}}t.PlatformErrorCodes=PlatformErrorCodes,PlatformErrorCodes.NOT_FOUND="error.platform.recordNotFound",PlatformErrorCodes.UNAUTHORIZED="error.platform.unauthorized",PlatformErrorCodes.FORBIDDEN="error.platform.forbidden",PlatformErrorCodes.INVALID_PROPERTY_VALUE="error.platform.invalidPropertyValue",PlatformErrorCodes.UNEXPECTED="error.platform.unexpected"},3832:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.QRCode=void 0;const o=s(r(2592));class QRCode{constructor(e){this.base64=e}asBase64(){return this.base64}static async from(e,t){const r=(await o.toDataURL(`nmshd://${t}#${e}`)).split(",")[1];return new QRCode(r)}static async forTruncateable(e){return await this.from(e.truncate(),"tr")}}t.QRCode=QRCode},6595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeErrors=void 0;const i=r(5172),n=r(2627);class RuntimeErrors{}t.RuntimeErrors=RuntimeErrors,RuntimeErrors.general=new class General{unknown(e,t){return new i.ApplicationError("error.runtime.unknown",e,t)}alreadyInitialized(){return new i.ApplicationError("error.runtime.alreadyInitialized","The runtime is already initialized. The init method can only be executed once.")}notInitialized(){return new i.ApplicationError("error.runtime.notInitialized","The runtime is not initialized. You must run init before you can start or stop the runtime.")}alreadyStarted(){return new i.ApplicationError("error.runtime.alreadyStarted","The runtime is already started. You should stop it first for a restart.")}notStarted(){return new i.ApplicationError("error.runtime.notStarted","The runtime is not started. You can only stop the runtime if you executed start before.")}recordNotFound(e){return this.recordNotFoundWithMessage(`${e instanceof Function?e.name:e} not found. Make sure the ID exists and the record is not expired.`)}recordNotFoundWithMessage(e){return new i.ApplicationError("error.runtime.recordNotFound",e)}invalidPropertyValue(e){return new i.ApplicationError("error.runtime.validation.invalidPropertyValue",e)}invalidPayload(e){return new i.ApplicationError("error.runtime.validation.invalidPayload",e??"The given combination of properties in the payload is not supported.")}notSupported(e){return new i.ApplicationError("error.runtime.notSupported",e)}invalidTokenContent(){return new i.ApplicationError("error.runtime.invalidTokenContent","The given token has an invalid content for this route.")}cacheEmpty(e,t){return new i.ApplicationError("error.runtime.cacheEmpty",`The cache of ${e instanceof Function?e.name:e} with id '${t}' is empty.`)}},RuntimeErrors.serval=new class Serval{unknownType(e){return new i.ApplicationError("error.runtime.unknownType",e)}general(e){return new i.ApplicationError("error.runtime.servalError",e)}requestDeserialization(e){return new i.ApplicationError("error.runtime.requestDeserialization",e)}},RuntimeErrors.startup=new class Startup{noActiveAccount(){return new i.ApplicationError("error.runtime.startup.noActiveAccount","No AccountController could be found. You might have to login first.")}noActiveConsumptionController(){return new i.ApplicationError("error.runtime.startup.noActiveConsumptionController","No ConsumptionController could be found. You might have to login first.")}noActiveExpander(){return new i.ApplicationError("error.runtime.startup.noActiveExpander","No DataViewExpander could be found. You might have to login first.")}},RuntimeErrors.files=new class Files{invalidReference(e){return new i.ApplicationError("error.runtime.files.invalidReference",`The given reference '${e}' is not valid. The reference for a file must start with '${n.Base64ForIdPrefix.Token}' or '${n.Base64ForIdPrefix.File}'.`)}},RuntimeErrors.relationshipTemplates=new class RelationshipTemplates{cannotCreateTokenForPeerTemplate(){return new i.ApplicationError("error.runtime.relationshipTemplates.cannotCreateTokenForPeerTemplate","You cannot create a token for a peer template.")}cannotCreateQRCodeForPeerTemplate(){return new i.ApplicationError("error.runtime.relationshipTemplates.cannotCreateQRCodeForPeerTemplate","You cannot create a QRCode for a peer template.")}invalidReference(e){return new i.ApplicationError("error.runtime.relationshipTemplates.invalidReference",`The given reference '${e}' is not valid. The reference for a relationship template must start with '${n.Base64ForIdPrefix.Token}' or '${n.Base64ForIdPrefix.RelationshipTemplate}'.`)}},RuntimeErrors.messages=new class Messages{fileNotFoundInMessage(e){return new i.ApplicationError("error.runtime.messages.fileNotFoundInMessage",`The requested file '${e}' was not found in the given message.`)}},RuntimeErrors.challenges=new class Challenges{invalidSignature(){return new i.ApplicationError("error.runtime.challenges.invalidSignature","The signature is invalid.")}invalidChallengeString(){return new i.ApplicationError("error.runtime.challenges.invalidChallenge","The challengeString is invalid.")}}},2746:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return n(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonSchema=t.SchemaRepository=void 0;const a=o(r(1581)),c=o(r(3351)),u=o(r(5477));t.SchemaRepository=class SchemaRepository{constructor(){this.jsonSchemas=new Map,this.compiler=new a.default({allErrors:!0,allowUnionTypes:!0}),(0,u.default)(this.compiler),(0,c.default)(this.compiler)}async loadSchemas(){this.schemaDefinitions=await Promise.resolve().then((()=>s(r(1873))))}getSchema(e){return this.jsonSchemas.has(e)||this.jsonSchemas.set(e,new JsonSchema(this.getValidationFunction(e))),this.jsonSchemas.get(e)}getValidationFunction(e){return this.compiler.compile(this.getSchemaDefinition(e))}getSchemaDefinition(e){const t=this.schemaDefinitions[e];if(!t)throw new Error(`Schema ${e} not found`);return t}};class JsonSchema{constructor(e){this.validateSchema=e}validate(e){return{isValid:this.validateSchema(e),errors:this.validateSchema.errors?[...this.validateSchema.errors]:void 0}}}t.JsonSchema=JsonSchema},1873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadAttachmentRequest=t.SyncDatawalletRequest=t.RegisterPushNotificationTokenRequest=t.LoadItemFromTruncatedReferenceRequest=t.DownloadFileRequest=t.UpdateSettingRequest=t.GetSettingsRequest=t.GetSettingByKeyRequest=t.GetSettingRequest=t.DeleteSettingRequest=t.CreateSettingRequest=t.UpdateDraftRequest=t.GetDraftsRequest=t.GetDraftRequest=t.DeleteDraftRequest=t.CreateDraftRequest=t.ValidateIQLQueryRequest=t.UpdateAttributeRequest=t.SucceedAttributeRequest=t.ShareAttributeRequest=t.SentOutgoingRequestRequest=t.RequireManualDecisionOfIncomingRequestRequest=t.ReceivedIncomingRequestRequest=t.GetOutgoingRequestsRequest=t.GetOutgoingRequestRequest=t.GetIncomingRequestsRequest=t.GetIncomingRequestRequest=t.DiscardOutgoingRequestRequest=t.CreateOutgoingRequestRequest=t.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseRequest=t.CompleteOutgoingRequestRequest=t.CompleteIncomingRequestRequest=t.CheckPrerequisitesOfIncomingRequestRequest=t.RejectIncomingRequestRequest=t.CanCreateOutgoingRequestRequest=t.AcceptIncomingRequestRequest=t.GetSharedToPeerAttributesRequest=t.GetPeerAttributesRequest=t.GetAttributesRequest=t.GetAttributeRequest=t.ExecuteThirdPartyRelationshipAttributeQueryRequest=t.ExecuteRelationshipAttributeQueryRequest=t.ExecuteIQLQueryRequest=t.ExecuteIdentityAttributeQueryRequest=t.DeleteAttributeRequest=t.CreateSharedAttributeCopyRequest=t.CreateAttributeRequest=t.GetAttributeListenerRequest=t.LoadPeerTokenAnonymousByTruncatedReferenceRequest=t.LoadPeerTokenAnonymousByIdAndKeyRequest=void 0,t.LoadPeerTokenViaSecretRequest=t.LoadPeerTokenViaReferenceRequest=t.GetTokensRequest=t.GetTokenRequest=t.GetQRCodeForTokenRequest=t.CreateOwnTokenRequest=t.LoadPeerRelationshipTemplateRequest=t.LoadPeerRelationshipTemplateViaReferenceRequest=t.LoadPeerRelationshipTemplateViaSecretRequest=t.GetRelationshipTemplatesRequest=t.GetRelationshipTemplateRequest=t.CreateTokenQrCodeForOwnTemplateRequest=t.CreateTokenForOwnTemplateRequest=t.CreateQrCodeForOwnTemplateRequest=t.CreateOwnRelationshipTemplateRequest=t.RevokeRelationshipChangeRequest=t.RejectRelationshipChangeRequest=t.GetRelationshipsRequest=t.GetRelationshipByAddressRequest=t.GetRelationshipRequest=t.GetAttributesForRelationshipRequest=t.CreateRelationshipRequest=t.AcceptRelationshipChangeRequest=t.SendMessageRequest=t.GetMessagesRequest=t.GetMessageRequest=t.GetAttachmentMetadataRequest=t.CheckIdentityRequest=t.UploadOwnFileValidatableRequest=t.UploadOwnFileRequest=t.GetOrLoadFileRequest=t.GetOrLoadFileViaReferenceRequest=t.GetOrLoadFileViaSecretRequest=t.GetFilesRequest=t.GetFileRequest=t.CreateTokenQrCodeForFileRequest=t.CreateTokenForFileRequest=t.CreateQrCodeForFileRequest=t.UpdateDeviceRequest=t.GetDeviceOnboardingInfoRequest=t.GetDeviceRequest=t.DeleteDeviceRequest=t.CreateDeviceOnboardingTokenRequest=t.CreateDeviceRequest=t.ValidateChallengeRequest=t.CreateChallengeRequest=t.CreateDeviceChallengeRequest=t.CreateIdentityChallengeRequest=t.CreateRelationshipChallengeRequest=t.SyncEverythingRequest=void 0,t.LoadPeerTokenRequest=void 0,t.LoadPeerTokenAnonymousByIdAndKeyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByIdAndKeyRequest",definitions:{LoadPeerTokenAnonymousByIdAndKeyRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string"}},required:["id","secretKey"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.LoadPeerTokenAnonymousByTruncatedReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenAnonymousByTruncatedReferenceRequest",definitions:{LoadPeerTokenAnonymousByTruncatedReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"}},required:["reference"],additionalProperties:!1},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"}}},t.GetAttributeListenerRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeListenerRequest",definitions:{GetAttributeListenerRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeListenerIdString"}},required:["id"],additionalProperties:!1},AttributeListenerIdString:{type:"string",pattern:"ATL[A-Za-z0-9]{17}"}}},t.CreateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateAttributeRequest",definitions:{CreateAttributeRequest:{type:"object",properties:{content:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["content"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]}}},t.CreateSharedAttributeCopyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSharedAttributeCopyRequest",definitions:{CreateSharedAttributeCopyRequest:{type:"object",properties:{attributeId:{$ref:"#/definitions/AttributeIdString"},peer:{$ref:"#/definitions/AddressString"},requestReference:{$ref:"#/definitions/RequestIdString"}},required:["attributeId","peer","requestReference"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.DeleteAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteAttributeRequest",definitions:{DeleteAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"}},required:["id"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.ExecuteIdentityAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteIdentityAttributeQueryRequest",definitions:{ExecuteIdentityAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IIdentityAttributeQuery"},{$ref:"#/definitions/IdentityAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IIdentityAttributeQuery:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","valueType"],additionalProperties:!1}}},t.ExecuteIQLQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteIQLQueryRequest",definitions:{ExecuteIQLQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IIQLQuery"},{$ref:"#/definitions/IQLQueryJSON"}]}},required:["query"],additionalProperties:!1},IIQLQuery:{type:"object",properties:{queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IIQLQueryCreationHints"}},required:["queryString"],additionalProperties:!1},IIQLQueryCreationHints:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},IQLQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IQLQuery"},"@context":{type:"string"},"@version":{type:"string"},queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IQLQueryCreationHintsJSON"}},required:["@type","queryString"],additionalProperties:!1},IQLQueryCreationHintsJSON:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1}}},t.ExecuteRelationshipAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteRelationshipAttributeQueryRequest",definitions:{ExecuteRelationshipAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IRelationshipAttributeQuery"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IRelationshipAttributeQuery:{type:"object",properties:{key:{type:"string"},owner:{$ref:"#/definitions/ICoreAddress"},attributeCreationHints:{$ref:"#/definitions/IRelationshipAttributeCreationHints"},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["key","owner","attributeCreationHints"],additionalProperties:!1},ICoreAddress:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1},IRelationshipAttributeCreationHints:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/IValueHints"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","ProprietaryXML","Consent"]},IValueHints:{type:"object",properties:{editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/IValueHintsValue"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/IValueHints"}}},additionalProperties:!1},IValueHintsValue:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1}}},t.ExecuteThirdPartyRelationshipAttributeQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ExecuteThirdPartyRelationshipAttributeQueryRequest",definitions:{ExecuteThirdPartyRelationshipAttributeQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IThirdPartyRelationshipAttributeQuery"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["query"],additionalProperties:!1},IThirdPartyRelationshipAttributeQuery:{type:"object",properties:{key:{type:"string"},owner:{$ref:"#/definitions/ICoreAddress"},thirdParty:{type:"array",items:{$ref:"#/definitions/ICoreAddress"}},validFrom:{$ref:"#/definitions/ICoreDate"},validTo:{$ref:"#/definitions/ICoreDate"}},required:["key","owner","thirdParty"],additionalProperties:!1},ICoreAddress:{type:"object",properties:{address:{type:"string"}},required:["address"],additionalProperties:!1},ICoreDate:{type:"object",properties:{date:{type:"string"}},required:["date"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1}}},t.GetAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributeRequest",definitions:{GetAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"}},required:["id"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.GetAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesRequest",definitions:{GetAttributesRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetAttributesRequestQuery"},onlyValid:{type:"boolean"},hideTechnical:{type:"boolean"}},additionalProperties:!1},GetAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},parentId:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.owner":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeeds:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeededBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.peer":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.sourceAttribute":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetPeerAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetPeerAttributesRequest",definitions:{GetPeerAttributesRequest:{type:"object",properties:{peer:{type:"string"},onlyValid:{type:"boolean"},query:{$ref:"#/definitions/GetPeerAttributesRequestQuery"},hideTechnical:{type:"boolean"}},required:["peer"],additionalProperties:!1},GetPeerAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetSharedToPeerAttributesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSharedToPeerAttributesRequest",definitions:{GetSharedToPeerAttributesRequest:{type:"object",properties:{peer:{type:"string"},onlyValid:{type:"boolean"},query:{$ref:"#/definitions/GetSharedToPeerAttributesRequestQuery"},hideTechnical:{type:"boolean"}},required:["peer"],additionalProperties:!1},GetSharedToPeerAttributesRequestQuery:{type:"object",properties:{createdAt:{type:"string"},"content.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.tags":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validFrom":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.validTo":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.key":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.isTechnical":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.confidentiality":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.value.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},shareInfo:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.requestReference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"shareInfo.sourceAttribute":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.AcceptIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/AcceptIncomingRequestRequest",definitions:{AcceptIncomingRequestRequest:{type:"object",additionalProperties:!1,properties:{requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/DecideRequestItemParametersJSON"},{$ref:"#/definitions/DecideRequestItemGroupParametersJSON"}]}}},required:["items","requestId"]},DecideRequestItemParametersJSON:{anyOf:[{$ref:"#/definitions/AcceptRequestItemParametersJSON"},{$ref:"#/definitions/RejectRequestItemParametersJSON"}]},AcceptRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!0}},required:["accept"],additionalProperties:!1},RejectRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!1},code:{type:"string"},message:{type:"string"}},required:["accept"],additionalProperties:!1},DecideRequestItemGroupParametersJSON:{type:"object",properties:{items:{type:"array",items:{$ref:"#/definitions/DecideRequestItemParametersJSON"}}},required:["items"],additionalProperties:!1}}},t.CanCreateOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CanCreateOutgoingRequestRequest",definitions:{CanCreateOutgoingRequestRequest:{type:"object",properties:{content:{type:"object",properties:{expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."},"@context":{type:"string"}},required:["items"],additionalProperties:!1},peer:{$ref:"#/definitions/AddressString"}},required:["content"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/FreeTextRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","ProprietaryXML","Consent"]},IQLQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IQLQuery"},"@context":{type:"string"},"@version":{type:"string"},queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IQLQueryCreationHintsJSON"}},required:["@type","queryString"],additionalProperties:!1},IQLQueryCreationHintsJSON:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},FreeTextRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"FreeTextRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},freeText:{type:"string"}},required:["@type","freeText","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.RejectIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RejectIncomingRequestRequest",definitions:{RejectIncomingRequestRequest:{type:"object",additionalProperties:!1,properties:{requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/DecideRequestItemParametersJSON"},{$ref:"#/definitions/DecideRequestItemGroupParametersJSON"}]}}},required:["items","requestId"]},DecideRequestItemParametersJSON:{anyOf:[{$ref:"#/definitions/AcceptRequestItemParametersJSON"},{$ref:"#/definitions/RejectRequestItemParametersJSON"}]},AcceptRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!0}},required:["accept"],additionalProperties:!1},RejectRequestItemParametersJSON:{type:"object",properties:{accept:{type:"boolean",const:!1},code:{type:"string"},message:{type:"string"}},required:["accept"],additionalProperties:!1},DecideRequestItemGroupParametersJSON:{type:"object",properties:{items:{type:"array",items:{$ref:"#/definitions/DecideRequestItemParametersJSON"}}},required:["items"],additionalProperties:!1}}},t.CheckPrerequisitesOfIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CheckPrerequisitesOfIncomingRequestRequest",definitions:{CheckPrerequisitesOfIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.CompleteIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CompleteIncomingRequestRequest",definitions:{CompleteIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"},responseSourceId:{anyOf:[{$ref:"#/definitions/MessageIdString"},{$ref:"#/definitions/RelationshipChangeIdString"}]}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CompleteOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CompleteOutgoingRequestRequest",definitions:{CompleteOutgoingRequestRequest:{type:"object",properties:{receivedResponse:{$ref:"#/definitions/ResponseJSON"},messageId:{$ref:"#/definitions/MessageIdString"}},required:["receivedResponse","messageId"],additionalProperties:!1},ResponseJSON:{type:"object",properties:{"@type":{type:"string",const:"Response"},"@context":{type:"string"},"@version":{type:"string"},result:{$ref:"#/definitions/ResponseResult"},requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/ResponseItemGroupJSON"},{$ref:"#/definitions/ResponseItemJSONDerivations"}]}}},required:["@type","items","requestId","result"],additionalProperties:!1},ResponseResult:{type:"string",enum:["Accepted","Rejected"]},ResponseItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"ResponseItemGroup"},"@context":{type:"string"},"@version":{type:"string"},items:{type:"array",items:{$ref:"#/definitions/ResponseItemJSONDerivations"}}},required:["@type","items"],additionalProperties:!1},ResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSONDerivations"},{$ref:"#/definitions/RejectResponseItemJSONDerivations"},{$ref:"#/definitions/ErrorResponseItemJSONDerivations"}]},AcceptResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSON"},{$ref:"#/definitions/CreateAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ShareAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ProposeAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ReadAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerAcceptResponseItemJSON"},{$ref:"#/definitions/FreeTextAcceptResponseItemJSON"}]},AcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"}},required:["@type","result"],additionalProperties:!1},CreateAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ShareAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ProposeAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},ReadAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},RegisterAttributeListenerAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},listenerId:{type:"string"}},required:["@type","listenerId","result"],additionalProperties:!1},FreeTextAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"FreeTextAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},freeText:{type:"string"}},required:["@type","freeText","result"],additionalProperties:!1},RejectResponseItemJSONDerivations:{$ref:"#/definitions/RejectResponseItemJSON"},RejectResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RejectResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Rejected"},code:{type:"string"},message:{type:"string"}},required:["@type","result"],additionalProperties:!1},ErrorResponseItemJSONDerivations:{$ref:"#/definitions/ErrorResponseItemJSON"},ErrorResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ErrorResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Error"},code:{type:"string"},message:{type:"string"}},required:["@type","code","message","result"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseRequest",definitions:{CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},responseSourceId:{anyOf:[{$ref:"#/definitions/RelationshipChangeIdString"},{$ref:"#/definitions/MessageIdString"}]},response:{$ref:"#/definitions/ResponseJSON"}},required:["templateId","responseSourceId","response"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},ResponseJSON:{type:"object",properties:{"@type":{type:"string",const:"Response"},"@context":{type:"string"},"@version":{type:"string"},result:{$ref:"#/definitions/ResponseResult"},requestId:{type:"string"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/ResponseItemGroupJSON"},{$ref:"#/definitions/ResponseItemJSONDerivations"}]}}},required:["@type","items","requestId","result"],additionalProperties:!1},ResponseResult:{type:"string",enum:["Accepted","Rejected"]},ResponseItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"ResponseItemGroup"},"@context":{type:"string"},"@version":{type:"string"},items:{type:"array",items:{$ref:"#/definitions/ResponseItemJSONDerivations"}}},required:["@type","items"],additionalProperties:!1},ResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSONDerivations"},{$ref:"#/definitions/RejectResponseItemJSONDerivations"},{$ref:"#/definitions/ErrorResponseItemJSONDerivations"}]},AcceptResponseItemJSONDerivations:{anyOf:[{$ref:"#/definitions/AcceptResponseItemJSON"},{$ref:"#/definitions/CreateAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ShareAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ProposeAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/ReadAttributeAcceptResponseItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerAcceptResponseItemJSON"},{$ref:"#/definitions/FreeTextAcceptResponseItemJSON"}]},AcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"}},required:["@type","result"],additionalProperties:!1},CreateAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ShareAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"}},required:["@type","attributeId","result"],additionalProperties:!1},ProposeAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},ReadAttributeAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},attributeId:{type:"string"},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","attributeId","result"],additionalProperties:!1},RegisterAttributeListenerAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},listenerId:{type:"string"}},required:["@type","listenerId","result"],additionalProperties:!1},FreeTextAcceptResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"FreeTextAcceptResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Accepted"},freeText:{type:"string"}},required:["@type","freeText","result"],additionalProperties:!1},RejectResponseItemJSONDerivations:{$ref:"#/definitions/RejectResponseItemJSON"},RejectResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RejectResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Rejected"},code:{type:"string"},message:{type:"string"}},required:["@type","result"],additionalProperties:!1},ErrorResponseItemJSONDerivations:{$ref:"#/definitions/ErrorResponseItemJSON"},ErrorResponseItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ErrorResponseItem"},"@context":{type:"string"},"@version":{type:"string"},result:{type:"string",const:"Error"},code:{type:"string"},message:{type:"string"}},required:["@type","code","message","result"],additionalProperties:!1}}},t.CreateOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOutgoingRequestRequest",definitions:{CreateOutgoingRequestRequest:{type:"object",properties:{content:{type:"object",properties:{expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."},"@context":{type:"string"}},required:["items"],additionalProperties:!1},peer:{$ref:"#/definitions/AddressString"}},required:["content","peer"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/FreeTextRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","ProprietaryXML","Consent"]},IQLQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IQLQuery"},"@context":{type:"string"},"@version":{type:"string"},queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IQLQueryCreationHintsJSON"}},required:["@type","queryString"],additionalProperties:!1},IQLQueryCreationHintsJSON:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},FreeTextRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"FreeTextRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},freeText:{type:"string"}},required:["@type","freeText","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.DiscardOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DiscardOutgoingRequestRequest",definitions:{DiscardOutgoingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetIncomingRequestRequest",definitions:{GetIncomingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetIncomingRequestsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetIncomingRequestsRequest",definitions:{GetIncomingRequestsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetIncomingRequestsRequestQuery"}},additionalProperties:!1},GetIncomingRequestsRequestQuery:{type:"object",properties:{id:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.expiresAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.createdAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.result":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.GetOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOutgoingRequestRequest",definitions:{GetOutgoingRequestRequest:{type:"object",properties:{id:{$ref:"#/definitions/RequestIdString"}},required:["id"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.GetOutgoingRequestsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOutgoingRequestsRequest",definitions:{GetOutgoingRequestsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetOutgoingRequestsRequestQuery"}},additionalProperties:!1},GetOutgoingRequestsRequestQuery:{type:"object",properties:{id:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.expiresAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.createdAt":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.source.reference":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.result":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"response.content.items.items.@type":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.ReceivedIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ReceivedIncomingRequestRequest",definitions:{ReceivedIncomingRequestRequest:{type:"object",properties:{receivedRequest:{$ref:"#/definitions/RequestJSON"},requestSourceId:{anyOf:[{$ref:"#/definitions/MessageIdString"},{$ref:"#/definitions/RelationshipTemplateIdString"}]}},required:["receivedRequest","requestSourceId"],additionalProperties:!1},RequestJSON:{type:"object",properties:{"@type":{type:"string",const:"Request"},"@context":{type:"string"},"@version":{type:"string"},id:{type:"string"},expiresAt:{type:"string",description:"The point in time the request is considered obsolete either technically (e.g. the request is no longer valid or its response is no longer accepted) or from a business perspective (e.g. the request is no longer of interest).",default:"undefined - the request won't expire"},items:{type:"array",items:{anyOf:[{$ref:"#/definitions/RequestItemGroupJSON"},{$ref:"#/definitions/RequestItemJSONDerivations"}]},description:"The items of the Request. Can be either a single {@link RequestItemJSONDerivations RequestItem } or a {@link RequestItemGroupJSON RequestItemGroup } , which itself can contain further {@link RequestItemJSONDerivations RequestItems } ."},title:{type:"string",description:"The human-readable title of this Request."},description:{type:"string",description:"The human-readable description of this Request."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this request. The content of this property will be copied into the response on the side of the recipient."}},required:["@type","items"],additionalProperties:!1},RequestItemGroupJSON:{type:"object",properties:{"@type":{type:"string",const:"RequestItemGroup"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this group."},description:{type:"string",description:"The human-readable description of this group."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this group. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},items:{type:"array",items:{$ref:"#/definitions/RequestItemJSONDerivations"},description:"The items of this group."}},required:["@type","items","mustBeAccepted"],additionalProperties:!1,description:"A RequestItemGroup can be used to group one or more RequestItems. This is useful if you want to\n* make sure that the items in the group can only be accepted together\n\n Example: when sending a `CreateRelationshipAttributeRequestItem` **and** a `ShareAttributeRequestItem` in a single Request where the latter one targets an attribute created by the first one, it it should be impossible to reject the first item, while accepting the second one.\n* visually group items on the UI and give the a common title/description"},RequestItemJSONDerivations:{anyOf:[{$ref:"#/definitions/RequestItemJSON"},{$ref:"#/definitions/CreateAttributeRequestItemJSON"},{$ref:"#/definitions/ShareAttributeRequestItemJSON"},{$ref:"#/definitions/ProposeAttributeRequestItemJSON"},{$ref:"#/definitions/ReadAttributeRequestItemJSON"},{$ref:"#/definitions/ConsentRequestItemJSON"},{$ref:"#/definitions/AuthenticationRequestItemJSON"},{$ref:"#/definitions/FreeTextRequestItemJSON"},{$ref:"#/definitions/RegisterAttributeListenerRequestItemJSON"}]},RequestItemJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},CreateAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"CreateAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/RelationshipAttributeJSON"},{$ref:"#/definitions/IdentityAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ShareAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ShareAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},sourceAttributeId:{type:"string"}},required:["@type","attribute","mustBeAccepted","sourceAttributeId"],additionalProperties:!1},ProposeAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ProposeAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]},attribute:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["@type","attribute","mustBeAccepted","query"],additionalProperties:!1},IdentityAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},RelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},attributeCreationHints:{$ref:"#/definitions/RelationshipAttributeCreationHintsJSON"},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","attributeCreationHints","key","owner"],additionalProperties:!1},RelationshipAttributeCreationHintsJSON:{type:"object",properties:{title:{type:"string"},valueType:{$ref:"#/definitions/AttributeValues.Relationship.TypeName"},description:{type:"string"},valueHints:{$ref:"#/definitions/ValueHintsJSON"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["title","valueType","confidentiality"],additionalProperties:!1},"AttributeValues.Relationship.TypeName":{type:"string",enum:["ProprietaryBoolean","ProprietaryCountry","ProprietaryEMailAddress","ProprietaryFileReference","ProprietaryFloat","ProprietaryHEXColor","ProprietaryInteger","ProprietaryLanguage","ProprietaryPhoneNumber","ProprietaryString","ProprietaryURL","ProprietaryJSON","ProprietaryXML","Consent"]},IQLQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IQLQuery"},"@context":{type:"string"},"@version":{type:"string"},queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IQLQueryCreationHintsJSON"}},required:["@type","queryString"],additionalProperties:!1},IQLQueryCreationHintsJSON:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},ReadAttributeRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ReadAttributeRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/RelationshipAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"},{$ref:"#/definitions/IQLQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},ThirdPartyRelationshipAttributeQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"ThirdPartyRelationshipAttributeQuery"},"@context":{type:"string"},"@version":{type:"string"},key:{type:"string"},owner:{type:"string"},thirdParty:{type:"array",items:{type:"string"}},validFrom:{type:"string"},validTo:{type:"string"}},required:["@type","key","owner","thirdParty"],additionalProperties:!1},ConsentRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"ConsentRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},consent:{type:"string"},link:{type:"string"}},required:["@type","consent","mustBeAccepted"],additionalProperties:!1},AuthenticationRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"AuthenticationRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."}},required:["@type","mustBeAccepted"],additionalProperties:!1},FreeTextRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"FreeTextRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},freeText:{type:"string"}},required:["@type","freeText","mustBeAccepted"],additionalProperties:!1},RegisterAttributeListenerRequestItemJSON:{type:"object",properties:{"@type":{type:"string",const:"RegisterAttributeListenerRequestItem"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string",description:"The human-readable title of this item."},description:{type:"string",description:"The human-readable description of this item."},metadata:{type:"object",description:"This property can be used to add some arbitrary metadata to this item. The content of this property will be copied into the response on the side of the recipient, so the sender can use it to identify the group content as they receive the response."},mustBeAccepted:{type:"boolean",description:"If set to `true`, the recipient has to accept this group if he wants to accept the Request. If set to `false`, the recipient can decide whether he wants to accept it or not.\n\nCaution: this setting does not take effect in case it is inside of a {@link RequestItemGroupJSON RequestItemGroup } , which is not accepted by the recipient, since a {@link RequestItemJSON RequestItem } can only be accepted if the parent group is accepted as well."},requireManualDecision:{type:"boolean",description:"If set to `true`, it advices the recipient of this RequestItem to carefully consider their decision and especially do not decide based on some automation rules."},query:{anyOf:[{$ref:"#/definitions/IdentityAttributeQueryJSON"},{$ref:"#/definitions/ThirdPartyRelationshipAttributeQueryJSON"}]}},required:["@type","mustBeAccepted","query"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.RequireManualDecisionOfIncomingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RequireManualDecisionOfIncomingRequestRequest",definitions:{RequireManualDecisionOfIncomingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"}},required:["requestId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"}}},t.SentOutgoingRequestRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SentOutgoingRequestRequest",definitions:{SentOutgoingRequestRequest:{type:"object",properties:{requestId:{$ref:"#/definitions/RequestIdString"},messageId:{$ref:"#/definitions/MessageIdString"}},required:["requestId","messageId"],additionalProperties:!1},RequestIdString:{type:"string",pattern:"REQ[A-Za-z0-9]{17}"},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.ShareAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ShareAttributeRequest",definitions:{ShareAttributeRequest:{type:"object",properties:{attributeId:{$ref:"#/definitions/AttributeIdString"},peer:{$ref:"#/definitions/AddressString"},requestTitle:{type:"string"},requestDescription:{type:"string"},requestMetadata:{},requestItemTitle:{type:"string"},requestItemDescription:{type:"string"}},required:["attributeId","peer"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.SucceedAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SucceedAttributeRequest",definitions:{SucceedAttributeRequest:{type:"object",properties:{successorContent:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]},succeeds:{$ref:"#/definitions/AttributeIdString"}},required:["successorContent","succeeds"],additionalProperties:!1},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"}}},t.UpdateAttributeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateAttributeRequest",definitions:{UpdateAttributeRequest:{type:"object",properties:{id:{$ref:"#/definitions/AttributeIdString"},content:{anyOf:[{$ref:"#/definitions/IdentityAttributeJSON"},{$ref:"#/definitions/RelationshipAttributeJSON"}]}},required:["id","content"],additionalProperties:!1},AttributeIdString:{type:"string",pattern:"ATT[A-Za-z0-9]{17}"},IdentityAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Identity.Json"},tags:{type:"array",items:{type:"string"}}},required:["@type","owner","value"],additionalProperties:!1},"AttributeValues.Identity.Json":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.Json"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.Json"}]},"AttributeValues.Identity.Editable.Json":{anyOf:[{$ref:"#/definitions/AffiliationJSON"},{$ref:"#/definitions/BirthDateJSON"},{$ref:"#/definitions/BirthNameJSON"},{$ref:"#/definitions/BirthPlaceJSON"},{$ref:"#/definitions/CitizenshipJSON"},{$ref:"#/definitions/CommunicationLanguageJSON"},{$ref:"#/definitions/DeliveryBoxAddressJSON"},{$ref:"#/definitions/DisplayNameJSON"},{$ref:"#/definitions/EMailAddressJSON"},{$ref:"#/definitions/FaxNumberJSON"},{$ref:"#/definitions/IdentityFileReferenceJSON"},{$ref:"#/definitions/JobTitleJSON"},{$ref:"#/definitions/NationalityJSON"},{$ref:"#/definitions/PersonNameJSON"},{$ref:"#/definitions/PhoneNumberJSON"},{$ref:"#/definitions/PostOfficeBoxAddressJSON"},{$ref:"#/definitions/PseudonymJSON"},{$ref:"#/definitions/SexJSON"},{$ref:"#/definitions/StreetAddressJSON"},{$ref:"#/definitions/WebsiteJSON"}]},AffiliationJSON:{type:"object",properties:{"@type":{type:"string",const:"Affiliation"},"@context":{type:"string"},"@version":{type:"string"},organization:{type:"string"},role:{type:"string"},unit:{type:"string"}},required:["@type","organization"],additionalProperties:!1},BirthDateJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDate"},"@context":{type:"string"},"@version":{type:"string"},day:{type:"number"},month:{type:"number"},year:{type:"number"}},required:["@type","day","month","year"],additionalProperties:!1},BirthNameJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthPlaceJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthPlace"},"@context":{type:"string"},"@version":{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country"],additionalProperties:!1},CitizenshipJSON:{type:"object",properties:{"@type":{type:"string",const:"Citizenship"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CommunicationLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"CommunicationLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},DeliveryBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"DeliveryBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},userId:{type:"string"},deliveryBoxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},phoneNumber:{type:"string"},state:{type:"string"}},required:["@type","city","country","deliveryBoxId","recipient","userId","zipCode"],additionalProperties:!1},DisplayNameJSON:{type:"object",properties:{"@type":{type:"string",const:"DisplayName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},EMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"EMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},FaxNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"FaxNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},IdentityFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"IdentityFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},JobTitleJSON:{type:"object",properties:{"@type":{type:"string",const:"JobTitle"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},NationalityJSON:{type:"object",properties:{"@type":{type:"string",const:"Nationality"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PersonNameJSON:{type:"object",properties:{"@type":{type:"string",const:"PersonName"},"@context":{type:"string"},"@version":{type:"string"},givenName:{type:"string"},middleName:{type:"string"},surname:{type:"string"},honorificSuffix:{type:"string"},honorificPrefix:{type:"string"}},required:["@type","givenName","surname"],additionalProperties:!1},PhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"PhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},PostOfficeBoxAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"PostOfficeBoxAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},boxId:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","boxId","city","country","recipient","zipCode"],additionalProperties:!1},PseudonymJSON:{type:"object",properties:{"@type":{type:"string",const:"Pseudonym"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SexJSON:{type:"object",properties:{"@type":{type:"string",const:"Sex"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StreetAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"StreetAddress"},"@context":{type:"string"},"@version":{type:"string"},recipient:{type:"string"},street:{type:"string"},houseNo:{type:"string"},zipCode:{type:"string"},city:{type:"string"},country:{type:"string"},state:{type:"string"}},required:["@type","city","country","houseNo","recipient","street","zipCode"],additionalProperties:!1},WebsiteJSON:{type:"object",properties:{"@type":{type:"string",const:"Website"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},"AttributeValues.Identity.Uneditable.Json":{anyOf:[{$ref:"#/definitions/AffiliationOrganizationJSON"},{$ref:"#/definitions/AffiliationRoleJSON"},{$ref:"#/definitions/AffiliationUnitJSON"},{$ref:"#/definitions/BirthCityJSON"},{$ref:"#/definitions/BirthCountryJSON"},{$ref:"#/definitions/BirthDayJSON"},{$ref:"#/definitions/BirthMonthJSON"},{$ref:"#/definitions/BirthStateJSON"},{$ref:"#/definitions/BirthYearJSON"},{$ref:"#/definitions/CityJSON"},{$ref:"#/definitions/CountryJSON"},{$ref:"#/definitions/GivenNameJSON"},{$ref:"#/definitions/HonorificPrefixJSON"},{$ref:"#/definitions/HonorificSuffixJSON"},{$ref:"#/definitions/HouseNumberJSON"},{$ref:"#/definitions/MiddleNameJSON"},{$ref:"#/definitions/SchematizedXMLJSON"},{$ref:"#/definitions/StateJSON"},{$ref:"#/definitions/StatementJSON"},{$ref:"#/definitions/StreetJSON"},{$ref:"#/definitions/SurnameJSON"},{$ref:"#/definitions/ZipCodeJSON"}]},AffiliationOrganizationJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationOrganization"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationRoleJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationRole"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},AffiliationUnitJSON:{type:"object",properties:{"@type":{type:"string",const:"AffiliationUnit"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},BirthCityJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCity"}},required:["@type","value"],additionalProperties:!1},BirthCountryJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthCountry"}},required:["@type","value"],additionalProperties:!1},BirthDayJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthDay"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},BirthMonthJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthMonth"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number",enum:[1,2,3,4,5,6,7,8,9,10,11,12],description:"Month values: 1 (january) - 12 (december)"}},required:["@type","value"],additionalProperties:!1},BirthStateJSON:{type:"object",properties:{value:{type:"string"},"@context":{type:"string"},"@version":{type:"string"},"@type":{type:"string",const:"BirthState"}},required:["@type","value"],additionalProperties:!1},BirthYearJSON:{type:"object",properties:{"@type":{type:"string",const:"BirthYear"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"}},required:["@type","value"],additionalProperties:!1},CityJSON:{type:"object",properties:{"@type":{type:"string",const:"City"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},CountryJSON:{type:"object",properties:{"@type":{type:"string",const:"Country"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},GivenNameJSON:{type:"object",properties:{"@type":{type:"string",const:"GivenName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificPrefixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificPrefix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HonorificSuffixJSON:{type:"object",properties:{"@type":{type:"string",const:"HonorificSuffix"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},HouseNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"HouseNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},MiddleNameJSON:{type:"object",properties:{"@type":{type:"string",const:"MiddleName"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SchematizedXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"SchematizedXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},schemaURL:{type:"string"}},required:["@type","value"],additionalProperties:!1},StateJSON:{type:"object",properties:{"@type":{type:"string",const:"State"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},StatementJSON:{type:"object",properties:{"@type":{type:"string",const:"Statement"},"@context":{type:"string"},"@version":{type:"string"},subject:{$ref:"#/definitions/StatementSubjectJSON"},predicate:{$ref:"#/definitions/StatementPredicateJSON"},object:{$ref:"#/definitions/StatementObjectJSON"},issuer:{$ref:"#/definitions/DigitalIdentityDescriptorJSON"},issuerConditions:{$ref:"#/definitions/StatementIssuerConditionsJSON"}},required:["@type","issuer","issuerConditions","object","predicate","subject"],additionalProperties:!1},StatementSubjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementSubject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementPredicateJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementPredicate"},"@context":{type:"string"},"@version":{type:"string"},value:{anyOf:[{$ref:"#/definitions/Predicates"},{type:"string"}]}},required:["@type","value"],additionalProperties:!1},Predicates:{type:"string",enum:["hasAttribute","relatesTo","isRelatedTo"],description:"Supported Predicates"},StatementObjectJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementObject"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},DigitalIdentityDescriptorJSON:{type:"object",properties:{"@type":{type:"string",const:"DigitalIdentityDescriptor"},"@context":{type:"string"},"@version":{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/IdentityAttributeJSON"}},address:{type:"string"}},required:["@type","address"],additionalProperties:!1},StatementIssuerConditionsJSON:{type:"object",properties:{"@type":{type:"string",const:"StatementIssuerConditions"},"@context":{type:"string"},"@version":{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},evidence:{type:"string"},authorityType:{type:"string"},relayedParty:{type:"string"}},required:["@type","authorityType","evidence","validFrom","validTo"],additionalProperties:!1},StreetJSON:{type:"object",properties:{"@type":{type:"string",const:"Street"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},SurnameJSON:{type:"object",properties:{"@type":{type:"string",const:"Surname"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},ZipCodeJSON:{type:"object",properties:{"@type":{type:"string",const:"ZipCode"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"}},required:["@type","value"],additionalProperties:!1},RelationshipAttributeJSON:{type:"object",properties:{"@type":{type:"string",const:"RelationshipAttribute"},"@context":{type:"string"},"@version":{type:"string"},owner:{type:"string"},validFrom:{type:"string"},validTo:{type:"string"},value:{$ref:"#/definitions/AttributeValues.Relationship.Json"},key:{type:"string"},isTechnical:{type:"boolean"},confidentiality:{$ref:"#/definitions/RelationshipAttributeConfidentiality"}},required:["@type","confidentiality","key","owner","value"],additionalProperties:!1},"AttributeValues.Relationship.Json":{anyOf:[{$ref:"#/definitions/ProprietaryBooleanJSON"},{$ref:"#/definitions/ProprietaryCountryJSON"},{$ref:"#/definitions/ProprietaryEMailAddressJSON"},{$ref:"#/definitions/ProprietaryFileReferenceJSON"},{$ref:"#/definitions/ProprietaryFloatJSON"},{$ref:"#/definitions/ProprietaryHEXColorJSON"},{$ref:"#/definitions/ProprietaryIntegerJSON"},{$ref:"#/definitions/ProprietaryLanguageJSON"},{$ref:"#/definitions/ProprietaryPhoneNumberJSON"},{$ref:"#/definitions/ProprietaryStringJSON"},{$ref:"#/definitions/ProprietaryURLJSON"},{$ref:"#/definitions/ProprietaryJSONJSON"},{$ref:"#/definitions/ProprietaryXMLJSON"},{$ref:"#/definitions/ConsentJSON"}]},ProprietaryBooleanJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryBoolean"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"boolean"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ValueHintsOverrideJSON:{type:"object",additionalProperties:!1,properties:{"@type":{type:"string",const:"ValueHints"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}},"@context":{type:"string"},"@version":{type:"string"}}},ValueHintsValueJSON:{type:"object",properties:{key:{type:["string","number","boolean"]},displayName:{type:"string"}},required:["key","displayName"],additionalProperties:!1},ValueHintsJSON:{type:"object",properties:{"@type":{type:"string",const:"ValueHints"},"@context":{type:"string"},"@version":{type:"string"},editHelp:{type:"string"},min:{type:"number"},max:{type:"number"},pattern:{type:"string"},values:{type:"array",items:{$ref:"#/definitions/ValueHintsValueJSON"}},defaultValue:{type:["string","number","boolean"]},propertyHints:{type:"object",additionalProperties:{$ref:"#/definitions/ValueHintsJSON"}}},required:["@type"],additionalProperties:!1},ProprietaryCountryJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryCountry"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryEMailAddressJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryEMailAddress"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFileReferenceJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFileReference"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryFloatJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryFloat"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryHEXColorJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryHEXColor"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryIntegerJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryInteger"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"number"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryLanguageJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryLanguage"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryPhoneNumberJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryPhoneNumber"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryStringJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryString"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryURLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryURL"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"}},required:["@type","title","value"],additionalProperties:!1},ProprietaryJSONJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryJSON"},"@context":{type:"string"},"@version":{type:"string"},title:{type:"string"},description:{type:"string"},value:{}},required:["@type","title","value"],additionalProperties:!1},ProprietaryXMLJSON:{type:"object",properties:{"@type":{type:"string",const:"ProprietaryXML"},"@context":{type:"string"},"@version":{type:"string"},value:{type:"string"},title:{type:"string"},description:{type:"string"},valueHintsOverride:{$ref:"#/definitions/ValueHintsOverrideJSON"},schemaURL:{type:"string"}},required:["@type","title","value"],additionalProperties:!1},ConsentJSON:{type:"object",properties:{"@type":{type:"string"},"@context":{type:"string"},"@version":{type:"string"},consent:{type:"string"},link:{type:"string"}},required:["@type","consent"],additionalProperties:!1},RelationshipAttributeConfidentiality:{type:"string",enum:["public","private","protected"]}}},t.ValidateIQLQueryRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ValidateIQLQueryRequest",definitions:{ValidateIQLQueryRequest:{type:"object",properties:{query:{anyOf:[{$ref:"#/definitions/IIQLQuery"},{$ref:"#/definitions/IQLQueryJSON"}]}},required:["query"],additionalProperties:!1},IIQLQuery:{type:"object",properties:{queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IIQLQueryCreationHints"}},required:["queryString"],additionalProperties:!1},IIQLQueryCreationHints:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1},"AttributeValues.Identity.TypeName":{anyOf:[{$ref:"#/definitions/AttributeValues.Identity.Editable.TypeName"},{$ref:"#/definitions/AttributeValues.Identity.Uneditable.TypeName"}]},"AttributeValues.Identity.Editable.TypeName":{type:"string",enum:["Affiliation","BirthDate","BirthName","BirthPlace","Citizenship","CommunicationLanguage","DeliveryBoxAddress","DisplayName","EMailAddress","FaxNumber","IdentityFileReference","SchematizedXML","JobTitle","Nationality","PersonName","PhoneNumber","PostOfficeBoxAddress","Pseudonym","Sex","StreetAddress","Website"]},"AttributeValues.Identity.Uneditable.TypeName":{type:"string",enum:["AffiliationOrganization","AffiliationRole","AffiliationUnit","BirthCity","BirthCountry","BirthDay","BirthMonth","BirthState","BirthYear","City","Country","GivenName","HonorificPrefix","HonorificSuffix","HouseNumber","MiddleName","SchematizedXML","State","Statement","Street","Surname","ZipCode"]},IQLQueryJSON:{type:"object",properties:{"@type":{type:"string",const:"IQLQuery"},"@context":{type:"string"},"@version":{type:"string"},queryString:{type:"string"},attributeCreationHints:{$ref:"#/definitions/IQLQueryCreationHintsJSON"}},required:["@type","queryString"],additionalProperties:!1},IQLQueryCreationHintsJSON:{type:"object",properties:{valueType:{$ref:"#/definitions/AttributeValues.Identity.TypeName"},tags:{type:"array",items:{type:"string"}}},required:["valueType"],additionalProperties:!1}}},t.CreateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDraftRequest",definitions:{CreateDraftRequest:{type:"object",properties:{content:{},type:{type:"string"}},required:["content"],additionalProperties:!1}}},t.DeleteDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDraftRequest",definitions:{DeleteDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"}},required:["id"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.GetDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftRequest",definitions:{GetDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"}},required:["id"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.GetDraftsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDraftsRequest",definitions:{GetDraftsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetDraftsQuery"}},additionalProperties:!1},GetDraftsQuery:{type:"object",properties:{type:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},lastModifiedAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.UpdateDraftRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDraftRequest",definitions:{UpdateDraftRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalDraftIdString"},content:{}},required:["id","content"],additionalProperties:!1},LocalDraftIdString:{type:"string",pattern:"LCLDRF[A-Za-z0-9]{14}"}}},t.CreateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateSettingRequest",definitions:{CreateSettingRequest:{type:"object",properties:{key:{type:"string"},value:{},reference:{$ref:"#/definitions/GenericIdString"},scope:{type:"string",enum:["Identity","Device","Relationship"]},succeedsAt:{$ref:"#/definitions/ISO8601DateTimeString"},succeedsItem:{$ref:"#/definitions/LocalSettingIdString"}},required:["key","value"],additionalProperties:!1},GenericIdString:{type:"string",pattern:"[A-Za-z0-9]{20}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.DeleteSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteSettingRequest",definitions:{DeleteSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"}},required:["id"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.GetSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingRequest",definitions:{GetSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"}},required:["id"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.GetSettingByKeyRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingByKeyRequest",definitions:{GetSettingByKeyRequest:{type:"object",properties:{key:{type:"string"}},required:["key"],additionalProperties:!1}}},t.GetSettingsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetSettingsRequest",definitions:{GetSettingsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetSettingsQuery"}},additionalProperties:!1},GetSettingsQuery:{type:"object",properties:{key:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},scope:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},reference:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeedsItem:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},succeedsAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.UpdateSettingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateSettingRequest",definitions:{UpdateSettingRequest:{type:"object",properties:{id:{$ref:"#/definitions/LocalSettingIdString"},value:{}},required:["id","value"],additionalProperties:!1},LocalSettingIdString:{type:"string",pattern:"LCLSET[A-Za-z0-9]{14}"}}},t.DownloadFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadFileRequest",definitions:{DownloadFileRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"}},required:["id"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.LoadItemFromTruncatedReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadItemFromTruncatedReferenceRequest",definitions:{LoadItemFromTruncatedReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.RegisterPushNotificationTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RegisterPushNotificationTokenRequest",definitions:{RegisterPushNotificationTokenRequest:{type:"object",properties:{handle:{type:"string"},platform:{type:"string"},appId:{type:"string"}},required:["handle","platform","appId"],additionalProperties:!1}}},t.SyncDatawalletRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SyncDatawalletRequest",definitions:{SyncDatawalletRequest:{type:"object",additionalProperties:!1}}},t.DownloadAttachmentRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DownloadAttachmentRequest",definitions:{DownloadAttachmentRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"},attachmentId:{$ref:"#/definitions/FileIdString"}},required:["id","attachmentId"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.SyncEverythingRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SyncEverythingRequest",definitions:{SyncEverythingRequest:{type:"object",additionalProperties:!1}}},t.CreateRelationshipChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipChallengeRequest",definitions:{CreateRelationshipChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Relationship"},relationship:{$ref:"#/definitions/RelationshipIdString"}},required:["challengeType","relationship"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.CreateIdentityChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateIdentityChallengeRequest",definitions:{CreateIdentityChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Identity"}},required:["challengeType"],additionalProperties:!1}}},t.CreateDeviceChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceChallengeRequest",definitions:{CreateDeviceChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Device"}},required:["challengeType"],additionalProperties:!1}}},t.CreateChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateChallengeRequest",definitions:{CreateChallengeRequest:{anyOf:[{$ref:"#/definitions/CreateRelationshipChallengeRequest"},{$ref:"#/definitions/CreateIdentityChallengeRequest"},{$ref:"#/definitions/CreateDeviceChallengeRequest"}]},CreateRelationshipChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Relationship"},relationship:{$ref:"#/definitions/RelationshipIdString"}},required:["challengeType","relationship"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},CreateIdentityChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Identity"}},required:["challengeType"],additionalProperties:!1},CreateDeviceChallengeRequest:{type:"object",properties:{challengeType:{type:"string",const:"Device"}},required:["challengeType"],additionalProperties:!1}}},t.ValidateChallengeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/ValidateChallengeRequest",definitions:{ValidateChallengeRequest:{type:"object",properties:{challengeString:{type:"string"},signature:{type:"string"}},required:["challengeString","signature"],additionalProperties:!1}}},t.CreateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceRequest",definitions:{CreateDeviceRequest:{type:"object",properties:{name:{type:"string"},description:{type:"string"},isAdmin:{type:"boolean"}},additionalProperties:!1}}},t.CreateDeviceOnboardingTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateDeviceOnboardingTokenRequest",definitions:{CreateDeviceOnboardingTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.DeleteDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/DeleteDeviceRequest",definitions:{DeleteDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.GetDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceRequest",definitions:{GetDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.GetDeviceOnboardingInfoRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetDeviceOnboardingInfoRequest",definitions:{GetDeviceOnboardingInfoRequest:{type:"object",properties:{id:{$ref:"#/definitions/GenericIdString"}},required:["id"],additionalProperties:!1},GenericIdString:{type:"string",pattern:"[A-Za-z0-9]{20}"}}},t.UpdateDeviceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UpdateDeviceRequest",definitions:{UpdateDeviceRequest:{type:"object",properties:{id:{$ref:"#/definitions/DeviceIdString"},name:{type:"string"},description:{type:"string"}},required:["id"],additionalProperties:!1},DeviceIdString:{type:"string",pattern:"DVC[A-Za-z0-9]{17}"}}},t.CreateQrCodeForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateQrCodeForFileRequest",definitions:{CreateQrCodeForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.CreateTokenForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForFileRequest",definitions:{CreateTokenForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateTokenQrCodeForFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForFileRequest",definitions:{CreateTokenQrCodeForFileRequest:{type:"object",properties:{fileId:{$ref:"#/definitions/FileIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["fileId"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFileRequest",definitions:{GetFileRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"}},required:["id"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetFilesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetFilesRequest",definitions:{GetFilesRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetFilesQuery"},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},GetFilesQuery:{type:"object",properties:{createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdByDevice:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},description:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},expiresAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},filename:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},filesize:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},mimetype:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},title:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},isOwn:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.GetOrLoadFileViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileViaSecretRequest",definitions:{GetOrLoadFileViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetOrLoadFileViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileViaReferenceRequest",definitions:{GetOrLoadFileViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / file reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"}}},t.GetOrLoadFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetOrLoadFileRequest",definitions:{GetOrLoadFileRequest:{anyOf:[{$ref:"#/definitions/GetOrLoadFileViaSecretRequest"},{$ref:"#/definitions/GetOrLoadFileViaReferenceRequest"}]},GetOrLoadFileViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/FileIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"},GetOrLoadFileViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/FileReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / file reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},FileReferenceString:{type:"string",pattern:"RklM.{84}"}}},t.UploadOwnFileRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UploadOwnFileRequest",definitions:{UploadOwnFileRequest:{type:"object",properties:{content:{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}},filename:{type:"string"},mimetype:{type:"string"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},title:{type:"string"},description:{type:"string"}},required:["content","filename","mimetype","expiresAt","title"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.UploadOwnFileValidatableRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/UploadOwnFileValidatableRequest",definitions:{UploadOwnFileValidatableRequest:{type:"object",properties:{filename:{type:"string"},mimetype:{type:"string"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},title:{type:"string"},description:{type:"string"},content:{type:"object"}},required:["content","expiresAt","filename","mimetype","title"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CheckIdentityRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CheckIdentityRequest",definitions:{CheckIdentityRequest:{type:"object",properties:{address:{$ref:"#/definitions/AddressString"}},required:["address"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.GetAttachmentMetadataRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttachmentMetadataRequest",definitions:{GetAttachmentMetadataRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"},attachmentId:{$ref:"#/definitions/FileIdString"}},required:["id","attachmentId"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.GetMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessageRequest",definitions:{GetMessageRequest:{type:"object",properties:{id:{$ref:"#/definitions/MessageIdString"}},required:["id"],additionalProperties:!1},MessageIdString:{type:"string",pattern:"MSG[A-Za-z0-9]{17}"}}},t.GetMessagesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetMessagesRequest",definitions:{GetMessagesRequest:{type:"object",properties:{query:{}},additionalProperties:!1}}},t.SendMessageRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/SendMessageRequest",definitions:{SendMessageRequest:{type:"object",properties:{recipients:{type:"array",items:{$ref:"#/definitions/AddressString"},minItems:1},content:{},attachments:{type:"array",items:{$ref:"#/definitions/FileIdString"}}},required:["recipients","content"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"},FileIdString:{type:"string",pattern:"FIL[A-Za-z0-9]{17}"}}},t.AcceptRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/AcceptRelationshipChangeRequest",definitions:{AcceptRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CreateRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateRelationshipRequest",definitions:{CreateRelationshipRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},content:{}},required:["templateId","content"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.GetAttributesForRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetAttributesForRelationshipRequest",definitions:{GetAttributesForRelationshipRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipIdString"},hideTechnical:{type:"boolean"}},required:["id"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.GetRelationshipRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipRequest",definitions:{GetRelationshipRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipIdString"}},required:["id"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"}}},t.GetRelationshipByAddressRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipByAddressRequest",definitions:{GetRelationshipByAddressRequest:{type:"object",properties:{address:{$ref:"#/definitions/AddressString"}},required:["address"],additionalProperties:!1},AddressString:{type:"string",pattern:"id1[A-Za-z0-9]{32,33}"}}},t.GetRelationshipsRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipsRequest",definitions:{GetRelationshipsRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetRelationshipsQuery"}},additionalProperties:!1},GetRelationshipsQuery:{type:"object",properties:{peer:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},status:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},"template.id":{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1}}},t.RejectRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RejectRelationshipChangeRequest",definitions:{RejectRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.RevokeRelationshipChangeRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/RevokeRelationshipChangeRequest",definitions:{RevokeRelationshipChangeRequest:{type:"object",properties:{relationshipId:{$ref:"#/definitions/RelationshipIdString"},changeId:{$ref:"#/definitions/RelationshipChangeIdString"},content:{}},required:["relationshipId","changeId","content"],additionalProperties:!1},RelationshipIdString:{type:"string",pattern:"REL[A-Za-z0-9]{17}"},RelationshipChangeIdString:{type:"string",pattern:"RCH[A-Za-z0-9]{17}"}}},t.CreateOwnRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnRelationshipTemplateRequest",definitions:{CreateOwnRelationshipTemplateRequest:{type:"object",properties:{expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},content:{},maxNumberOfAllocations:{type:"number",minimum:1}},required:["expiresAt","content"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateQrCodeForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateQrCodeForOwnTemplateRequest",definitions:{CreateQrCodeForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.CreateTokenForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenForOwnTemplateRequest",definitions:{CreateTokenForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.CreateTokenQrCodeForOwnTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateTokenQrCodeForOwnTemplateRequest",definitions:{CreateTokenQrCodeForOwnTemplateRequest:{type:"object",properties:{templateId:{$ref:"#/definitions/RelationshipTemplateIdString"},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"}},required:["templateId"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplateRequest",definitions:{GetRelationshipTemplateRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"}},required:["id"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.GetRelationshipTemplatesRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetRelationshipTemplatesRequest",definitions:{GetRelationshipTemplatesRequest:{type:"object",properties:{query:{},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.LoadPeerRelationshipTemplateViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateViaSecretRequest",definitions:{LoadPeerRelationshipTemplateViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"}}},t.LoadPeerRelationshipTemplateViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateViaReferenceRequest",definitions:{LoadPeerRelationshipTemplateViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / relationship template reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.LoadPeerRelationshipTemplateRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerRelationshipTemplateRequest",definitions:{LoadPeerRelationshipTemplateRequest:{anyOf:[{$ref:"#/definitions/LoadPeerRelationshipTemplateViaSecretRequest"},{$ref:"#/definitions/LoadPeerRelationshipTemplateViaReferenceRequest"}]},LoadPeerRelationshipTemplateViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/RelationshipTemplateIdString"},secretKey:{type:"string",minLength:10}},required:["id","secretKey"],additionalProperties:!1},RelationshipTemplateIdString:{type:"string",pattern:"RLT[A-Za-z0-9]{17}"},LoadPeerRelationshipTemplateViaReferenceRequest:{type:"object",properties:{reference:{anyOf:[{$ref:"#/definitions/TokenReferenceString"},{$ref:"#/definitions/RelationshipTemplateReferenceString"}]}},required:["reference"],additionalProperties:!1,errorMessage:"token / relationship template reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},RelationshipTemplateReferenceString:{type:"string",pattern:"UkxU.{84}"}}},t.CreateOwnTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CreateOwnTokenRequest",definitions:{CreateOwnTokenRequest:{type:"object",properties:{content:{},expiresAt:{$ref:"#/definitions/ISO8601DateTimeString"},ephemeral:{type:"boolean"}},required:["content","expiresAt","ephemeral"],additionalProperties:!1},ISO8601DateTimeString:{type:"string",errorMessage:"must match ISO8601 datetime format",pattern:"^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([.,]\\d+(?!:))?)?(\\17[0-5]\\d([.,]\\d+)?)?([zZ]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"}}},t.GetQRCodeForTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetQRCodeForTokenRequest",definitions:{GetQRCodeForTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"}},required:["id"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.GetTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokenRequest",definitions:{GetTokenRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"}},required:["id"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.GetTokensRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/GetTokensRequest",definitions:{GetTokensRequest:{type:"object",properties:{query:{$ref:"#/definitions/GetTokensQuery"},ownerRestriction:{$ref:"#/definitions/OwnerRestriction"}},additionalProperties:!1},GetTokensQuery:{type:"object",properties:{createdAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdBy:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},createdByDevice:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},expiresAt:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},additionalProperties:!1},OwnerRestriction:{type:"string",enum:["o","p"]}}},t.LoadPeerTokenViaReferenceRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenViaReferenceRequest",definitions:{LoadPeerTokenViaReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"},ephemeral:{type:"boolean"}},required:["reference","ephemeral"],additionalProperties:!1,errorMessage:"token reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"}}},t.LoadPeerTokenViaSecretRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenViaSecretRequest",definitions:{LoadPeerTokenViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string",minLength:10},ephemeral:{type:"boolean"}},required:["id","secretKey","ephemeral"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}},t.LoadPeerTokenRequest={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/LoadPeerTokenRequest",definitions:{LoadPeerTokenRequest:{anyOf:[{$ref:"#/definitions/LoadPeerTokenViaReferenceRequest"},{$ref:"#/definitions/LoadPeerTokenViaSecretRequest"}]},LoadPeerTokenViaReferenceRequest:{type:"object",properties:{reference:{$ref:"#/definitions/TokenReferenceString"},ephemeral:{type:"boolean"}},required:["reference","ephemeral"],additionalProperties:!1,errorMessage:"token reference invalid"},TokenReferenceString:{type:"string",pattern:"VE9L.{84}"},LoadPeerTokenViaSecretRequest:{type:"object",properties:{id:{$ref:"#/definitions/TokenIdString"},secretKey:{type:"string",minLength:10},ephemeral:{type:"boolean"}},required:["id","secretKey","ephemeral"],additionalProperties:!1},TokenIdString:{type:"string",pattern:"TOK[A-Za-z0-9]{17}"}}}},5420:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.UseCase=void 0;const n=r(194),s=r(5172),o=r(9663),a=i(r(4530)),c=r(8728),u=r(6595);t.UseCase=class UseCase{constructor(e){this.requestValidator=e}async execute(e){if(this.requestValidator){const t=await this.requestValidator.validate(e);if(t.isInvalid())return this.validationFailed(t)}try{return await this.executeInternal(e)}catch(e){return this.failingResultFromUnknownError(e)}}failingResultFromUnknownError(e){return e instanceof Error?e instanceof o.RequestError?this.handleRequestError(e):e instanceof n.ServalError?this.handleServalError(e):e instanceof s.ApplicationError?s.Result.fail(e):e instanceof o.CoreError?s.Result.fail(new s.ApplicationError(e.code,e.message)):s.Result.fail(u.RuntimeErrors.general.unknown(`An error was thrown in a UseCase: ${e.message}`,e)):s.Result.fail(u.RuntimeErrors.general.unknown(`An unknown object was thrown in a UseCase: ${(0,a.default)(e)}`,e))}handleServalError(e){let t;return t=e instanceof n.ParsingError||e instanceof n.ValidationError?u.RuntimeErrors.serval.requestDeserialization(e.message):e.message.match(/Type '.+' with version [0-9]+ was not found within reflection classes. You might have to install a module first./)?u.RuntimeErrors.serval.unknownType(e.message):u.RuntimeErrors.serval.general(e.message),t.stack=e.stack,s.Result.fail(t)}handleRequestError(e){return c.PlatformErrorCodes.isNotFoundError(e)?s.Result.fail(u.RuntimeErrors.general.recordNotFoundWithMessage(e.reason)):c.PlatformErrorCodes.isValidationError(e)||c.PlatformErrorCodes.isUnexpectedError(e)?s.Result.fail(new s.ApplicationError(e.code,e.message)):s.Result.fail(e)}validationFailed(e){const t=e.getFailures()[0];return s.Result.fail(t.error)}}},7049:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2627),t),n(r(6819),t),n(r(3832),t),n(r(6595),t),n(r(2746),t),n(r(5420),t),n(r(3800),t),n(r(7674),t),n(r(9872),t),n(r(7111),t)},3800:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaValidator=void 0;const i=r(6595),n=r(9872),s=r(7111);t.SchemaValidator=class SchemaValidator{constructor(e){this.schema=e}validate(e){const t=this.schema.validate(e);return this.convertValidationResult(t)}convertValidationResult(e){const t=new s.ValidationResult;return e.isValid||t.addFailures(e.errors.map(this.schemaErrorToValidationFailure)),t}schemaErrorToValidationFailure(e){const t=`${e.instancePath} ${e.message}`.replace(/^\//,"").replace(/"/g,"").trim();return new n.ValidationFailure(i.RuntimeErrors.general.invalidPropertyValue(t),e.instancePath)}}},7674:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9872:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationFailure=void 0;t.ValidationFailure=class ValidationFailure{constructor(e,t){this.error=e,this.propertyName=t}}},7111:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationResult=void 0;t.ValidationResult=class ValidationResult{constructor(){this.failures=[]}isValid(){return 0===this.failures.length}isInvalid(){return!this.isValid()}addFailure(e){this.failures.push(e)}addFailures(e){this.failures.push(...e)}getFailures(){return this.failures.slice(0)}getFailureMessages(){return this.failures.map((e=>e.error.message))}getFailureCodes(){return this.failures.map((e=>e.error.code))}}},4231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeListenerMapper=void 0;t.AttributeListenerMapper=class AttributeListenerMapper{static toAttributeListenerDTO(e){return{id:e.id.toString(),query:e.query.toJSON(),peer:e.peer.toString()}}static toAttributeListenerDTOList(e){return e.map((e=>this.toAttributeListenerDTO(e)))}}},1316:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeListenerUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(4231);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetAttributeListenerRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetAttributeListenerUseCase extends p.UseCase{constructor(e,t){super(t),this.attributeListenersController=e}async executeInternal(e){const t=await this.attributeListenersController.getAttributeListener(c.CoreId.from(e.id));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalAttributeListener));const r=l.AttributeListenerMapper.toAttributeListenerDTO(t);return o.Result.ok(r)}};t.GetAttributeListenerUseCase=f,t.GetAttributeListenerUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributeListenersController,d])],f)},5129:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeListenersUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(4231);let l=class GetAttributeListenersUseCase extends u.UseCase{constructor(e){super(),this.attributeListenersController=e}async executeInternal(){const e=await this.attributeListenersController.getAttributeListeners(),t=p.AttributeListenerMapper.toAttributeListenerDTOList(e);return o.Result.ok(t)}};t.GetAttributeListenersUseCase=l,t.GetAttributeListenersUseCase=l=i([s(0,c.Inject),n("design:paramtypes",[a.AttributeListenersController])],l)},4864:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4231),t),n(r(1316),t),n(r(5129),t)},1192:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMapper=void 0;t.AttributeMapper=class AttributeMapper{static toAttributeDTO(e){return{id:e.id.toString(),parentId:e.parentId?.toString(),content:e.content.toJSON(),createdAt:e.createdAt.toString(),succeeds:e.succeeds?.toString(),succeededBy:e.succeededBy?.toString(),shareInfo:e.shareInfo?.toJSON()}}static toAttributeDTOList(e){return e.map((e=>this.toAttributeDTO(e)))}}},7716:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.CreateLocalAttributeParams.from({content:e.content}),r=await this.attributeController.createLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};t.CreateAttributeUseCase=f,t.CreateAttributeUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f)},236:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateSharedAttributeCopyUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateSharedAttributeCopyRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateSharedAttributeCopyUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.CreateSharedLocalAttributeCopyParams.from({sourceAttributeId:c.CoreId.from(e.attributeId),peer:c.CoreAddress.from(e.peer),requestReference:c.CoreId.from(e.requestReference)}),r=await this.attributeController.createSharedLocalAttributeCopy(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};t.CreateSharedAttributeCopyUseCase=f,t.CreateSharedAttributeCopyUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f)},6899:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049);let l=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("DeleteAttributeRequest"))}};l=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],l);let d=class DeleteAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(c.CoreId.from(e.id));return t?(await this.attributeController.deleteAttribute(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalAttribute))}};t.DeleteAttributeUseCase=d,t.DeleteAttributeUseCase=d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,l])],d)},9661:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteIQLQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("ExecuteIQLQueryRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class ExecuteIQLQueryUseCase extends p.UseCase{constructor(e,t){super(t),this.attributeController=e}async executeInternal(e){const t=c.IQLQuery.from(e.query),r=await this.attributeController.executeIQLQuery(t);return o.Result.ok(l.AttributeMapper.toAttributeDTOList(r))}};t.ExecuteIQLQueryUseCase=f,t.ExecuteIQLQueryUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributesController,d])],f)},6847:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteIdentityAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),p=r(7049),l=r(1192);let d=class ExecuteIdentityAttributeQueryUseCase extends p.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.executeIdentityAttributeQuery(c.IdentityAttributeQuery.from(e.query));return o.Result.ok(l.AttributeMapper.toAttributeDTOList(t))}};t.ExecuteIdentityAttributeQueryUseCase=d,t.ExecuteIdentityAttributeQueryUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d)},4538:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteRelationshipAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),p=r(7049),l=r(1192);let d=class ExecuteRelationshipAttributeQueryUseCase extends p.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.executeRelationshipAttributeQuery(c.RelationshipAttributeQuery.from(e.query));return t?o.Result.ok(l.AttributeMapper.toAttributeDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound("RelationshipAttribute"))}};t.ExecuteRelationshipAttributeQueryUseCase=d,t.ExecuteRelationshipAttributeQueryUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d)},4922:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteThirdPartyRelationshipAttributeQueryUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(7071),p=r(7049),l=r(1192);let d=class ExecuteThirdPartyRelationshipAttributeQueryUseCase extends p.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=c.ThirdPartyRelationshipAttributeQuery.from(e.query),r=await this.attributeController.executeThirdPartyRelationshipAttributeQuery(t);return o.Result.ok(l.AttributeMapper.toAttributeDTOList(r))}};t.ExecuteThirdPartyRelationshipAttributeQueryUseCase=d,t.ExecuteThirdPartyRelationshipAttributeQueryUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.AttributesController])],d)},3421:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetAttributeUseCase extends p.UseCase{constructor(e,t){super(t),this.attributeController=e}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(c.CoreId.from(e.id));return t?o.Result.ok(l.AttributeMapper.toAttributeDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalAttribute))}};t.GetAttributeUseCase=f,t.GetAttributeUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributesController,d])],f)},9536:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributesUseCase=void 0;const a=r(2937),c=r(5172),u=r(3850),p=r(8565),l=r(4714),d=r(7071),f=r(7049),y=r(8537),h=r(1192);let g=i=class GetAttributesUseCase extends f.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=e.query??{},r=(0,y.flattenObject)(t),n=i.queryTranslator.parse(r),s=await this.attributeController.getLocalAttributes(n,e.hideTechnical,e.onlyValid);return c.Result.ok(h.AttributeMapper.toAttributeDTOList(s))}};t.GetAttributesUseCase=g,g.queryTranslator=new a.QueryTranslator({whitelist:{[(0,l.nameof)((e=>e.createdAt))]:!0,[(0,l.nameof)((e=>e.parentId))]:!0,[(0,l.nameof)((e=>e.succeeds))]:!0,[(0,l.nameof)((e=>e.succeededBy))]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.owner))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.@type`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.value))}.@type`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.key))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.isTechnical))}`]:!0,[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.confidentiality))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.peer))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.requestReference))}`]:!0,[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.sourceAttribute))}`]:!0},alias:{[(0,l.nameof)((e=>e.createdAt))]:[(0,l.nameof)((e=>e.createdAt))],[(0,l.nameof)((e=>e.parentId))]:[(0,l.nameof)((e=>e.parentId))],[(0,l.nameof)((e=>e.succeeds))]:[(0,l.nameof)((e=>e.succeeds))],[(0,l.nameof)((e=>e.succeededBy))]:[(0,l.nameof)((e=>e.succeededBy))],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.owner))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.owner))}`],[`${(0,l.nameof)((e=>e.content))}.@type`]:[`${(0,l.nameof)((e=>e.content))}.@type`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.value))}.@type`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.value))}.@type`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.key))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.key))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.isTechnical))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.isTechnical))}`],[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.confidentiality))}`]:[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.confidentiality))}`],[`${(0,l.nameof)((e=>e.shareInfo))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}`],[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.peer))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.peer))}`],[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.requestReference))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.requestReference))}`],[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.sourceAttribute))}`]:[`${(0,l.nameof)((e=>e.shareInfo))}.${(0,l.nameof)((e=>e.sourceAttribute))}`]},custom:{[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]:(e,t)=>{if(!t)return;const r=p.DateTime.fromISO(t).toUTC().toString();e[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validFrom))}`]={$gte:r}},[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]:(e,t)=>{if(!t)return;const r=p.DateTime.fromISO(t).toUTC().toString();e[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.validTo))}`]={$lte:r}},[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:(e,t)=>{const r=[];for(const e of t){const t={[`${(0,l.nameof)((e=>e.content))}.${(0,l.nameof)((e=>e.tags))}`]:{$contains:e}};r.push(t)}e.$or=r}}}),t.GetAttributesUseCase=g=i=n([o(0,d.Inject),s("design:paramtypes",[u.AttributesController])],g)},2089:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetPeerAttributesUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(8537),l=r(1192),d=r(9536);let f=class GetPeerAttributesUseCase extends u.UseCase{constructor(e){super(),this.attributeController=e}async executeInternal(e){const t=e.query??{};t["content.owner"]=e.peer;const r=(0,p.flattenObject)(t),i=d.GetAttributesUseCase.queryTranslator.parse(r),n=await this.attributeController.getLocalAttributes(i,e.hideTechnical,e.onlyValid);return o.Result.ok(l.AttributeMapper.toAttributeDTOList(n))}};t.GetPeerAttributesUseCase=f,t.GetPeerAttributesUseCase=f=i([s(0,c.Inject),n("design:paramtypes",[a.AttributesController])],f)},6823:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSharedToPeerAttributesUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(8537),d=r(1192),f=r(9536);let y=class GetSharedToPeerAttributesUseCase extends p.UseCase{constructor(e,t){super(),this.attributeController=e,this.identityController=t}async executeInternal(e){const t=e.query??{};t["content.owner"]=this.identityController.address.toString(),t["shareInfo.peer"]=e.peer;const r=(0,l.flattenObject)(t),i=f.GetAttributesUseCase.queryTranslator.parse(r),n=await this.attributeController.getLocalAttributes(i,e.hideTechnical,e.onlyValid);return o.Result.ok(d.AttributeMapper.toAttributeDTOList(n))}};t.GetSharedToPeerAttributesUseCase=y,t.GetSharedToPeerAttributesUseCase=y=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.AttributesController,c.IdentityController])],y)},6438:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ShareAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(7049),d=r(3289);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("ShareAttributeRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class ShareAttributeUseCase extends l.UseCase{constructor(e,t,r,i,n){super(n),this.attributeController=e,this.accountController=t,this.requestsController=r,this.messageController=i}async executeInternal(e){const t=await this.attributeController.getLocalAttribute(u.CoreId.from(e.attributeId));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(a.LocalAttribute));const r=u.CoreAddress.from(e.peer),i={peer:r,content:{title:e.requestTitle,description:e.requestDescription,metadata:e.requestMetadata,items:[c.ShareAttributeRequestItem.from({attribute:t.content,sourceAttributeId:t.id,title:e.requestItemTitle,description:e.requestItemDescription,mustBeAccepted:!0})]}},n=await this.requestsController.canCreate(i);if(n.isError())return o.Result.fail(n.error);const s=await this.requestsController.create(i);return await this.messageController.sendMessage({recipients:[r],content:s.content}),await this.accountController.syncDatawallet(),o.Result.ok(d.RequestMapper.toLocalRequestDTO(s))}};t.ShareAttributeUseCase=y,t.ShareAttributeUseCase=y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),s(3,p.Inject),s(4,p.Inject),n("design:paramtypes",[a.AttributesController,u.AccountController,a.OutgoingRequestsController,u.MessageController,f])],y)},4415:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SucceedAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("SucceedAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class SucceedAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.SucceedLocalAttributeParams.from({successorContent:e.successorContent,succeeds:e.succeeds}),r=await this.attributeController.succeedLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};t.SucceedAttributeUseCase=f,t.SucceedAttributeUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f)},9660:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateAttributeUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(1192);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("UpdateAttributeRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class UpdateAttributeUseCase extends p.UseCase{constructor(e,t,r){super(r),this.attributeController=e,this.accountController=t}async executeInternal(e){const t=a.UpdateLocalAttributeParams.from({id:e.id,content:e.content}),r=await this.attributeController.updateLocalAttribute(t);return await this.accountController.syncDatawallet(),o.Result.ok(l.AttributeMapper.toAttributeDTO(r))}};t.UpdateAttributeUseCase=f,t.UpdateAttributeUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.AttributesController,c.AccountController,d])],f)},5449:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ValidateIQLQueryUseCase=void 0;const o=r(5172),a=r(5030),c=r(2173),u=r(7071),p=r(7049);let l=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("ValidateIQLQueryRequest"))}};l=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],l);let d=class ValidateIQLQueryUseCase extends p.UseCase{constructor(e){super(e)}executeInternal(e){const t=a.IQLQuery.from(e.query),r=(0,c.validate)(t.queryString);return o.Result.ok(r)}};t.ValidateIQLQueryUseCase=d,t.ValidateIQLQueryUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[l])],d)},99:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1192),t),n(r(7716),t),n(r(236),t),n(r(6899),t),n(r(6847),t),n(r(9661),t),n(r(4538),t),n(r(4922),t),n(r(3421),t),n(r(9536),t),n(r(2089),t),n(r(6823),t),n(r(6438),t),n(r(4415),t),n(r(9660),t),n(r(5449),t)},7372:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(660);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateDraftRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateDraftUseCase extends p.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.createDraft(e.content,e.type);return await this.accountController.syncDatawallet(),o.Result.ok(l.DraftMapper.toDraftDTO(t))}};t.CreateDraftUseCase=f,t.CreateDraftUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.DraftsController,c.AccountController,d])],f)},9696:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049);let l=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("DeleteDraftRequest"))}};l=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],l);let d=class DeleteDraftUseCase extends p.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.getDraft(c.CoreId.from(e.id));return t?(await this.draftController.deleteDraft(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Draft))}};t.DeleteDraftUseCase=d,t.DeleteDraftUseCase=d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.DraftsController,c.AccountController,l])],d)},660:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DraftMapper=void 0;t.DraftMapper=class DraftMapper{static toDraftDTO(e){return{id:e.id.toString(),type:e.type,createdAt:e.createdAt.toString(),lastModifiedAt:e.lastModifiedAt.toISOString(),content:e.content.toJSON()}}static toDraftDTOList(e){return e.map((e=>this.toDraftDTO(e)))}}},3165:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDraftUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(660);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetDraftRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetDraftUseCase extends p.UseCase{constructor(e,t){super(t),this.draftController=e}async executeInternal(e){const t=await this.draftController.getDraft(c.CoreId.from(e.id));return t?o.Result.ok(l.DraftMapper.toDraftDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Draft))}};t.GetDraftUseCase=f,t.GetDraftUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.DraftsController,d])],f)},6863:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDraftsUseCase=void 0;const a=r(2937),c=r(5172),u=r(3850),p=r(4714),l=r(7071),d=r(7049),f=r(660);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetDraftsRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetDraftsUseCase extends d.UseCase{constructor(e,t){super(t),this.draftController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query),r=await this.draftController.getDrafts(t);return c.Result.ok(f.DraftMapper.toDraftDTOList(r))}};t.GetDraftsUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.type))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.lastModifiedAt))]:!0}}),t.GetDraftsUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.DraftsController,y])],h)},5760:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDraftUseCase=void 0;const o=r(194),a=r(5172),c=r(3850),u=r(9663),p=r(7071),l=r(7049),d=r(660);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("UpdateDraftRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class UpdateDraftUseCase extends l.UseCase{constructor(e,t,r){super(r),this.draftController=e,this.accountController=t}async executeInternal(e){const t=await this.draftController.getDraft(u.CoreId.from(e.id));return t?(t.content=o.Serializable.fromUnknown(e.content),await this.draftController.updateDraft(t),await this.accountController.syncDatawallet(),a.Result.ok(d.DraftMapper.toDraftDTO(t))):a.Result.fail(l.RuntimeErrors.general.recordNotFound(c.Draft))}};t.UpdateDraftUseCase=y,t.UpdateDraftUseCase=y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[c.DraftsController,u.AccountController,f])],y)},5966:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7372),t),n(r(9696),t),n(r(660),t),n(r(3165),t),n(r(6863),t),n(r(5760),t)},3742:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4864),t),n(r(99),t),n(r(5966),t),n(r(3289),t),n(r(1394),t)},4262:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class AcceptIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){let t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.requestId));return t?(t=await this.incomingRequestsController.accept(e),o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest))}};t.AcceptIncomingRequestUseCase=d,t.AcceptIncomingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d)},3678:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanAcceptIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(8062);let l=class CanAcceptIncomingRequestUseCase extends u.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.canAccept(e),r=p.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};t.CanAcceptIncomingRequestUseCase=l,t.CanAcceptIncomingRequestUseCase=l=i([s(0,c.Inject),n("design:paramtypes",[a.IncomingRequestsController])],l)},8112:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanCreateOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(8062);let d=class CanCreateOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.canCreate({content:e.content,peer:e.peer?c.CoreAddress.from(e.peer):void 0}),r=l.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};t.CanCreateOutgoingRequestUseCase=d,t.CanCreateOutgoingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d)},8197:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CanRejectIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(8062);let l=class CanRejectIncomingRequestUseCase extends u.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.canReject(e),r=p.RequestValidationResultMapper.toRequestValidationResultDTO(t);return o.Result.ok(r)}};t.CanRejectIncomingRequestUseCase=l,t.CanRejectIncomingRequestUseCase=l=i([s(0,c.Inject),n("design:paramtypes",[a.IncomingRequestsController])],l)},2113:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheckPrerequisitesOfIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class CheckPrerequisitesOfIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.checkPrerequisites({requestId:c.CoreId.from(e.requestId)});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))}};t.CheckPrerequisitesOfIncomingRequestUseCase=d,t.CheckPrerequisitesOfIncomingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d)},6353:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompleteIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class CompleteIncomingRequestUseCase extends p.UseCase{constructor(e,t,r){super(),this.incomingRequestsController=e,this.messageController=t,this.relationshipController=r}async executeInternal(e){const t=await this.getResponseSourceObject(e),r=c.CoreId.from(e.requestId),i=await this.incomingRequestsController.complete({requestId:r,responseSourceObject:t});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(i))}async getResponseSourceObject(e){if(!e.responseSourceId)return;if(e.responseSourceId.startsWith("MSG")){const t=await this.messageController.getMessage(c.CoreId.from(e.responseSourceId));if(!t)throw p.RuntimeErrors.general.recordNotFound(c.Message);return t}const t=await this.relationshipController.getRelationships({"cache.changes.id":e.responseSourceId});if(0===t.length)throw p.RuntimeErrors.general.recordNotFound(c.RelationshipChange);return t[0].cache.creationChange}};t.CompleteIncomingRequestUseCase=d,t.CompleteIncomingRequestUseCase=d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.IncomingRequestsController,c.MessageController,c.RelationshipsController])],d)},4464:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompleteOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(7049),d=r(3386);let f=class CompleteOutgoingRequestUseCase extends l.UseCase{constructor(e,t){super(),this.outgoingRequestsController=e,this.messageController=t}async executeInternal(e){const t=await this.messageController.getMessage(u.CoreId.from(e.messageId));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.Message));const r={requestId:u.CoreId.from(e.receivedResponse.requestId),receivedResponse:c.Response.from(e.receivedResponse),responseSourceObject:t},i=await this.outgoingRequestsController.complete(r);return o.Result.ok(d.RequestMapper.toLocalRequestDTO(i))}};t.CompleteOutgoingRequestUseCase=f,t.CompleteOutgoingRequestUseCase=f=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[a.OutgoingRequestsController,u.MessageController])],f)},6796:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(7049),d=r(3386);let f=class CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseUseCase extends l.UseCase{constructor(e,t,r,i){super(),this.outgoingRequestsController=e,this.relationshipController=t,this.relationshipTemplateController=r,this.messageController=i}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(u.CoreId.from(e.templateId));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.RelationshipTemplate));const r=await this.getResponseSource(e.responseSourceId);if(!r)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.RelationshipChange));const i=await this.outgoingRequestsController.createAndCompleteFromRelationshipTemplateResponse({template:t,responseSource:r,response:c.Response.from(e.response)});return o.Result.ok(d.RequestMapper.toLocalRequestDTO(i))}async getResponseSource(e){if(e.startsWith("MSG"))return await this.messageController.getMessage(u.CoreId.from(e));const t=await this.relationshipController.getRelationships({"cache.changes.id":e});if(0!==t.length){return t[0].cache.creationChange}}};t.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseUseCase=f,t.CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseUseCase=f=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),s(3,p.Inject),n("design:paramtypes",[a.OutgoingRequestsController,u.RelationshipsController,u.RelationshipTemplateController,u.MessageController])],f)},2285:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class CreateOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.create({content:e.content,peer:c.CoreAddress.from(e.peer)});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))}};t.CreateOutgoingRequestUseCase=d,t.CreateOutgoingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d)},3923:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DiscardOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049);let l=class DiscardOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){return await this.outgoingRequestsController.discardOutgoingRequest(c.CoreId.from(e.id)),o.Result.ok(void 0)}};t.DiscardOutgoingRequestUseCase=l,t.DiscardOutgoingRequestUseCase=l=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],l)},3094:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class GetIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.id));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest));const r=l.RequestMapper.toLocalRequestDTO(t);return o.Result.ok(r)}};t.GetIncomingRequestUseCase=d,t.GetIncomingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d)},1697:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIncomingRequestsUseCase=void 0;const a=r(2937),c=r(5172),u=r(3850),p=r(4714),l=r(7071),d=r(7049),f=r(8537),y=r(3386);let h=i=class GetIncomingRequestsUseCase extends d.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=(0,f.flattenObject)(e.query),r=i.queryTranslator.parse(t),n=await this.incomingRequestsController.getIncomingRequests(r),s=y.RequestMapper.toLocalRequestDTOList(n);return c.Result.ok(s)}};t.GetIncomingRequestsUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.id))]:!0,[(0,p.nameof)((e=>e.peer))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.status))]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:!0,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0},alias:{[(0,p.nameof)((e=>e.id))]:(0,p.nameof)((e=>e.id)),[(0,p.nameof)((e=>e.peer))]:(0,p.nameof)((e=>e.peer)),[(0,p.nameof)((e=>e.createdAt))]:(0,p.nameof)((e=>e.createdAt)),[(0,p.nameof)((e=>e.status))]:(0,p.nameof)((e=>e.status)),[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`}}),t.GetIncomingRequestsUseCase=h=i=n([o(0,l.Inject),s("design:paramtypes",[u.IncomingRequestsController])],h)},6293:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class GetOutgoingRequestUseCase extends p.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=await this.outgoingRequestsController.getOutgoingRequest(c.CoreId.from(e.id));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest));const r=l.RequestMapper.toLocalRequestDTO(t);return o.Result.ok(r)}};t.GetOutgoingRequestUseCase=d,t.GetOutgoingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController])],d)},5771:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOutgoingRequestsUseCase=void 0;const a=r(2937),c=r(5172),u=r(3850),p=r(4714),l=r(7071),d=r(7049),f=r(8537),y=r(3386);let h=i=class GetOutgoingRequestsUseCase extends d.UseCase{constructor(e){super(),this.outgoingRequestsController=e}async executeInternal(e){const t=(0,f.flattenObject)(e.query),r=i.queryTranslator.parse(t),n=await this.outgoingRequestsController.getOutgoingRequests(r),s=y.RequestMapper.toLocalRequestDTOList(n);return c.Result.ok(s)}};t.GetOutgoingRequestsUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.id))]:!0,[(0,p.nameof)((e=>e.peer))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.status))]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:!0,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:!0},alias:{[(0,p.nameof)((e=>e.id))]:(0,p.nameof)((e=>e.id)),[(0,p.nameof)((e=>e.peer))]:(0,p.nameof)((e=>e.peer)),[(0,p.nameof)((e=>e.createdAt))]:(0,p.nameof)((e=>e.createdAt)),[(0,p.nameof)((e=>e.status))]:(0,p.nameof)((e=>e.status)),[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.expiresAt))}`,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`,[`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:`${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.createdAt))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.type))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.source))}.${(0,p.nameof)((e=>e.reference))}`]:!0,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.result))}`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.@type`,[`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`]:`${(0,p.nameof)((e=>e.response))}.${(0,p.nameof)((e=>e.content))}.${(0,p.nameof)((e=>e.items))}.${(0,p.nameof)((e=>e.items))}.@type`}}),t.GetOutgoingRequestsUseCase=h=i=n([o(0,l.Inject),s("design:paramtypes",[u.OutgoingRequestsController])],h)},7782:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReceivedIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(5030),u=r(9663),p=r(7071),l=r(7049),d=r(3386);let f=class ReceivedIncomingRequestUseCase extends l.UseCase{constructor(e,t,r){super(),this.incomingRequestsController=e,this.messageController=t,this.relationshipTemplateController=r}async executeInternal(e){let t;if(e.requestSourceId.startsWith("MSG")){if(t=await this.messageController.getMessage(u.CoreId.from(e.requestSourceId)),!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.Message))}else if(t=await this.relationshipTemplateController.getRelationshipTemplate(u.CoreId.from(e.requestSourceId)),!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(u.RelationshipTemplate));const r=await this.incomingRequestsController.received({receivedRequest:c.Request.from(e.receivedRequest),requestSourceObject:t});return o.Result.ok(d.RequestMapper.toLocalRequestDTO(r))}};t.ReceivedIncomingRequestUseCase=f,t.ReceivedIncomingRequestUseCase=f=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[a.IncomingRequestsController,u.MessageController,u.RelationshipTemplateController])],f)},5196:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RejectIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class RejectIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){let t=await this.incomingRequestsController.getIncomingRequest(c.CoreId.from(e.requestId));return t?(t=await this.incomingRequestsController.reject(e),o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.LocalRequest))}};t.RejectIncomingRequestUseCase=d,t.RejectIncomingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d)},3386:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestMapper=void 0;t.RequestMapper=class RequestMapper{static toLocalRequestDTO(e){return{id:e.id.toString(),isOwn:e.isOwn,peer:e.peer.toString(),createdAt:e.createdAt.toString(),content:e.content.toJSON(),source:e.source?{type:e.source.type,reference:e.source.reference.toString()}:void 0,response:e.response?{createdAt:e.response.createdAt.toString(),content:e.response.content.toJSON(),source:e.response.source?{type:e.response.source.type,reference:e.response.source.reference.toString()}:void 0}:void 0,status:e.status}}static toLocalRequestDTOList(e){return e.map((e=>this.toLocalRequestDTO(e)))}}},8062:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestValidationResultMapper=void 0;t.RequestValidationResultMapper=class RequestValidationResultMapper{static toRequestValidationResultDTO(e){return{isSuccess:e.isSuccess(),code:e.isError()?e.error.code:void 0,message:e.isError()?e.error.message:void 0,items:e.items.map((e=>this.toRequestValidationResultDTO(e)))}}}},5943:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RequireManualDecisionOfIncomingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class RequireManualDecisionOfIncomingRequestUseCase extends p.UseCase{constructor(e){super(),this.incomingRequestsController=e}async executeInternal(e){const t=await this.incomingRequestsController.requireManualDecision({requestId:c.CoreId.from(e.requestId)});return o.Result.ok(l.RequestMapper.toLocalRequestDTO(t))}};t.RequireManualDecisionOfIncomingRequestUseCase=d,t.RequireManualDecisionOfIncomingRequestUseCase=d=i([s(0,u.Inject),n("design:paramtypes",[a.IncomingRequestsController])],d)},1938:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SentOutgoingRequestUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(3386);let d=class SentOutgoingRequestUseCase extends p.UseCase{constructor(e,t){super(),this.outgoingRequestsController=e,this.messageController=t}async executeInternal(e){const t=await this.messageController.getMessage(c.CoreId.from(e.messageId));if(!t)return o.Result.fail(p.RuntimeErrors.general.recordNotFound(c.Message));const r={requestId:c.CoreId.from(e.requestId),requestSourceObject:t},i=await this.outgoingRequestsController.sent(r);return o.Result.ok(l.RequestMapper.toLocalRequestDTO(i))}};t.SentOutgoingRequestUseCase=d,t.SentOutgoingRequestUseCase=d=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.OutgoingRequestsController,c.MessageController])],d)},8537:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenObject=void 0,t.flattenObject=function flattenObject(e){const t={};for(const r in e){const i=e[r];if("object"!=typeof i||Array.isArray(i))t[r]=i;else{const e=flattenObject(i);for(const i in e)t[`${r}.${i}`]=e[i]}}return t}},3289:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4262),t),n(r(3678),t),n(r(8112),t),n(r(8197),t),n(r(2113),t),n(r(6353),t),n(r(4464),t),n(r(6796),t),n(r(2285),t),n(r(3923),t),n(r(3094),t),n(r(1697),t),n(r(6293),t),n(r(5771),t),n(r(7782),t),n(r(5196),t),n(r(3386),t),n(r(5943),t),n(r(1938),t)},3951:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(6950);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("CreateSettingRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class CreateSettingUseCase extends p.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.createSetting({key:e.key,value:e.value,reference:e.reference?c.CoreId.from(e.reference):void 0,scope:e.scope,succeedsAt:e.succeedsAt?c.CoreDate.from(e.succeedsAt):void 0,succeedsItem:e.succeedsItem?c.CoreId.from(e.succeedsItem):void 0});return await this.accountController.syncDatawallet(),o.Result.ok(l.SettingMapper.toSettingDTO(t))}};t.CreateSettingUseCase=f,t.CreateSettingUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.SettingsController,c.AccountController,d])],f)},678:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049);let l=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("DeleteSettingRequest"))}};l=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],l);let d=class DeleteSettingUseCase extends p.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.getSetting(c.CoreId.from(e.id));return t?(await this.settingController.deleteSetting(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Setting))}};t.DeleteSettingUseCase=d,t.DeleteSettingUseCase=d=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[a.SettingsController,c.AccountController,l])],d)},6798:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(7071),p=r(7049),l=r(6950);let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetSettingRequest"))}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetSettingUseCase extends p.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=await this.settingController.getSetting(c.CoreId.from(e.id));return t?o.Result.ok(l.SettingMapper.toSettingDTO(t)):o.Result.fail(p.RuntimeErrors.general.recordNotFound(a.Setting))}};t.GetSettingUseCase=f,t.GetSettingUseCase=f=i([s(0,u.Inject),s(1,u.Inject),n("design:paramtypes",[a.SettingsController,d])],f)},7510:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingByKeyUseCase=void 0;const o=r(5172),a=r(3850),c=r(7071),u=r(7049),p=r(6950);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetSettingByKeyRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetSettingByKeyUseCase extends u.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=await this.settingController.getSettings({key:e.key});if(0===t.length)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Setting));const r=t.reduce(((e,t)=>e.createdAt>t.createdAt?e:t));return o.Result.ok(p.SettingMapper.toSettingDTO(r))}};t.GetSettingByKeyUseCase=d,t.GetSettingByKeyUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.SettingsController,l])],d)},6101:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSettingsUseCase=void 0;const a=r(2937),c=r(5172),u=r(3850),p=r(4714),l=r(7071),d=r(7049),f=r(6950);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetSettingsRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetSettingsUseCase extends d.UseCase{constructor(e,t){super(t),this.settingController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query),r=await this.settingController.getSettings(t);return c.Result.ok(f.SettingMapper.toSettingDTOList(r))}};t.GetSettingsUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.key))]:!0,[(0,p.nameof)((e=>e.scope))]:!0,[(0,p.nameof)((e=>e.reference))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.succeedsItem))]:!0,[(0,p.nameof)((e=>e.succeedsAt))]:!0}}),t.GetSettingsUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.SettingsController,y])],h)},6950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingMapper=void 0;t.SettingMapper=class SettingMapper{static toSettingDTO(e){return{id:e.id.toString(),key:e.key,scope:e.scope,reference:e.reference?.toString(),value:e.value.toJSON(),createdAt:e.createdAt.toISOString(),succeedsItem:e.succeedsItem?.toString(),succeedsAt:e.succeedsAt?.toString()}}static toSettingDTOList(e){return e.map((e=>this.toSettingDTO(e)))}}},1853:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateSettingUseCase=void 0;const o=r(194),a=r(5172),c=r(3850),u=r(9663),p=r(7071),l=r(7049),d=r(6950);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("UpdateSettingRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class UpdateSettingUseCase extends l.UseCase{constructor(e,t,r){super(r),this.settingController=e,this.accountController=t}async executeInternal(e){const t=await this.settingController.getSetting(u.CoreId.from(e.id));return t?(t.value=o.Serializable.fromUnknown(e.value),await this.settingController.updateSetting(t),await this.accountController.syncDatawallet(),a.Result.ok(d.SettingMapper.toSettingDTO(t))):a.Result.fail(l.RuntimeErrors.general.recordNotFound(c.Setting))}};t.UpdateSettingUseCase=y,t.UpdateSettingUseCase=y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[c.SettingsController,u.AccountController,f])],y)},1394:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3951),t),n(r(678),t),n(r(6798),t),n(r(7510),t),n(r(6101),t),n(r(6950),t),n(r(1853),t)},485:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9365),t),n(r(2627),t),n(r(6819),t),n(r(6595),t),n(r(3742),t),n(r(9667),t)},2737:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DisableAutoSyncUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class DisableAutoSyncUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}executeInternal(){return this.accountController.disableAutoSync(),o.Result.ok(void 0)}};t.DisableAutoSyncUseCase=p,t.DisableAutoSyncUseCase=p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p)},9710:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.EnableAutoSyncUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class EnableAutoSyncUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(){return await this.accountController.enableAutoSync(),o.Result.ok(void 0)}};t.EnableAutoSyncUseCase=p,t.EnableAutoSyncUseCase=p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p)},569:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class GetDeviceInfoUseCase extends u.UseCase{constructor(e){super(),this.deviceController=e}executeInternal(){const e=this.deviceController.device;return o.Result.ok(p.DeviceMapper.toDeviceDTO(e,!0))}};t.GetDeviceInfoUseCase=l,t.GetDeviceInfoUseCase=l=i([s(0,c.Inject),n("design:paramtypes",[a.DeviceController])],l)},3378:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetIdentityInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class GetIdentityInfoUseCase extends u.UseCase{constructor(e){super(),this.identityController=e}executeInternal(){const e=this.identityController.identity;return o.Result.ok({address:e.address.toString(),publicKey:e.publicKey.toBase64(!1)})}};t.GetIdentityInfoUseCase=p,t.GetIdentityInfoUseCase=p=i([s(0,c.Inject),n("design:paramtypes",[a.IdentityController])],p)},8562:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetSyncInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class GetSyncInfoUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(){const e=await this.accountController.getLastCompletedSyncTime(),t=await this.accountController.getLastCompletedDatawalletSyncTime();return o.Result.ok({lastSyncRun:e?{completedAt:e.toISOString()}:void 0,lastDatawalletSync:t?{completedAt:t.toISOString()}:void 0})}};t.GetSyncInfoUseCase=p,t.GetSyncInfoUseCase=p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p)},4614:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadItemFromTruncatedReferenceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067),l=r(5076),d=r(8434),f=r(7121);let y=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("LoadItemFromTruncatedReferenceRequest"))}};y=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],y);let h=class LoadItemFromTruncatedReferenceUseCase extends u.UseCase{constructor(e,t,r,i,n){super(n),this.fileController=e,this.templateController=t,this.tokenController=r,this.accountController=i}async executeInternal(e){try{return await this._executeInternal(e)}finally{await this.accountController.syncDatawallet()}}async _executeInternal(e){const t=e.reference;if(t.startsWith(u.Base64ForIdPrefix.RelationshipTemplate)){const e=await this.templateController.loadPeerRelationshipTemplateByTruncated(t);return o.Result.ok({type:"RelationshipTemplate",value:d.RelationshipTemplateMapper.toRelationshipTemplateDTO(e)})}if(t.startsWith(u.Base64ForIdPrefix.File)){const e=await this.fileController.getOrLoadFileByTruncated(t);return o.Result.ok({type:"File",value:l.FileMapper.toFileDTO(e)})}return await this.handleTokenReference(t)}async handleTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Token,t.id.toString());const r=t.cache.content;if(r instanceof a.TokenContentRelationshipTemplate){const e=await this.templateController.loadPeerRelationshipTemplate(r.templateId,r.secretKey);return o.Result.ok({type:"RelationshipTemplate",value:d.RelationshipTemplateMapper.toRelationshipTemplateDTO(e)})}if(r instanceof a.TokenContentFile){const e=await this.fileController.getOrLoadFile(r.fileId,r.secretKey);return o.Result.ok({type:"File",value:l.FileMapper.toFileDTO(e)})}return r instanceof a.TokenContentDeviceSharedSecret?o.Result.ok({type:"DeviceOnboardingInfo",value:p.DeviceMapper.toDeviceOnboardingInfoDTO(r.sharedSecret)}):o.Result.ok({type:"Token",value:f.TokenMapper.toTokenDTO(t,!0)})}};t.LoadItemFromTruncatedReferenceUseCase=h,t.LoadItemFromTruncatedReferenceUseCase=h=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),s(4,c.Inject),n("design:paramtypes",[a.FileController,a.RelationshipTemplateController,a.TokenController,a.AccountController,y])],h)},3826:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterPushNotificationTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RegisterPushNotificationTokenRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class RegisterPushNotificationTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.accountController=e}async executeInternal(e){return await this.accountController.registerPushNotificationToken({handle:e.handle,platform:e.platform,appId:e.appId}),o.Result.ok(void 0)}};t.RegisterPushNotificationTokenUseCase=l,t.RegisterPushNotificationTokenUseCase=l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.AccountController,p])],l)},4204:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncDatawalletUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class SyncDatawalletUseCase extends u.UseCase{constructor(e){super(),this.accountController=e}async executeInternal(e){return await this.accountController.syncDatawallet(!0,e.callback),o.Result.ok(void 0)}};t.SyncDatawalletUseCase=p,t.SyncDatawalletUseCase=p=i([s(0,c.Inject),n("design:paramtypes",[a.AccountController])],p)},4773:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEverythingUseCase=void 0;const a=r(5172),c=r(9663),u=r(7071),p=r(986),l=r(7049),d=r(6881),f=r(4316);let y=i=class SyncEverythingUseCase extends l.UseCase{constructor(e,t){super(),this.accountController=e,this.logger=t.getLogger(i)}async executeInternal(e){if(this.currentSync)return await this.currentSync;this.currentSync=this._executeInternal(e);try{return await this.currentSync}finally{this.currentSync=void 0}}async _executeInternal(e){const t=await this.accountController.syncEverything(e.callback),r=t.messages.map((e=>d.MessageMapper.toMessageDTO(e))),i=t.relationships.map((e=>f.RelationshipMapper.toRelationshipDTO(e)));return a.Result.ok({messages:r,relationships:i})}};t.SyncEverythingUseCase=y,t.SyncEverythingUseCase=y=i=n([o(0,u.Inject),o(1,u.Inject),s("design:paramtypes",[c.AccountController,p.RuntimeLoggerFactory])],y)},9276:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(2737),t),n(r(9710),t),n(r(569),t),n(r(3378),t),n(r(8562),t),n(r(4614),t),n(r(3826),t),n(r(4204),t),n(r(4773),t)},7661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChallengeMapper=void 0;t.ChallengeMapper=class ChallengeMapper{static toChallengeDTO(e){const t=JSON.parse(e.challenge);return{id:t.id,expiresAt:t.expiresAt,createdBy:t.createdBy,createdByDevice:t.createdByDevice,type:t.type,signature:e.signature.toBase64(!1),challengeString:e.challenge}}}},9936:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateChallengeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7661);function isCreateRelationshipChallengeRequest(e){return"Relationship"===e.challengeType&&"string"==typeof e.relationship}let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateChallengeRequest")),this.relationshipSchema=e.getSchema("CreateRelationshipChallengeRequest"),this.identitySchema=e.getSchema("CreateIdentityChallengeRequest"),this.deviceSchema=e.getSchema("CreateDeviceChallengeRequest")}validate(e){if(this.schema.validate(e).isValid)return new u.ValidationResult;if(isCreateRelationshipChallengeRequest(e))return this.convertValidationResult(this.relationshipSchema.validate(e));if(function isCreateIdentityChallengeRequest(e){return"Identity"===e.challengeType}(e))return this.convertValidationResult(this.identitySchema.validate(e));if(function isCreateDeviceChallengeRequest(e){return"Device"===e.challengeType}(e))return this.convertValidationResult(this.deviceSchema.validate(e));const t=new u.ValidationResult;return t.addFailure(new u.ValidationFailure(u.RuntimeErrors.general.invalidPayload())),t}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateChallengeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.challengeController=e,this.relationshipsController=t}async executeInternal(e){const t=await this.getRelationship(e);if(t.isError)return o.Result.fail(t.error);let r;switch(e.challengeType){case"Relationship":r=a.ChallengeType.Relationship;break;case"Identity":r=a.ChallengeType.Identity;break;case"Device":r=a.ChallengeType.Device;break;default:throw new Error("Unknown challenge type.")}const i=await this.challengeController.createChallenge(r,t.value);return o.Result.ok(p.ChallengeMapper.toChallengeDTO(i))}async getRelationship(e){if(!isCreateRelationshipChallengeRequest(e))return o.Result.ok(void 0);const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationship));return t?o.Result.ok(t):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};t.CreateChallengeUseCase=d,t.CreateChallengeUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.ChallengeController,a.RelationshipsController,l])],d)},5573:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.ValidateChallengeUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(4714),p=r(7071),l=r(7049),d=r(4316);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("ValidateChallengeRequest"))}validate(e){const t=super.validate(e);if(t.isInvalid())return t;const r=this.validateSignature(e.signature);r.isError&&t.addFailure(new l.ValidationFailure(l.RuntimeErrors.general.invalidPropertyValue(r.error.message),(0,u.nameof)((e=>e.signature))));const i=this.validateChallenge(e.challengeString);return i.isError&&t.addFailure(new l.ValidationFailure(l.RuntimeErrors.general.invalidPropertyValue(i.error.message),(0,u.nameof)((e=>e.challengeString)))),t}validateSignature(e){try{return a.CryptoSignature.fromBase64(e),o.Result.ok(void 0)}catch{return o.Result.fail(l.RuntimeErrors.challenges.invalidSignature())}}validateChallenge(e){try{return c.Challenge.deserialize(e),o.Result.ok(void 0)}catch{return o.Result.fail(l.RuntimeErrors.challenges.invalidChallengeString())}}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class ValidateChallengeUseCase extends l.UseCase{constructor(e,t){super(t),this.challengeController=e}async executeInternal(e){const t=a.CryptoSignature.fromBase64(e.signature),r=c.ChallengeSigned.from({challenge:e.challengeString,signature:t});try{const e=await this.challengeController.validateChallenge(r),t=e.correspondingRelationship?d.RelationshipMapper.toRelationshipDTO(e.correspondingRelationship):void 0;return o.Result.ok({isValid:e.isValid,correspondingRelationship:t})}catch(e){if(!(e instanceof c.CoreError)||"error.transport.notSupported"!==e.code)throw e;return o.Result.fail(l.RuntimeErrors.general.notSupported("Validating challenges of the type 'Device' is not yet supported."))}}};t.ValidateChallengeUseCase=y,t.ValidateChallengeUseCase=y=i([s(0,p.Inject),s(1,p.Inject),n("design:paramtypes",[c.ChallengeController,f])],y)},5629:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9936),t),n(r(5573),t)},5188:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateDeviceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateDeviceUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.sendDevice(e);return await this.accountController.syncDatawallet(),o.Result.ok(p.DeviceMapper.toDeviceDTO(t,!1))}};t.CreateDeviceUseCase=d,t.CreateDeviceUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,l])],d)},795:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateDeviceOnboardingTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateDeviceOnboardingTokenRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateDeviceOnboardingTokenUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.tokenController=t}async executeInternal(e){const t=await this.devicesController.getSharedSecret(a.CoreId.from(e.id)),r=e.expiresAt?a.CoreDate.from(e.expiresAt):a.CoreDate.utc().add({minutes:5}),i=a.TokenContentDeviceSharedSecret.from({sharedSecret:t}),n=await this.tokenController.sendToken({content:i,expiresAt:r,ephemeral:!0});return o.Result.ok(p.TokenMapper.toTokenDTO(n,!0))}};t.CreateDeviceOnboardingTokenUseCase=d,t.CreateDeviceOnboardingTokenUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.TokenController,l])],d)},2137:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DeleteDeviceRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class DeleteDeviceUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.accountController=t}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));return t?(await this.devicesController.delete(t),await this.accountController.syncDatawallet(),o.Result.ok(void 0)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Device))}};t.DeleteDeviceUseCase=l,t.DeleteDeviceUseCase=l=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,p])],l)},3067:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceMapper=void 0;const i=r(2890),n=r(9663);t.DeviceMapper=class DeviceMapper{static toDeviceDTO(e,t){return{id:e.id.toString(),isAdmin:e.isAdmin??!1,createdAt:e.createdAt.toString(),createdByDevice:e.createdByDevice.toString(),name:e.name,type:e.type.toString(),username:e.username,certificate:e.certificate,description:e.description,lastLoginAt:e.lastLoginAt?.toString(),operatingSystem:e.operatingSystem,publicKey:e.publicKey?.toBase64(!1),isCurrentDevice:t}}static toDeviceOnboardingInfoDTO(e){return{id:e.id.toString(),createdAt:e.createdAt.toString(),createdByDevice:e.createdByDevice.toString(),name:e.name,description:e.description,secretBaseKey:e.secretBaseKey.toBase64(!1),deviceIndex:e.deviceIndex,synchronizationKey:e.synchronizationKey.toBase64(!1),identityPrivateKey:e.identityPrivateKey?e.identityPrivateKey.toBase64(!1):void 0,identity:{address:e.identity.address.toString(),publicKey:e.identity.publicKey.toBase64(!1),realm:e.identity.realm.toString()},password:e.password,username:e.username}}static toDeviceSharedSecret(e){return n.DeviceSharedSecret.from({id:n.CoreId.from(e.id),createdAt:n.CoreDate.from(e.createdAt),createdByDevice:n.CoreId.from(e.createdByDevice),name:e.name,description:e.description,secretBaseKey:i.CryptoSecretKey.fromBase64(e.secretBaseKey),deviceIndex:e.deviceIndex,synchronizationKey:i.CryptoSecretKey.fromBase64(e.synchronizationKey),identityPrivateKey:e.identityPrivateKey?i.CryptoSignaturePrivateKey.fromBase64(e.identityPrivateKey):void 0,identity:{address:n.CoreAddress.from(e.identity.address),publicKey:i.CryptoSignaturePublicKey.fromBase64(e.identity.publicKey),realm:e.identity.realm},password:e.password,username:e.username})}}},770:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetDeviceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetDeviceUseCase extends u.UseCase{constructor(e,t,r){super(r),this.devicesController=e,this.deviceController=t}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Device));const r=this.deviceController.device,i=t.id.equals(r.id);return o.Result.ok(p.DeviceMapper.toDeviceDTO(t,i))}};t.GetDeviceUseCase=d,t.GetDeviceUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.DevicesController,a.DeviceController,l])],d)},8283:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDeviceOnboardingInfoUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetDeviceOnboardingInfoRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetDeviceOnboardingInfoUseCase extends u.UseCase{constructor(e,t){super(t),this.devicesController=e}async executeInternal(e){const t=await this.devicesController.getSharedSecret(a.CoreId.from(e.id));return o.Result.ok(p.DeviceMapper.toDeviceOnboardingInfoDTO(t))}};t.GetDeviceOnboardingInfoUseCase=d,t.GetDeviceOnboardingInfoUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.DevicesController,l])],d)},3341:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetDevicesUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class GetDevicesUseCase extends u.UseCase{constructor(e,t){super(),this.devicesController=e,this.deviceController=t}async executeInternal(){const e=await this.devicesController.list(),t=this.deviceController.device,r=e.map((e=>p.DeviceMapper.toDeviceDTO(e,e.id.equals(t.id))));return o.Result.ok(r)}};t.GetDevicesUseCase=l,t.GetDevicesUseCase=l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.DevicesController,a.DeviceController])],l)},189:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDeviceUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(3067);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("UpdateDeviceRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class UpdateDeviceUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.devicesController=e,this.accountController=t,this.deviceController=r}async executeInternal(e){const t=await this.devicesController.get(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Device));void 0!==e.name&&(t.name=e.name),t.description=e.description,await this.devicesController.update(t),await this.accountController.syncDatawallet();const r=this.deviceController.device,i=t.id.equals(r.id);return o.Result.ok(p.DeviceMapper.toDeviceDTO(t,i))}};t.UpdateDeviceUseCase=d,t.UpdateDeviceUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.DevicesController,a.AccountController,a.DeviceController,l])],d)},7802:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5188),t),n(r(795),t),n(r(2137),t),n(r(3067),t),n(r(770),t),n(r(8283),t),n(r(3341),t),n(r(189),t)},1828:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateQrCodeForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateQrCodeForFileRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateQrCodeForFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};t.CreateQrCodeForFileUseCase=l,t.CreateQrCodeForFileUseCase=l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,p])],l)},542:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenForFileRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateTokenForFileUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.fileController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=a.TokenContentFile.from({fileId:t.id,secretKey:t.secretKey}),i=e.ephemeral??!0,n=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),s=e.expiresAt?a.CoreDate.from(e.expiresAt):n,c=await this.tokenController.sendToken({content:r,expiresAt:s,ephemeral:i});return i||await this.accountController.syncDatawallet(),o.Result.ok(p.TokenMapper.toTokenDTO(c,i))}};t.CreateTokenForFileUseCase=d,t.CreateTokenForFileUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.FileController,a.TokenController,a.AccountController,l])],d)},6913:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenQrCodeForFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenQrCodeForFileRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateTokenQrCodeForFileUseCase extends u.UseCase{constructor(e,t,r){super(r),this.fileController=e,this.tokenController=t}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.fileId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const r=a.TokenContentFile.from({fileId:t.id,secretKey:t.secretKey}),i=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),n=e.expiresAt?a.CoreDate.from(e.expiresAt):i,s=await this.tokenController.sendToken({content:r,expiresAt:n,ephemeral:!0}),c=await u.QRCode.forTruncateable(s);return o.Result.ok({qrCodeBytes:c.asBase64()})}};t.CreateTokenQrCodeForFileUseCase=l,t.CreateTokenQrCodeForFileUseCase=l=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.FileController,a.TokenController,p])],l)},8516:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(5076);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DownloadFileRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class DownloadFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=a.CoreId.from(e.id),r=await this.fileController.getFile(t);if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const i=await this.fileController.downloadFileContent(r.id);return o.Result.ok(p.FileMapper.toDownloadFileResponse(i,r))}};t.DownloadFileUseCase=d,t.DownloadFileUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,l])],d)},5076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileMapper=void 0;const i=r(9663),n=r(7049);t.FileMapper=class FileMapper{static toDownloadFileResponse(e,t){if(!t.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,t.id.toString());return{content:e.buffer,filename:t.cache.filename?t.cache.filename:t.id.toString(),mimetype:t.cache.mimetype}}static toFileDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,e.id.toString());return{id:e.id.toString(),filename:e.cache.filename,filesize:e.cache.filesize,createdAt:e.cache.createdAt.toString(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),expiresAt:e.cache.expiresAt.toString(),mimetype:e.cache.mimetype,isOwn:e.isOwn,title:e.cache.title??"",secretKey:e.secretKey.toBase64(!1),description:e.cache.description,truncatedReference:e.truncate()}}static toFileDTOList(e){return e.map((e=>this.toFileDTO(e)))}}},3520:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetFileUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(5076);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetFileRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetFileUseCase extends u.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=await this.fileController.getFile(a.CoreId.from(e.id));return t?o.Result.ok(p.FileMapper.toFileDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File))}};t.GetFileUseCase=d,t.GetFileUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.FileController,l])],d)},5911:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetFilesUseCase=void 0;const a=r(2937),c=r(5172),u=r(9663),p=r(4714),l=r(7071),d=r(7049),f=r(5076);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetFilesRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetFilesUseCase extends d.UseCase{constructor(e,t){super(t),this.fileController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,p.nameof)((e=>e.isOwn))]=e.ownerRestriction===d.OwnerRestriction.Own);const r=await this.fileController.getFiles(t);return c.Result.ok(f.FileMapper.toFileDTOList(r))}};t.GetFilesUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.createdBy))]:!0,[(0,p.nameof)((e=>e.createdByDevice))]:!0,[(0,p.nameof)((e=>e.description))]:!0,[(0,p.nameof)((e=>e.expiresAt))]:!0,[(0,p.nameof)((e=>e.filename))]:!0,[(0,p.nameof)((e=>e.filesize))]:!0,[(0,p.nameof)((e=>e.mimetype))]:!0,[(0,p.nameof)((e=>e.title))]:!0,[(0,p.nameof)((e=>e.isOwn))]:!0},alias:{[(0,p.nameof)((e=>e.createdAt))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdAt))}`,[(0,p.nameof)((e=>e.createdBy))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdBy))}`,[(0,p.nameof)((e=>e.createdByDevice))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdByDevice))}`,[(0,p.nameof)((e=>e.description))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.description))}`,[(0,p.nameof)((e=>e.expiresAt))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.expiresAt))}`,[(0,p.nameof)((e=>e.filename))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.filename))}`,[(0,p.nameof)((e=>e.filesize))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.filesize))}`,[(0,p.nameof)((e=>e.mimetype))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.mimetype))}`,[(0,p.nameof)((e=>e.title))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.title))}`,[(0,p.nameof)((e=>e.isOwn))]:(0,p.nameof)((e=>e.isOwn))}}),t.GetFilesUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.FileController,y])],h)},9918:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetOrLoadFileUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(5076);function isViaSecret(e){return"id"in e&&"secretKey"in e}function isViaReference(e){return"reference"in e}let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("GetOrLoadFileRequest")),this.loadViaSecretSchema=e.getSchema("GetOrLoadFileViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("GetOrLoadFileViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new p.ValidationResult;if(isViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new p.ValidationResult;return t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class GetOrLoadFileUseCase extends p.UseCase{constructor(e,t,r,i){super(i),this.fileController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){let t;if(isViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.loadFile(c.CoreId.from(e.id),r)}else{if(!isViaReference(e))throw new Error("Invalid request format.");t=await this.loadFileFromReference(e.reference)}return await this.accountController.syncDatawallet(),t}async loadFileFromReference(e){if(e.startsWith(p.Base64ForIdPrefix.File))return await this.loadFileFromFileReference(e);if(e.startsWith(p.Base64ForIdPrefix.Token))return await this.loadFileFromTokenReference(e);throw p.RuntimeErrors.files.invalidReference(e)}async loadFileFromFileReference(e){const t=await this.fileController.getOrLoadFileByTruncated(e);return o.Result.ok(l.FileMapper.toFileDTO(t))}async loadFileFromTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw p.RuntimeErrors.general.cacheEmpty(c.Token,t.id.toString());if(!(t.cache.content instanceof c.TokenContentFile))return o.Result.fail(p.RuntimeErrors.general.invalidTokenContent());const r=t.cache.content;return await this.loadFile(r.fileId,r.secretKey)}async loadFile(e,t){const r=await this.fileController.getOrLoadFile(e,t);return o.Result.ok(l.FileMapper.toFileDTO(r))}};t.GetOrLoadFileUseCase=f,t.GetOrLoadFileUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),s(3,u.Inject),n("design:paramtypes",[c.FileController,c.TokenController,c.AccountController,d])],f)},2109:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.UploadOwnFileUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(8565),p=r(4714),l=r(7071),d=r(7049),f=r(5076);let y=class Validator extends d.SchemaValidator{set maxFileSize(e){this._maxFileSize=e}constructor(e){super(e.getSchema("UploadOwnFileValidatableRequest"))}validate(e){const t=super.validate(e);return t.isValid()?(e.content.byteLength>this._maxFileSize&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.content))}' is too large`),(0,p.nameof)((e=>e.content)))),0===e.content.length&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.content))}' is empty`),(0,p.nameof)((e=>e.content)))),u.DateTime.fromISO(e.expiresAt)<=u.DateTime.utc()&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.expiresAt))}' must be in the future`),(0,p.nameof)((e=>e.expiresAt)))),t):t}};y=i([s(0,l.Inject),n("design:paramtypes",[d.SchemaRepository])],y);let h=class UploadOwnFileUseCase extends d.UseCase{constructor(e,t,r){super(r),this.fileController=e,this.accountController=t,r.maxFileSize=e.config.platformMaxUnencryptedFileSize}async executeInternal(e){const t=await this.fileController.sendFile({buffer:a.CoreBuffer.from(e.content),title:e.title,description:e.description??"",filename:e.filename,mimetype:e.mimetype,expiresAt:c.CoreDate.from(e.expiresAt)});return await this.accountController.syncDatawallet(),o.Result.ok(f.FileMapper.toFileDTO(t))}};t.UploadOwnFileUseCase=h,t.UploadOwnFileUseCase=h=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),n("design:paramtypes",[c.FileController,c.AccountController,y])],h)},4237:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(1828),t),n(r(542),t),n(r(6913),t),n(r(8516),t),n(r(5076),t),n(r(3520),t),n(r(5911),t),n(r(9918),t),n(r(2109),t)},4824:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CheckIdentityUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CheckIdentityRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CheckIdentityUseCase extends u.UseCase{constructor(e,t,r){super(r),this.identityController=e,this.relationshipsController=t}async executeInternal(e){const t=a.CoreAddress.from(e.address);if(this.identityController.isMe(t))return o.Result.ok({self:!0});const r=await this.relationshipsController.getRelationshipToIdentity(t);if(r){const e=p.RelationshipMapper.toRelationshipDTO(r);return r.status===a.RelationshipStatus.Pending?o.Result.ok({peer:!0,relationshipPending:!0,relationship:e}):r.status===a.RelationshipStatus.Active||r.status===a.RelationshipStatus.Terminating?o.Result.ok({peer:!0,relationshipActive:!0,relationship:e}):o.Result.ok({peer:!0,relationshipTerminated:!0,relationship:e})}return o.Result.ok({unknown:!0})}};t.CheckIdentityUseCase=d,t.CheckIdentityUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.IdentityController,a.RelationshipsController,l])],d)},4847:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4824),t)},9667:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9276),t),n(r(5629),t),n(r(7802),t),n(r(4237),t),n(r(4847),t),n(r(2290),t),n(r(7831),t),n(r(3084),t),n(r(5631),t)},4860:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadAttachmentUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(6881);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("DownloadAttachmentRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class DownloadAttachmentUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString());const r=t.cache.attachments.find((t=>t.equals(a.CoreId.from(e.attachmentId))));if(!r)return o.Result.fail(u.RuntimeErrors.messages.fileNotFoundInMessage(e.attachmentId));const i=await this.fileController.getFile(r);if(!i)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));const n=await this.fileController.downloadFileContent(r);return o.Result.ok(p.MessageMapper.toDownloadAttachmentResponse(n,i))}};t.DownloadAttachmentUseCase=d,t.DownloadAttachmentUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,l])],d)},9558:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttachmentMetadataUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(5076);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetAttachmentMetadataRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetAttachmentMetadataUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)throw u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString());const r=t.cache.attachments.find((t=>t.equals(a.CoreId.from(e.attachmentId))));if(!r)return o.Result.fail(u.RuntimeErrors.messages.fileNotFoundInMessage(e.attachmentId));const i=await this.fileController.getFile(r);return i?o.Result.ok(p.FileMapper.toFileDTO(i)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(File))}};t.GetAttachmentMetadataUseCase=d,t.GetAttachmentMetadataUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,l])],d)},978:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetMessageUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(6881);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetMessageRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetMessageUseCase extends u.UseCase{constructor(e,t,r){super(r),this.messageController=e,this.fileController=t}async executeInternal(e){const t=await this.messageController.getMessage(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Message));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Message,t.id.toString()));const r=await Promise.all(t.cache.attachments.map((e=>this.fileController.getFile(e))));if(r.some((e=>!e)))throw new Error("A file could not be fetched.");return o.Result.ok(p.MessageMapper.toMessageWithAttachmentsDTO(t,r))}};t.GetMessageUseCase=d,t.GetMessageUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,l])],d)},9231:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetMessagesUseCase=void 0;const a=r(2937),c=r(5172),u=r(9663),p=r(4714),l=r(7071),d=r(7049),f=r(6881);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetMessagesRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetMessagesUseCase extends d.UseCase{constructor(e,t){super(t),this.messageController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query),r=await this.messageController.getMessages(t);return c.Result.ok(f.MessageMapper.toMessageDTOList(r))}};t.GetMessagesUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.createdBy))]:!0,[(0,p.nameof)((e=>e.createdByDevice))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[`${(0,p.nameof)((e=>e.content))}.@type`]:!0,[`${(0,p.nameof)((e=>e.content))}.body`]:!0,[`${(0,p.nameof)((e=>e.content))}.subject`]:!0,[(0,p.nameof)((e=>e.attachments))]:!0,[`${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.address))}`]:!0,[`${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.relationshipId))}`]:!0,participant:!0},alias:{[(0,p.nameof)((e=>e.createdBy))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdBy))}`,[(0,p.nameof)((e=>e.createdByDevice))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdByDevice))}`,[(0,p.nameof)((e=>e.createdAt))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdAt))}`,[`${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.address))}`]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.address))}`,[`${(0,p.nameof)((e=>e.content))}.@type`]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.content))}.@type`,[`${(0,p.nameof)((e=>e.content))}.body`]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.content))}.body`,[`${(0,p.nameof)((e=>e.content))}.subject`]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.content))}.subject`},custom:{[`${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.relationshipId))}`]:(e,t)=>{e[(0,p.nameof)((e=>e.relationshipIds))]={$containsAny:Array.isArray(t)?t:[t]}},[(0,p.nameof)((e=>e.attachments))]:(e,t)=>{e[`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.attachments))}`]={$containsAny:Array.isArray(t)?t:[t]}},participant:(e,t)=>{let r;if(Array.isArray(t)){if(0===t.length)return;r={};for(const e of t){const t=i.queryTranslator.parseString(e,!0);switch(t.field){case"$containsAny":case"$containsNone":r[t.field]=r[t.field]||[],r[t.field].push(t.value);break;default:r[t.field]=t.value}}}else r=i.queryTranslator.parseStringVal(t);e.$or=[{[`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdBy))}`]:r},{[`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.recipients))}.${(0,p.nameof)((e=>e.address))}`]:r}]}}}),t.GetMessagesUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.MessageController,y])],h)},6881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageMapper=void 0;const i=r(9663),n=r(7049),s=r(5076);t.MessageMapper=class MessageMapper{static toDownloadAttachmentResponse(e,t){if(!t.cache)throw n.RuntimeErrors.general.cacheEmpty(i.File,t.id.toString());return{content:e.buffer,filename:t.cache.filename?t.cache.filename:t.id.toString(),mimetype:t.cache.mimetype}}static toMessageWithAttachmentsDTO(e,t){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Message,e.id.toString());return{id:e.id.toString(),content:e.cache.content.toJSON(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),recipients:e.cache.recipients.map(((t,r)=>this.toRecipient(t,e.relationshipIds[r]))),createdAt:e.cache.createdAt.toString(),attachments:t.map((e=>s.FileMapper.toFileDTO(e))),isOwn:e.isOwn}}static toMessageDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Message,e.id.toString());return{id:e.id.toString(),content:e.cache.content.toJSON(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),recipients:e.cache.recipients.map(((t,r)=>this.toRecipient(t,e.relationshipIds[r]))),createdAt:e.cache.createdAt.toString(),attachments:e.cache.attachments.map((e=>e.toString())),isOwn:e.isOwn}}static toMessageDTOList(e){return e.map((e=>this.toMessageDTO(e)))}static toRecipient(e,t){return{address:e.address.toString(),receivedAt:e.receivedAt?.toString(),receivedByDevice:e.receivedByDevice?.toString(),relationshipId:t.toString()}}}},8400:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SendMessageUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(6881);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("SendMessageRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class SendMessageUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.messageController=e,this.fileController=t,this.accountController=r}async executeInternal(e){const t=await this.transformAttachments(e.attachments);if(t.isError)return o.Result.fail(t.error);const r=await this.messageController.sendMessage({recipients:e.recipients.map((e=>a.CoreAddress.from(e))),content:e.content,attachments:t.value});return await this.accountController.syncDatawallet(),o.Result.ok(p.MessageMapper.toMessageDTO(r))}async transformAttachments(e){if(!e||0===e.length)return o.Result.ok([]);const t=[];for(const r of e){const e=await this.fileController.getFile(a.CoreId.from(r));if(!e)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.File));t.push(e)}return o.Result.ok(t)}};t.SendMessageUseCase=d,t.SendMessageUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.MessageController,a.FileController,a.AccountController,l])],d)},2290:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(4860),t),n(r(9558),t),n(r(978),t),n(r(9231),t),n(r(6881),t),n(r(8400),t)},8580:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOwnRelationshipTemplateUseCase=void 0;const o=r(194),a=r(5172),c=r(3850),u=r(5030),p=r(9663),l=r(8565),d=r(4714),f=r(7071),y=r(7049),h=r(8434);let g=class Validator extends y.SchemaValidator{constructor(e){super(e.getSchema("CreateOwnRelationshipTemplateRequest"))}validate(e){const t=super.validate(e);return t.isValid()?(l.DateTime.fromISO(e.expiresAt)<=l.DateTime.utc()&&t.addFailure(new y.ValidationFailure(y.RuntimeErrors.general.invalidPropertyValue(`'${(0,d.nameof)((e=>e.expiresAt))}' must be in the future`),(0,d.nameof)((e=>e.expiresAt)))),t):t}};g=i([s(0,f.Inject),n("design:paramtypes",[y.SchemaRepository])],g);let m=class CreateOwnRelationshipTemplateUseCase extends y.UseCase{constructor(e,t,r,i){super(i),this.templateController=e,this.accountController=t,this.outgoingRequestsController=r}async executeInternal(e){const t=await this.validateRelationshipTemplateContent(e.content);if(t)return a.Result.fail(t);const r=await this.templateController.sendRelationshipTemplate({content:e.content,expiresAt:p.CoreDate.from(e.expiresAt),maxNumberOfAllocations:e.maxNumberOfAllocations});return await this.accountController.syncDatawallet(),a.Result.ok(h.RelationshipTemplateMapper.toRelationshipTemplateDTO(r))}async validateRelationshipTemplateContent(e){const t=o.Serializable.fromUnknown(e);if(!(t instanceof u.RelationshipTemplateContent))return;const r=await this.outgoingRequestsController.canCreate({content:t.onNewRelationship});if(r.isError())return r.error;if(t.onExistingRelationship){const e=await this.outgoingRequestsController.canCreate({content:t.onExistingRelationship});if(e.isError())return e.error}}};t.CreateOwnRelationshipTemplateUseCase=m,t.CreateOwnRelationshipTemplateUseCase=m=i([s(0,f.Inject),s(1,f.Inject),s(2,f.Inject),s(3,f.Inject),n("design:paramtypes",[p.RelationshipTemplateController,p.AccountController,c.OutgoingRequestsController,g])],m)},7921:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateQrCodeForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateQrCodeForOwnTemplateRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateQrCodeForOwnTemplateUseCase extends u.UseCase{constructor(e,t){super(t),this.templateController=e}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateQRCodeForPeerTemplate());const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};t.CreateQrCodeForOwnTemplateUseCase=l,t.CreateQrCodeForOwnTemplateUseCase=l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,p])],l)},7255:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenForOwnTemplateRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateTokenForOwnTemplateUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.templateController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const r=a.TokenContentRelationshipTemplate.from({templateId:t.id,secretKey:t.secretKey}),i=e.ephemeral??!0,n=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),s=e.expiresAt?a.CoreDate.from(e.expiresAt):n,c=await this.tokenController.sendToken({content:r,expiresAt:s,ephemeral:i});return i||await this.accountController.syncDatawallet(),o.Result.ok(p.TokenMapper.toTokenDTO(c,i))}};t.CreateTokenForOwnTemplateUseCase=d,t.CreateTokenForOwnTemplateUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,a.TokenController,a.AccountController,l])],d)},3683:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateTokenQrCodeForOwnTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateTokenQrCodeForOwnTemplateRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class CreateTokenQrCodeForOwnTemplateUseCase extends u.UseCase{constructor(e,t,r){super(r),this.templateController=e,this.tokenController=t}async executeInternal(e){const t=await this.templateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));if(!t.isOwn)return o.Result.fail(u.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());const r=a.TokenContentRelationshipTemplate.from({templateId:t.id,secretKey:t.secretKey}),i=t.cache?.expiresAt??a.CoreDate.utc().add({days:12}),n=e.expiresAt?a.CoreDate.from(e.expiresAt):i,s=await this.tokenController.sendToken({content:r,expiresAt:n,ephemeral:!0}),c=await u.QRCode.forTruncateable(s);return o.Result.ok({qrCodeBytes:c.asBase64()})}};t.CreateTokenQrCodeForOwnTemplateUseCase=l,t.CreateTokenQrCodeForOwnTemplateUseCase=l=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,a.TokenController,p])],l)},2603:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipTemplateUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(8434);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipTemplateRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetRelationshipTemplateUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipTemplateController=e}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(a.CoreId.from(e.id));return t?o.Result.ok(p.RelationshipTemplateMapper.toRelationshipTemplateDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate))}};t.GetRelationshipTemplateUseCase=d,t.GetRelationshipTemplateUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipTemplateController,l])],d)},1371:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipTemplatesUseCase=void 0;const a=r(2937),c=r(5172),u=r(9663),p=r(4714),l=r(7071),d=r(7049),f=r(8434);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipTemplatesRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetRelationshipTemplatesUseCase extends d.UseCase{constructor(e,t){super(t),this.relationshipTemplateController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,p.nameof)((e=>e.isOwn))]=e.ownerRestriction===d.OwnerRestriction.Own);const r=await this.relationshipTemplateController.getRelationshipTemplates(t);return c.Result.ok(f.RelationshipTemplateMapper.toRelationshipTemplateDTOList(r))}};t.GetRelationshipTemplatesUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.isOwn))]:!0,[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.expiresAt))]:!0,[(0,p.nameof)((e=>e.createdBy))]:!0,[(0,p.nameof)((e=>e.createdByDevice))]:!0,[(0,p.nameof)((e=>e.maxNumberOfAllocations))]:!0},alias:{[(0,p.nameof)((e=>e.isOwn))]:(0,p.nameof)((e=>e.isOwn)),[(0,p.nameof)((e=>e.createdAt))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdAt))}`,[(0,p.nameof)((e=>e.expiresAt))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.expiresAt))}`,[(0,p.nameof)((e=>e.createdBy))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdBy))}`,[(0,p.nameof)((e=>e.createdByDevice))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.createdByDevice))}`,[(0,p.nameof)((e=>e.maxNumberOfAllocations))]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.maxNumberOfAllocations))}`}}),t.GetRelationshipTemplatesUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.RelationshipTemplateController,y])],h)},3186:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerRelationshipTemplateUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(8434);function isLoadPeerRelationshipTemplateViaSecret(e){return"id"in e&&"secretKey"in e}function isLoadPeerRelationshipTemplateViaReference(e){return"reference"in e}let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerRelationshipTemplateRequest")),this.loadViaSecretSchema=e.getSchema("LoadPeerRelationshipTemplateViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("LoadPeerRelationshipTemplateViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new p.ValidationResult;if(isLoadPeerRelationshipTemplateViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isLoadPeerRelationshipTemplateViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new p.ValidationResult;return t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class LoadPeerRelationshipTemplateUseCase extends p.UseCase{constructor(e,t,r,i){super(i),this.templateController=e,this.tokenController=t,this.accountController=r}async executeInternal(e){let t;if(isLoadPeerRelationshipTemplateViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.loadTemplate(c.CoreId.from(e.id),r)}else{if(!isLoadPeerRelationshipTemplateViaReference(e))throw new Error("Invalid request format.");t=await this.loadRelationshipTemplateFromReference(e.reference)}return await this.accountController.syncDatawallet(),t}async loadRelationshipTemplateFromReference(e){if(e.startsWith(p.Base64ForIdPrefix.RelationshipTemplate))return await this.loadRelationshipTemplateFromRelationshipTemplateReference(e);if(e.startsWith(p.Base64ForIdPrefix.Token))return await this.loadRelationshipTemplateFromTokenReference(e);throw p.RuntimeErrors.relationshipTemplates.invalidReference(e)}async loadRelationshipTemplateFromRelationshipTemplateReference(e){const t=await this.templateController.loadPeerRelationshipTemplateByTruncated(e);return o.Result.ok(l.RelationshipTemplateMapper.toRelationshipTemplateDTO(t))}async loadRelationshipTemplateFromTokenReference(e){const t=await this.tokenController.loadPeerTokenByTruncated(e,!0);if(!t.cache)throw p.RuntimeErrors.general.cacheEmpty(c.Token,t.id.toString());if(!(t.cache.content instanceof c.TokenContentRelationshipTemplate))return o.Result.fail(p.RuntimeErrors.general.invalidTokenContent());const r=t.cache.content;return await this.loadTemplate(r.templateId,r.secretKey)}async loadTemplate(e,t){const r=await this.templateController.loadPeerRelationshipTemplate(e,t);return o.Result.ok(l.RelationshipTemplateMapper.toRelationshipTemplateDTO(r))}};t.LoadPeerRelationshipTemplateUseCase=f,t.LoadPeerRelationshipTemplateUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),s(3,u.Inject),n("design:paramtypes",[c.RelationshipTemplateController,c.TokenController,c.AccountController,d])],f)},8434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipTemplateMapper=void 0;const i=r(9663),n=r(7049);t.RelationshipTemplateMapper=class RelationshipTemplateMapper{static toRelationshipTemplateDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.RelationshipTemplate,e.id.toString());return{id:e.id.toString(),isOwn:e.isOwn,createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),createdAt:e.cache.createdAt.toString(),content:e.cache.content.toJSON(),expiresAt:e.cache.expiresAt?.toString(),maxNumberOfAllocations:e.cache.maxNumberOfAllocations,secretKey:e.secretKey.toBase64(!1),truncatedReference:e.truncate()}}static toRelationshipTemplateDTOList(e){return e.map((e=>this.toRelationshipTemplateDTO(e)))}}},3084:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(8580),t),n(r(7921),t),n(r(7255),t),n(r(3683),t),n(r(2603),t),n(r(1371),t),n(r(3186),t),n(r(8434),t)},3018:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("AcceptRelationshipChangeRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class AcceptRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.acceptChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(i))}};t.AcceptRelationshipChangeUseCase=d,t.AcceptRelationshipChangeUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,l])],d)},3986:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateRelationshipUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("CreateRelationshipRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class CreateRelationshipUseCase extends u.UseCase{constructor(e,t,r,i){super(i),this.relationshipsController=e,this.relationshipTemplateController=t,this.accountController=r}async executeInternal(e){const t=await this.relationshipTemplateController.getRelationshipTemplate(a.CoreId.from(e.templateId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipTemplate));const r=await this.relationshipsController.sendRelationship({template:t,content:e.content});return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(r))}};t.CreateRelationshipUseCase=d,t.CreateRelationshipUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),s(3,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.RelationshipTemplateController,a.AccountController,l])],d)},1041:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetAttributesForRelationshipUseCase=void 0;const o=r(5172),a=r(3850),c=r(9663),u=r(4714),p=r(7071),l=r(7049),d=r(3742);let f=class Validator extends l.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipRequest"))}};f=i([s(0,p.Inject),n("design:paramtypes",[l.SchemaRepository])],f);let y=class GetAttributesForRelationshipUseCase extends l.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.attributesController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(c.CoreId.from(e.id));if(!t)return o.Result.fail(l.RuntimeErrors.general.recordNotFound(c.Relationship));const r=t.peer.address.toString(),i={$or:[{[`${(0,u.nameof)((e=>e.content))}.${(0,u.nameof)((e=>e.owner))}`]:r},{[`${(0,u.nameof)((e=>e.shareInfo))}.${(0,u.nameof)((e=>e.peer))}`]:r}]},n=await this.attributesController.getLocalAttributes(i,e.hideTechnical);return o.Result.ok(d.AttributeMapper.toAttributeDTOList(n))}};t.GetAttributesForRelationshipUseCase=y,t.GetAttributesForRelationshipUseCase=y=i([s(0,p.Inject),s(1,p.Inject),s(2,p.Inject),n("design:paramtypes",[c.RelationshipsController,a.AttributesController,f])],y)},9456:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetRelationshipUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.id));return t?o.Result.ok(p.RelationshipMapper.toRelationshipDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};t.GetRelationshipUseCase=d,t.GetRelationshipUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipsController,l])],d)},215:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipByAddressUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipByAddressRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetRelationshipByAddressUseCase extends u.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=await this.relationshipsController.getRelationshipToIdentity(a.CoreAddress.from(e.address));return t?o.Result.ok(p.RelationshipMapper.toRelationshipDTO(t)):o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship))}};t.GetRelationshipByAddressUseCase=d,t.GetRelationshipByAddressUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.RelationshipsController,l])],d)},3457:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetRelationshipsUseCase=void 0;const a=r(2937),c=r(5172),u=r(9663),p=r(4714),l=r(7071),d=r(7049),f=r(4316);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetRelationshipsRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetRelationshipsUseCase extends d.UseCase{constructor(e,t){super(t),this.relationshipsController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query),r=await this.relationshipsController.getRelationships(t);return c.Result.ok(f.RelationshipMapper.toRelationshipDTOList(r))}};t.GetRelationshipsUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.peer))]:!0,[(0,p.nameof)((e=>e.status))]:!0,[`${(0,p.nameof)((e=>e.template))}.${(0,p.nameof)((e=>e.id))}`]:!0},alias:{[`${(0,p.nameof)((e=>e.template))}.${(0,p.nameof)((e=>e.id))}`]:`${(0,p.nameof)((e=>e.cache))}.${(0,p.nameof)((e=>e.template))}.${(0,p.nameof)((e=>e.id))}`,[(0,p.nameof)((e=>e.status))]:(0,p.nameof)((e=>e.status)),[(0,p.nameof)((e=>e.peer))]:`${(0,p.nameof)((e=>e.peer))}.${(0,p.nameof)((e=>e.address))}`}}),t.GetRelationshipsUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.RelationshipsController,y])],h)},2214:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RejectRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RejectRelationshipChangeRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class RejectRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.rejectChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(i))}};t.RejectRelationshipChangeUseCase=d,t.RejectRelationshipChangeUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,l])],d)},4316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RelationshipMapper=void 0;const i=r(9663),n=r(7049),s=r(8434);t.RelationshipMapper=class RelationshipMapper{static toRelationshipDTO(e){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Relationship,e.id.toString());return{id:e.id.toString(),template:s.RelationshipTemplateMapper.toRelationshipTemplateDTO(e.cache.template),status:e.status,peer:e.peer.address.toString(),peerIdentity:{address:e.peer.address.toString(),publicKey:e.peer.publicKey.toBase64(!1),realm:e.peer.realm},changes:e.cache.changes.map((e=>this.toRelationshipChangeDTO(e)))}}static toRelationshipDTOList(e){return e.map((e=>this.toRelationshipDTO(e)))}static toRelationshipChangeRequestDTO(e){return{createdBy:e.createdBy.toString(),createdByDevice:e.createdByDevice.toString(),createdAt:e.createdAt.toString(),content:e.content?.toJSON()}}static toRelationshipChangeResponseDTO(e){return{createdBy:e.createdBy.toString(),createdByDevice:e.createdByDevice.toString(),createdAt:e.createdAt.toString(),content:e.content?.toJSON()}}static toRelationshipChangeDTO(e){return{id:e.id.toString(),request:this.toRelationshipChangeRequestDTO(e.request),status:e.status,type:e.type,response:e.response?this.toRelationshipChangeResponseDTO(e.response):void 0}}}},5261:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RevokeRelationshipChangeUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(4316);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("RevokeRelationshipChangeRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class RevokeRelationshipChangeUseCase extends u.UseCase{constructor(e,t,r){super(r),this.relationshipsController=e,this.accountController=t}async executeInternal(e){const t=await this.relationshipsController.getRelationship(a.CoreId.from(e.relationshipId));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Relationship));if(!t.cache)return o.Result.fail(u.RuntimeErrors.general.cacheEmpty(a.Relationship,t.id.toString()));const r=t.cache.changes.find((t=>t.id.toString()===e.changeId));if(!r)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.RelationshipChange));const i=await this.relationshipsController.revokeChange(r,e.content);return await this.accountController.syncDatawallet(),o.Result.ok(p.RelationshipMapper.toRelationshipDTO(i))}};t.RevokeRelationshipChangeUseCase=d,t.RevokeRelationshipChangeUseCase=d=i([s(0,c.Inject),s(1,c.Inject),s(2,c.Inject),n("design:paramtypes",[a.RelationshipsController,a.AccountController,l])],d)},7831:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(3018),t),n(r(3986),t),n(r(1041),t),n(r(9456),t),n(r(215),t),n(r(3457),t),n(r(2214),t),n(r(4316),t),n(r(5261),t)},429:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOwnTokenUseCase=void 0;const o=r(194),a=r(5172),c=r(9663),u=r(8565),p=r(4714),l=r(7071),d=r(7049),f=r(7121);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("CreateOwnTokenRequest"))}validate(e){const t=super.validate(e);return t.isValid()?(u.DateTime.fromISO(e.expiresAt)<=u.DateTime.utc()&&t.addFailure(new d.ValidationFailure(d.RuntimeErrors.general.invalidPropertyValue(`'${(0,p.nameof)((e=>e.expiresAt))}' must be in the future`),(0,p.nameof)((e=>e.expiresAt)))),t):t}};y=i([s(0,l.Inject),n("design:paramtypes",[d.SchemaRepository])],y);let h=class CreateOwnTokenUseCase extends d.UseCase{constructor(e,t,r){super(r),this.tokenController=e,this.accountController=t}async executeInternal(e){let t;try{t=o.Serializable.fromUnknown(e.content)}catch{throw d.RuntimeErrors.general.invalidTokenContent()}const r=await this.tokenController.sendToken({content:t,expiresAt:c.CoreDate.from(e.expiresAt),ephemeral:e.ephemeral});return e.ephemeral||await this.accountController.syncDatawallet(),a.Result.ok(f.TokenMapper.toTokenDTO(r,e.ephemeral))}};t.CreateOwnTokenUseCase=h,t.CreateOwnTokenUseCase=h=i([s(0,l.Inject),s(1,l.Inject),s(2,l.Inject),n("design:paramtypes",[c.TokenController,c.AccountController,y])],h)},7896:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetQRCodeForTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049);let p=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetQRCodeForTokenRequest"))}};p=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],p);let l=class GetQRCodeForTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=await this.tokenController.getToken(a.CoreId.from(e.id));if(!t)return o.Result.fail(u.RuntimeErrors.general.recordNotFound(a.Token));const r=await u.QRCode.forTruncateable(t);return o.Result.ok({qrCodeBytes:r.asBase64()})}};t.GetQRCodeForTokenUseCase=l,t.GetQRCodeForTokenUseCase=l=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.TokenController,p])],l)},858:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetTokenUseCase=void 0;const o=r(5172),a=r(9663),c=r(7071),u=r(7049),p=r(7121);let l=class Validator extends u.SchemaValidator{constructor(e){super(e.getSchema("GetTokenRequest"))}};l=i([s(0,c.Inject),n("design:paramtypes",[u.SchemaRepository])],l);let d=class GetTokenUseCase extends u.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=await this.tokenController.getToken(a.CoreId.from(e.id));return t?o.Result.ok(p.TokenMapper.toTokenDTO(t,!1)):o.Result.fail(u.RuntimeErrors.general.recordNotFound("Token"))}};t.GetTokenUseCase=d,t.GetTokenUseCase=d=i([s(0,c.Inject),s(1,c.Inject),n("design:paramtypes",[a.TokenController,l])],d)},2093:function(e,t,r){"use strict";var i,n=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.GetTokensUseCase=void 0;const a=r(2937),c=r(5172),u=r(9663),p=r(4714),l=r(7071),d=r(7049),f=r(7121);let y=class Validator extends d.SchemaValidator{constructor(e){super(e.getSchema("GetTokensRequest"))}};y=n([o(0,l.Inject),s("design:paramtypes",[d.SchemaRepository])],y);let h=i=class GetTokensUseCase extends d.UseCase{constructor(e,t){super(t),this.tokenController=e}async executeInternal(e){const t=i.queryTranslator.parse(e.query);e.ownerRestriction&&(t[(0,p.nameof)((e=>e.isOwn))]=e.ownerRestriction===d.OwnerRestriction.Own);const r=await this.tokenController.getTokens(t);return c.Result.ok(f.TokenMapper.toTokenDTOList(r,!1))}};t.GetTokensUseCase=h,h.queryTranslator=new a.QueryTranslator({whitelist:{[(0,p.nameof)((e=>e.createdAt))]:!0,[(0,p.nameof)((e=>e.createdBy))]:!0,[(0,p.nameof)((e=>e.createdByDevice))]:!0,[(0,p.nameof)((e=>e.expiresAt))]:!0},alias:{[(0,p.nameof)((e=>e.createdAt))]:`${(0,p.nameof)((e=>e.cache))}.${[(0,p.nameof)((e=>e.createdAt))]}`,[(0,p.nameof)((e=>e.createdBy))]:`${(0,p.nameof)((e=>e.cache))}.${[(0,p.nameof)((e=>e.createdBy))]}`,[(0,p.nameof)((e=>e.createdByDevice))]:`${(0,p.nameof)((e=>e.cache))}.${[(0,p.nameof)((e=>e.createdByDevice))]}`,[(0,p.nameof)((e=>e.expiresAt))]:`${(0,p.nameof)((e=>e.cache))}.${[(0,p.nameof)((e=>e.expiresAt))]}`}}),t.GetTokensUseCase=h=i=n([o(0,l.Inject),o(1,l.Inject),s("design:paramtypes",[u.TokenController,y])],h)},8442:function(e,t,r){"use strict";var i=this&&this.__decorate||function(e,t,r,i){var n,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LoadPeerTokenUseCase=void 0;const o=r(5172),a=r(2890),c=r(9663),u=r(7071),p=r(7049),l=r(7121);function isLoadPeerTokenViaSecret(e){return"id"in e&&"secretKey"in e}function isLoadPeerTokenViaReference(e){return"reference"in e}let d=class Validator extends p.SchemaValidator{constructor(e){super(e.getSchema("LoadPeerTokenRequest")),this.loadViaSecretSchema=e.getSchema("LoadPeerTokenViaSecretRequest"),this.loadViaReferenceSchema=e.getSchema("LoadPeerTokenViaReferenceRequest")}validate(e){if(this.schema.validate(e).isValid)return new p.ValidationResult;if(isLoadPeerTokenViaReference(e))return this.convertValidationResult(this.loadViaReferenceSchema.validate(e));if(isLoadPeerTokenViaSecret(e))return this.convertValidationResult(this.loadViaSecretSchema.validate(e));const t=new p.ValidationResult;return t.addFailure(new p.ValidationFailure(p.RuntimeErrors.general.invalidPayload())),t}};d=i([s(0,u.Inject),n("design:paramtypes",[p.SchemaRepository])],d);let f=class LoadPeerTokenUseCase extends p.UseCase{constructor(e,t,r){super(r),this.tokenController=e,this.accountController=t}async executeInternal(e){let t;if(isLoadPeerTokenViaSecret(e)){const r=a.CryptoSecretKey.fromBase64(e.secretKey);t=await this.tokenController.loadPeerToken(c.CoreId.from(e.id),r,e.ephemeral)}else{if(!isLoadPeerTokenViaReference(e))throw new Error("Invalid request format.");t=await this.tokenController.loadPeerTokenByTruncated(e.reference,e.ephemeral)}return e.ephemeral||await this.accountController.syncDatawallet(),o.Result.ok(l.TokenMapper.toTokenDTO(t,e.ephemeral))}};t.LoadPeerTokenUseCase=f,t.LoadPeerTokenUseCase=f=i([s(0,u.Inject),s(1,u.Inject),s(2,u.Inject),n("design:paramtypes",[c.TokenController,c.AccountController,d])],f)},7121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenMapper=void 0;const i=r(9663),n=r(7049);class TokenMapper{static toTokenDTO(e,t){if(!e.cache)throw n.RuntimeErrors.general.cacheEmpty(i.Token,e.id.toString());const r=e.toTokenReference();return{id:e.id.toString(),createdBy:e.cache.createdBy.toString(),createdByDevice:e.cache.createdByDevice.toString(),content:e.cache.content.toJSON(),createdAt:e.cache.createdAt.toString(),expiresAt:e.cache.expiresAt.toString(),secretKey:e.secretKey.toBase64(!1),truncatedReference:r.truncate(),isEphemeral:t}}static toTokenDTOList(e,t){return e.map((e=>TokenMapper.toTokenDTO(e,t)))}}t.TokenMapper=TokenMapper},5631:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(429),t),n(r(7896),t),n(r(858),t),n(r(2093),t),n(r(8442),t),n(r(7121),t)},9126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryTranslator=void 0;class QueryTranslator{static defaultKeyRegex=/^[a-zA-Z_@][a-zA-Z@0-9-_]*(\.[a-zA-Z_@][a-zA-Z@0-9-_]*)*$/;static defaultValRegex=void 0;static defaultArrRegex=/^[a-zA-Zæøå0-9-_.]+(\[])?$/i;ops;alias;blacklist;whitelist;custom;string;keyRegex;valRegex;arrRegex;constructor(e={}){this.ops=e.ops??["!","^","$","~",">","<","$containsAny","$containsNone"],this.alias=e.alias??{},this.blacklist=e.blacklist??{},this.whitelist=e.whitelist??{},this.custom=e.custom??{},e.string=e.string??{},this.string=e.string,this.string.toBoolean="boolean"!=typeof e.string.toBoolean||e.string.toBoolean,this.string.toNumber="boolean"!=typeof e.string.toNumber||e.string.toNumber,this.keyRegex=e.keyRegex??QueryTranslator.defaultKeyRegex,this.valRegex=e.valRegex??QueryTranslator.defaultValRegex,this.arrRegex=e.arrRegex??QueryTranslator.defaultArrRegex}static setDefaultKeyRegex(e){QueryTranslator.defaultKeyRegex=e}static setDefaultValRegex(e){QueryTranslator.defaultValRegex=e}static setDefaultArrRegex(e){QueryTranslator.defaultArrRegex=e}parseString(e,t){let r=e[0]||"";const i="="===e[1];let n=e.substr(i?2:1)||"";const s=this.parseStringVal(n),o={op:r,org:n,value:s};switch(r){case"!":t?o.field="$containsNone":""===n?(o.field="$exists",o.value=!1):o.field="$ne";break;case">":o.field=i?"$gte":"$gt";break;case"<":o.field=i?"$lte":"$lt";break;case"^":case"$":case"~":switch(o.field="$regex",o.options="i",o.value=this.valRegex?n.replace(this.valRegex,""):o.value.toString(),r){case"^":o.value=`^${s}`;break;case"$":o.value=`${s}$`}break;default:o.org=n=r+n,o.op=r="",o.value=this.parseStringVal(n),t?o.field="$containsAny":""===n?(o.field="$exists",o.value=!0):o.field="$eq"}return o.parsed={},o.parsed[o.field]=o.value,o.options&&(o.parsed.$options=o.options),o}parseStringVal(e){return!(!this.string.toBoolean||"true"!==e.toLowerCase())||(!this.string.toBoolean||"false"!==e.toLowerCase())&&(this.string.toNumber&&!isNaN(parseInt(e,10))&&+e-+e+1>=0?parseFloat(e):e)}parse(e){if(!e)return{};const t={};for(let r of Object.keys(e)){if("__proto__"===r)continue;const i=e[r];if(Array.isArray(i)&&(r=r.replace(/\[]$/,"")),(!Object.keys(this.whitelist).length||this.whitelist[r])&&!this.blacklist[r]&&(this.alias[r]&&(r=this.alias[r]),("string"!=typeof i||this.keyRegex.test(r))&&(!Array.isArray(i)||this.arrRegex.test(r))))if("function"!=typeof this.custom[r])if(Array.isArray(i)){if(this.ops.includes("$containsAny")&&i.length>0){t[r]={};for(const e of i)if(this.ops.includes(e[0])){const i=this.parseString(e,!0);switch(i.field){case"$containsAny":case"$containsNone":t[r][i.field]=t[r][i.field]||[],t[r][i.field].push(i.value);break;case"$regex":t[r].$regex=i.value,t[r].$options=i.options;break;default:t[r][i.field]=i.value}}else t[r].$containsAny=t[r].$containsAny||[],t[r].$containsAny.push(this.parseStringVal(e))}}else"string"==typeof i&&(i?this.ops.includes(i[0])?t[r]=this.parseString(i).parsed:t[r]=this.parseStringVal(i):t[r]={$exists:!0});else this.custom[r].apply(null,[t,i])}return t}}t.QueryTranslator=QueryTranslator},2937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryTranslator=void 0;var i=r(9126);Object.defineProperty(t,"QueryTranslator",{enumerable:!0,get:function(){return i.QueryTranslator}})},1174:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9159:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventNamespaceFromObject=t.EventBus=void 0;t.EventBus=class EventBus{},t.getEventNamespaceFromObject=function getEventNamespaceFromObject(e){return e.namespace}},5970:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionTargetInfo=void 0;class SubscriptionTargetInfo{namespace;constructor(e){this.namespace=e}static from(e){return e instanceof Function?new ConstructorSubscriptionTargetInfo(e):new NamespaceSubscriptionTargetInfo(e)}}t.SubscriptionTargetInfo=SubscriptionTargetInfo;class ConstructorSubscriptionTargetInfo extends SubscriptionTargetInfo{constructorFunction;constructor(e){super(function getEventNamespaceFromClass(e){return e.namespace}(e)),this.constructorFunction=e}isCompatibleWith(e){return e instanceof this.constructorFunction}}class NamespaceSubscriptionTargetInfo extends SubscriptionTargetInfo{constructor(e){super(e)}isCompatibleWith(e){return!0}}},9729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter2EventBus=void 0;const i=r(6387);r(8660);const n=r(9159),s=r(5970);t.EventEmitter2EventBus=class EventEmitter2EventBus{errorCallback;emitter;listeners=new Map;nextId=0;invocationPromises=[];constructor(e,t){this.errorCallback=e,this.emitter=new i.EventEmitter2({maxListeners:50,verboseMemoryLeak:!0,...t,wildcard:!0})}subscribe(e,t){return this.registerHandler(e,t)}subscribeOnce(e,t){return this.registerHandler(e,t,!0)}unsubscribe(e){return this.unregisterHandler(e)}registerHandler(e,t,r=!1){const i=s.SubscriptionTargetInfo.from(e),n=this.nextId++,handlerWrapper=async e=>{if(!i.isCompatibleWith(e))return;const s=(async()=>await t(e))();this.invocationPromises.push(s),await s.catch((e=>this.errorCallback(e,i.namespace))),this.invocationPromises=this.invocationPromises.filter((e=>e!==s)),r&&this.listeners.delete(n)};if(r){const e=this.emitter.once(i.namespace,handlerWrapper,{objectify:!0});return this.listeners.set(n,e),n}const o=this.emitter.on(i.namespace,handlerWrapper,{objectify:!0});return this.listeners.set(n,o),n}unregisterHandler(e){const t=this.listeners.get(e);return!!t&&(t.off(),this.listeners.delete(e),!0)}publish(e){const t=(0,n.getEventNamespaceFromObject)(e);if(!t)throw Error("The event needs a namespace. Use the EventNamespace-decorator in order to define a namespace for a event.");this.emitter.emit(t,e)}async close(e){this.emitter.removeAllListeners();const t=Promise.all(this.invocationPromises).catch((()=>{}));if(!e)return void await t;let r;const i=new Promise(((t,i)=>{r=setTimeout((()=>{i(new Error("timeout exceeded while waiting for events to process"))}),e)}));await Promise.race([t,i]),clearTimeout(r)}}},9256:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9159),t),n(r(9729),t)},5917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataEvent=void 0;const i=r(8267);class DataEvent extends i.Event{data;constructor(e,t){super(e),this.data=t}}t.DataEvent=DataEvent},8267:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;t.Event=class Event{namespace;constructor(e){this.namespace=e}}},2636:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(5917),t),n(r(8267),t)},5172:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(9256),t),n(r(2636),t),n(r(9855),t),n(r(1809),t),n(r(4569),t),n(r(1174),t),n(r(7226),t),n(r(7374),t)},9855:function(e,t,r){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.log=void 0;const n=i(r(4530));t.log=function log(e){return function(t,r,i){const s=i.value;return i.value=function(...t){const i=this;try{e?.logParams?i.log.trace(`Calling ${r}(${t.map((e=>(0,n.default)(e))).join(", ")})`):i.log.trace(`Calling ${r}`);const o=s.apply(this,t);return e?.logReturnValue?i.log.trace(`Returning from ${r} with: ${(0,n.default)(o)}`):i.log.trace(`Returning from ${r}`),o}catch(e){throw e instanceof Error&&e.stack&&(e.stack=e.stack.split("\n").filter((e=>!e.includes(".propertyDescriptorDoNotChangeMyNamePlease.value"))).join("\n")),i.log.error(`Error in ${r}:`,e),e}},i}}},1809:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.measureExcecutionTime=void 0,t.measureExcecutionTime=function measureExcecutionTime(e,t,r){const i=r.value;return r.value=async function(...e){const t=Date.now(),r=await i.apply(this,e),n=Date.now();return console.info(`Execution time: ${n-t}ms`),r},r}},4569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomString=void 0,t.randomString=function randomString(e,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"){let r="";const i=t.length;for(let n=0;n<e;n++)r+=t.charAt(Math.floor(Math.random()*i));return r}},7807:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationError=void 0;class ApplicationError extends Error{code;data;constructor(e,t,r){super(t),this.code=e,this.data=r}equals(e){return this.code===e.code}toString(){return JSON.stringify({code:this.code,message:this.message,data:this.data},void 0,2)}}t.ApplicationError=ApplicationError},9278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Result=void 0;class Result{_isSuccess;_error;_value;constructor(e,t,r){if(e&&r)throw new Error("InvalidOperation: A result cannot be successful and contain an error");if(!e&&!r)throw new Error("InvalidOperation: A failing result needs to contain an error");if(void 0!==t&&!e)throw new Error("InvalidOperation: A value is only useful in case of a success.");this._value=t,this._isSuccess=e,this._error=r}get isSuccess(){return this._isSuccess}get isError(){return!this._isSuccess}get error(){return this._error}get value(){if(!this.isSuccess)throw new Error(`Can't get the value of an error result. Use 'error' instead. Root error: \r\n${this.error}`);return this._value}static ok(e){return new Result(!0,e)}static fail(e){return new Result(!1,void 0,e)}}t.Result=Result},7226:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(7807),t),n(r(9278),t)},7374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sleep=void 0,t.sleep=function sleep(e){return new Promise((t=>{setTimeout(t,e)}))}},7239:e=>{"use strict";function resolvePath(e,t,r=null){let i=e;for(const e of t){if(!Object.keys(i).includes(e))return r;i=i[e]}return i}function match(e,t,r,i=void 0){const n=[];for(let s=0;s<e.length;s++){const o=resolvePath(e[s],t,null);void 0!==i&&e[s].value["@type"]!==i||null!==o&&r(o)&&n.push(s)}return n}function peg$SyntaxError(e,t,r,i){var n=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(n,peg$SyntaxError.prototype),n.expected=t,n.found=r,n.location=i,n.name="SyntaxError",n}function peg$padEnd(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}!function peg$subclass(e,t){function C(){this.constructor=e}C.prototype=t.prototype,e.prototype=new C}(peg$SyntaxError,Error),peg$SyntaxError.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,i=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){i=e[r].text.split(/\r\n|\n|\r/g);break}var n=this.location.start,s=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(n):n,o=this.location.source+":"+s.line+":"+s.column;if(i){var a=this.location.end,c=peg$padEnd("",s.line.toString().length," "),u=i[n.line-1],p=(n.line===a.line?a.column:u.length+1)-n.column||1;t+="\n --\x3e "+o+"\n"+c+" |\n"+s.line+" | "+u+"\n"+c+" | "+peg$padEnd("",n.column-1," ")+peg$padEnd("",p,"^")}else t+="\n at "+o}return t},peg$SyntaxError.buildMessage=function(e,t){var r={literal:function(e){return'"'+literalEscape(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?classEscape(e[0])+"-"+classEscape(e[1]):classEscape(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function hex(e){return e.charCodeAt(0).toString(16).toUpperCase()}function literalEscape(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+hex(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+hex(e)}))}function classEscape(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+hex(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+hex(e)}))}function describeExpectation(e){return r[e.type](e)}return"Expected "+function describeExpected(e){var t,r,i=e.map(describeExpectation);if(i.sort(),i.length>0){for(t=1,r=1;t<i.length;t++)i[t-1]!==i[t]&&(i[r]=i[t],r++);i.length=r}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function describeFound(e){return e?'"'+literalEscape(e)+'"':"end of input"}(t)+" found."},e.exports={SyntaxError:peg$SyntaxError,parse:function peg$parse(e,t){var r,i={},n=(t=void 0!==t?t:{}).grammarSource,s={Expr:peg$parseExpr},o=peg$parseExpr,a="||",c="&&",u="!",p="(",l=")",d=".",f="#",y="'",h="\\\\",g="\\'",m=/^[=><~]/,v=/^[?]/,b=/^[^'\\]/,R=/^[^'\\ ]/,O=/^[a-z]/,S=/^[A-za-z0-9]/,I=/^[A-Z]/,P=/^[A-Za-z0-9]/,w=/^[ \t\n\r]/,j=peg$literalExpectation("||",!1),$=peg$literalExpectation("&&",!1),A=peg$literalExpectation("!",!1),N=peg$literalExpectation("(",!1),x=peg$literalExpectation(")",!1),T=peg$otherExpectation("metadata field term"),q=peg$literalExpectation(".",!1),E=peg$otherExpectation("tag term"),D=peg$literalExpectation("#",!1),M=peg$otherExpectation("primary field term"),k=peg$classExpectation(["=",">","<","~"],!1,!1),J=peg$classExpectation(["?"],!1,!1),F=peg$literalExpectation("'",!1),U=peg$literalExpectation("\\\\",!1),L=peg$literalExpectation("\\'",!1),V=peg$classExpectation(["'","\\"],!0,!1),B=peg$classExpectation(["'","\\"," "],!0,!1),H=peg$classExpectation([["a","z"]],!1,!1),z=peg$classExpectation([["A","z"],["a","z"],["0","9"]],!1,!1),G=peg$otherExpectation("attribute type"),Q=peg$classExpectation([["A","Z"]],!1,!1),K=peg$classExpectation([["A","Z"],["a","z"],["0","9"]],!1,!1),Z=peg$otherExpectation("whitespace"),W=peg$classExpectation([" ","\t","\n","\r"],!1,!1),peg$f0=function(e,t){return t.reduce(((e,t)=>function union(e,t){const r=Array.from(new Set([...e,...t]));return r.sort(((e,t)=>e-t)),r}(e,t)),e)},peg$f1=function(e,t){return t.reduce(((e,t)=>function intersect(e,...t){const r=[e,...t].reduce(((e,t)=>e.filter((e=>t.includes(e)))));return r.sort(((e,t)=>e-t)),r}(e,t)),e)},peg$f2=function(e){return function diffAsym(e,t){const r=e.filter((e=>!t.includes(e)));return r.sort(((e,t)=>e-t)),r}([...Array(t.attributes.length).keys()],e)},peg$f3=function(e,r,i){return match(t.attributes,[e,...r],i)},peg$f4=function(e){return match(t.attributes,["tags"],(t=>Array.isArray(t)&&t.includes(e)))},peg$f5=function(e,r,i){return match(t.attributes,["value",...r],i,e)},peg$f6=function(e,r){return match(t.attributes,["value","value"],r,e)},peg$f7=function(e){return match(t.attributes,["value","@type"],(t=>t===e))},peg$f8=function(e,t){switch(e){case"=":return e=>String(e)===t;case">":return e=>new Date(e)>=new Date(t);case"<":return e=>new Date(e)<=new Date(t);case"~":return e=>Array.isArray(e)&&e.includes(t)}},peg$f9=function(e){if("?"===e)return e=>Array.isArray(e)?e.length>0:"Object"===e.constructor.name?Object.keys(e).length>0:null!=e},peg$f10=function(e){return e.join("").replaceAll("\\\\","\\").replaceAll("\\'","'")},peg$f11=function(e){return e.join("").replaceAll("\\\\","\\").replaceAll("\\'","'")},Y=0,X=[{line:1,column:1}],ee=0,te=[],re=0;if("startRule"in t){if(!(t.startRule in s))throw new Error("Can't start parsing from rule \""+t.startRule+'".');o=s[t.startRule]}function peg$literalExpectation(e,t){return{type:"literal",text:e,ignoreCase:t}}function peg$classExpectation(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function peg$otherExpectation(e){return{type:"other",description:e}}function peg$computePosDetails(t){var r,i=X[t];if(i)return i;for(r=t-1;!X[r];)r--;for(i={line:(i=X[r]).line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return X[t]=i,i}function peg$computeLocation(e,t,r){var i=peg$computePosDetails(e),s=peg$computePosDetails(t),o={source:n,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:s.line,column:s.column}};return r&&n&&"function"==typeof n.offset&&(o.start=n.offset(o.start),o.end=n.offset(o.end)),o}function peg$fail(e){Y<ee||(Y>ee&&(ee=Y,te=[]),te.push(e))}function peg$buildStructuredError(e,t,r){return new peg$SyntaxError(peg$SyntaxError.buildMessage(e,t),e,t,r)}function peg$parseExpr(){var t,r,n,s,o,c,u,p;if(t=Y,(r=peg$parseExpr0())!==i){if(n=[],s=Y,o=[],(c=peg$parse_())!==i)for(;c!==i;)o.push(c),c=peg$parse_();else o=i;if(o!==i)if(e.substr(Y,2)===a?(c=a,Y+=2):(c=i,0===re&&peg$fail(j)),c!==i){if(u=[],(p=peg$parse_())!==i)for(;p!==i;)u.push(p),p=peg$parse_();else u=i;u!==i&&(p=peg$parseExpr0())!==i?s=p:(Y=s,s=i)}else Y=s,s=i;else Y=s,s=i;for(;s!==i;){if(n.push(s),s=Y,o=[],(c=peg$parse_())!==i)for(;c!==i;)o.push(c),c=peg$parse_();else o=i;if(o!==i)if(e.substr(Y,2)===a?(c=a,Y+=2):(c=i,0===re&&peg$fail(j)),c!==i){if(u=[],(p=peg$parse_())!==i)for(;p!==i;)u.push(p),p=peg$parse_();else u=i;u!==i&&(p=peg$parseExpr0())!==i?s=p:(Y=s,s=i)}else Y=s,s=i;else Y=s,s=i}t,t=peg$f0(r,n)}else Y=t,t=i;return t}function peg$parseExpr0(){var t,r,n,s,o,a,u,p;if(t=Y,(r=peg$parseExpr1())!==i){if(n=[],s=Y,o=[],(a=peg$parse_())!==i)for(;a!==i;)o.push(a),a=peg$parse_();else o=i;if(o!==i)if(e.substr(Y,2)===c?(a=c,Y+=2):(a=i,0===re&&peg$fail($)),a!==i){if(u=[],(p=peg$parse_())!==i)for(;p!==i;)u.push(p),p=peg$parse_();else u=i;u!==i&&(p=peg$parseExpr1())!==i?s=p:(Y=s,s=i)}else Y=s,s=i;else Y=s,s=i;for(;s!==i;){if(n.push(s),s=Y,o=[],(a=peg$parse_())!==i)for(;a!==i;)o.push(a),a=peg$parse_();else o=i;if(o!==i)if(e.substr(Y,2)===c?(a=c,Y+=2):(a=i,0===re&&peg$fail($)),a!==i){if(u=[],(p=peg$parse_())!==i)for(;p!==i;)u.push(p),p=peg$parse_();else u=i;u!==i&&(p=peg$parseExpr1())!==i?s=p:(Y=s,s=i)}else Y=s,s=i;else Y=s,s=i}t,t=peg$f1(r,n)}else Y=t,t=i;return t}function peg$parseExpr1(){var t,r,n;return t=Y,33===e.charCodeAt(Y)?(r=u,Y++):(r=i,0===re&&peg$fail(A)),r!==i&&(n=peg$parseExpr1())!==i?(t,t=peg$f2(n)):(Y=t,t=i),t===i&&(t=function peg$parseExpr2(){var t,r,n,s,o,a;t=Y,40===e.charCodeAt(Y)?(r=p,Y++):(r=i,0===re&&peg$fail(N));if(r!==i){if(n=[],(s=peg$parse_())!==i)for(;s!==i;)n.push(s),s=peg$parse_();else n=i;if(n!==i)if((s=peg$parseExpr())!==i){if(o=[],(a=peg$parse_())!==i)for(;a!==i;)o.push(a),a=peg$parse_();else o=i;o!==i?(41===e.charCodeAt(Y)?(a=l,Y++):(a=i,0===re&&peg$fail(x)),a!==i?t=s:(Y=t,t=i)):(Y=t,t=i)}else Y=t,t=i;else Y=t,t=i}else Y=t,t=i;t===i&&(t=function peg$parseTerm(){var t;t=function peg$parsePrimaryFieldTerm(){var t,r,n,s,o,a;if(re++,t=Y,r=peg$parseAttributeType(),r!==i){if(n=[],s=Y,46===e.charCodeAt(Y)?(o=d,Y++):(o=i,0===re&&peg$fail(q)),o!==i&&(a=peg$parsePathSegment())!==i?s=a:(Y=s,s=i),s!==i)for(;s!==i;)n.push(s),s=Y,46===e.charCodeAt(Y)?(o=d,Y++):(o=i,0===re&&peg$fail(q)),o!==i&&(a=peg$parsePathSegment())!==i?s=a:(Y=s,s=i);else n=i;n!==i&&(s=peg$parsePredicate())!==i?(t,t=peg$f5(r,n,s)):(Y=t,t=i)}else Y=t,t=i;t===i&&(t=Y,(r=peg$parseAttributeType())!==i&&(n=peg$parsePredicate())!==i?(t,t=peg$f6(r,n)):(Y=t,t=i),t===i&&(t=Y,(r=peg$parseAttributeType())!==i&&(t,r=peg$f7(r)),t=r));re--,t===i&&(r=i,0===re&&peg$fail(M));return t}(),t===i&&(t=function peg$parseMetadataFieldTerm(){var t,r,n,s,o,a;if(re++,t=Y,r=peg$parsePathSegment(),r!==i){for(n=[],s=Y,46===e.charCodeAt(Y)?(o=d,Y++):(o=i,0===re&&peg$fail(q)),o!==i&&(a=peg$parsePathSegment())!==i?s=a:(Y=s,s=i);s!==i;)n.push(s),s=Y,46===e.charCodeAt(Y)?(o=d,Y++):(o=i,0===re&&peg$fail(q)),o!==i&&(a=peg$parsePathSegment())!==i?s=a:(Y=s,s=i);(s=peg$parsePredicate())!==i?(t,t=peg$f3(r,n,s)):(Y=t,t=i)}else Y=t,t=i;re--,t===i&&(r=i,0===re&&peg$fail(T));return t}(),t===i&&(t=function peg$parseTagTerm(){var t,r,n;re++,t=Y,35===e.charCodeAt(Y)?(r=f,Y++):(r=i,0===re&&peg$fail(D));r!==i&&(n=peg$parsePredicateRHS())!==i?(t,t=peg$f4(n)):(Y=t,t=i);re--,t===i&&(r=i,0===re&&peg$fail(E));return t}()));return t}());return t}()),t}function peg$parsePredicate(){var t,r,n;return t=Y,m.test(e.charAt(Y))?(r=e.charAt(Y),Y++):(r=i,0===re&&peg$fail(k)),r!==i&&(n=peg$parsePredicateRHS())!==i?(t,t=peg$f8(r,n)):(Y=t,t=i),t===i&&(t=Y,v.test(e.charAt(Y))?(r=e.charAt(Y),Y++):(r=i,0===re&&peg$fail(J)),r!==i&&(t,r=peg$f9(r)),t=r),t}function peg$parsePredicateRHS(){var t,r,n,s;if(t=Y,39===e.charCodeAt(Y)?(r=y,Y++):(r=i,0===re&&peg$fail(F)),r!==i){for(n=[],e.substr(Y,2)===h?(s=h,Y+=2):(s=i,0===re&&peg$fail(U)),s===i&&(e.substr(Y,2)===g?(s=g,Y+=2):(s=i,0===re&&peg$fail(L)),s===i&&(b.test(e.charAt(Y))?(s=e.charAt(Y),Y++):(s=i,0===re&&peg$fail(V))));s!==i;)n.push(s),e.substr(Y,2)===h?(s=h,Y+=2):(s=i,0===re&&peg$fail(U)),s===i&&(e.substr(Y,2)===g?(s=g,Y+=2):(s=i,0===re&&peg$fail(L)),s===i&&(b.test(e.charAt(Y))?(s=e.charAt(Y),Y++):(s=i,0===re&&peg$fail(V))));39===e.charCodeAt(Y)?(s=y,Y++):(s=i,0===re&&peg$fail(F)),s!==i?(t,t=peg$f10(n)):(Y=t,t=i)}else Y=t,t=i;if(t===i){for(t=Y,r=[],e.substr(Y,2)===h?(n=h,Y+=2):(n=i,0===re&&peg$fail(U)),n===i&&(e.substr(Y,2)===g?(n=g,Y+=2):(n=i,0===re&&peg$fail(L)),n===i&&(R.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=i,0===re&&peg$fail(B))));n!==i;)r.push(n),e.substr(Y,2)===h?(n=h,Y+=2):(n=i,0===re&&peg$fail(U)),n===i&&(e.substr(Y,2)===g?(n=g,Y+=2):(n=i,0===re&&peg$fail(L)),n===i&&(R.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=i,0===re&&peg$fail(B))));t,t=r=peg$f11(r)}return t}function peg$parsePathSegment(){var t,r,n,s,o;if(t=Y,r=Y,O.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=i,0===re&&peg$fail(H)),n!==i){if(s=[],S.test(e.charAt(Y))?(o=e.charAt(Y),Y++):(o=i,0===re&&peg$fail(z)),o!==i)for(;o!==i;)s.push(o),S.test(e.charAt(Y))?(o=e.charAt(Y),Y++):(o=i,0===re&&peg$fail(z));else s=i;s!==i?r=n=[n,s]:(Y=r,r=i)}else Y=r,r=i;return t=r!==i?e.substring(t,Y):r}function peg$parseAttributeType(){var t,r,n,s,o;if(re++,t=Y,r=Y,I.test(e.charAt(Y))?(n=e.charAt(Y),Y++):(n=i,0===re&&peg$fail(Q)),n!==i){for(s=[],P.test(e.charAt(Y))?(o=e.charAt(Y),Y++):(o=i,0===re&&peg$fail(K));o!==i;)s.push(o),P.test(e.charAt(Y))?(o=e.charAt(Y),Y++):(o=i,0===re&&peg$fail(K));r=n=[n,s]}else Y=r,r=i;return t=r!==i?e.substring(t,Y):r,re--,t===i&&(r=i,0===re&&peg$fail(G)),t}function peg$parse_(){var t;return re++,w.test(e.charAt(Y))?(t=e.charAt(Y),Y++):(t=i,0===re&&peg$fail(W)),re--,t===i&&(i,0===re&&peg$fail(Z)),t}if((r=o())!==i&&Y===e.length)return r;throw r!==i&&Y<e.length&&peg$fail({type:"end"}),peg$buildStructuredError(te,ee<e.length?e.charAt(ee):null,ee<e.length?peg$computeLocation(ee,ee+1):peg$computeLocation(ee,ee))}}},2173:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.execute=void 0;const i=r(7239);t.execute=function execute(e,t){return(0,i.parse)(e,{attributes:t})},t.validate=function validate(e){try{return(0,i.parse)(e,{attributes:[]}),{isValid:!0}}catch(e){if(e instanceof i.SyntaxError){const t=e;return{isValid:!1,error:{message:t.message,location:{start:t.location.start,end:t.location.end}}}}return{isValid:!1,error:{message:JSON.stringify(e),location:{start:{column:0,line:0,offset:0},end:{column:0,line:0,offset:0}}}}}}},3351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(1581),n=r(3487),s=r(7023),o=r(4815),a=r(4181),c=r(2141),u="errorMessage",p=new i.Name("emUsed"),l={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,f=/\$\{([^}]+)\}/g,y=/^""\s*\+\s*|\s*\+\s*""$/g;function errorMessage(e){return{keyword:u,schemaType:["string","object"],post:!0,code(t){const{gen:r,data:h,schema:g,schemaValue:m,it:v}=t;if(!1===v.createErrors)return;const b=g,R=n.strConcat(c.default.instancePath,v.errorPath);function matchKeywordError(e,t){return n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${p}`,i._`${e}.instancePath === ${R}`,i._`${e}.keyword in ${t}`,i._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${v.errSchemaPath.length}))`)}function getTemplatesCode(e,t){const i=[];for(const r in e){const e=t[r];d.test(e)&&i.push([r,templateFunc(e)])}return r.object(...i)}function templateExpr(e){return d.test(e)?new s._Code(s.safeStringify(e).replace(f,((e,t)=>`" + JSON.stringify(${o.getData(t,v)}) + "`)).replace(y,"")):i.stringify(e)}function templateFunc(e){return i._`function(){return ${templateExpr(e)}}`}r.if(i._`${c.default.errors} > 0`,(()=>{if("object"==typeof b){const[s,o]=function keywordErrorsConfig(e){let t,r;for(const i in e){if("properties"===i||"items"===i)continue;const n=e[i];if("object"==typeof n){t||(t={});const e=t[i]={};for(const t in n)e[t]=[]}else r||(r={}),r[i]=[]}return[t,r]}(b);o&&function processKeywordErrors(n){const s=r.const("emErrors",i.stringify(n)),o=r.const("templates",getTemplatesCode(n,g));r.forOf("err",c.default.vErrors,(e=>r.if(matchKeywordError(e,s),(()=>r.code(i._`${s}[${e}.keyword].push(${e})`).assign(i._`${e}.${p}`,!0)))));const{singleError:u}=e;if(u){const e=r.let("message",i._`""`),n=r.let("paramsErrors",i._`[]`);loopErrors((t=>{r.if(e,(()=>r.code(i._`${e} += ${"string"==typeof u?u:";"}`))),r.code(i._`${e} += ${errMessage(t)}`),r.assign(n,i._`${n}.concat(${s}[${t}])`)})),a.reportError(t,{message:e,params:i._`{errors: ${n}}`})}else loopErrors((e=>a.reportError(t,{message:errMessage(e),params:i._`{errors: ${s}[${e}]}`})));function loopErrors(e){r.forIn("key",s,(t=>r.if(i._`${s}[${t}].length`,(()=>e(t)))))}function errMessage(e){return i._`${e} in ${o} ? ${o}[${e}]() : ${m}[${e}]`}}(o),s&&function processKeywordPropErrors(e){const n=r.const("emErrors",i.stringify(e)),s=[];for(const t in e)s.push([t,getTemplatesCode(e[t],g[t])]);const o=r.const("templates",r.object(...s)),u=r.scopeValue("obj",{ref:l,code:i.stringify(l)}),d=r.let("emPropParams"),f=r.let("emParamsErrors");r.forOf("err",c.default.vErrors,(e=>r.if(matchKeywordError(e,n),(()=>{r.assign(d,i._`${u}[${e}.keyword]`),r.assign(f,i._`${n}[${e}.keyword][${e}.params[${d}]]`),r.if(f,(()=>r.code(i._`${f}.push(${e})`).assign(i._`${e}.${p}`,!0)))})))),r.forIn("key",n,(e=>r.forIn("keyProp",i._`${n}[${e}]`,(s=>{r.assign(f,i._`${n}[${e}][${s}]`),r.if(i._`${f}.length`,(()=>{const n=r.const("tmpl",i._`${o}[${e}] && ${o}[${e}][${s}]`);a.reportError(t,{message:i._`${n} ? ${n}() : ${m}[${e}][${s}]`,params:i._`{errors: ${f}}`})}))}))))}(s),function processChildErrors(e){const{props:s,items:o}=e;if(!s&&!o)return;const l=i._`typeof ${h} == "object"`,d=i._`Array.isArray(${h})`,f=r.let("emErrors");let y,v;const b=r.let("templates");s&&o?(y=r.let("emChildKwd"),r.if(l),r.if(d,(()=>{init(o,g.items),r.assign(y,i.str`items`)}),(()=>{init(s,g.properties),r.assign(y,i.str`properties`)})),v=i._`[${y}]`):o?(r.if(d),init(o,g.items),v=i._`.items`):s&&(r.if(n.and(l,n.not(d))),init(s,g.properties),v=i._`.properties`);function init(e,t){r.assign(f,i.stringify(e)),r.assign(b,getTemplatesCode(e,t))}r.forOf("err",c.default.vErrors,(e=>function ifMatchesChildError(e,t,s){r.if(n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${p}`,i._`${e}.instancePath.indexOf(${R}) === 0`),(()=>{const n=r.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),o=r.const("emMatches",i._`${n}.exec(${e}.instancePath.slice(${R}.length))`),a=r.const("emChild",i._`${o} && ${o}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);r.if(i._`${a} !== undefined && ${a} in ${t}`,(()=>s(a)))}))}(e,f,(t=>r.code(i._`${f}[${t}].push(${e})`).assign(i._`${e}.${p}`,!0))))),r.forIn("key",f,(e=>r.if(i._`${f}[${e}].length`,(()=>{a.reportError(t,{message:i._`${e} in ${b} ? ${b}[${e}]() : ${m}${v}[${e}]`,params:i._`{errors: ${f}[${e}]}`}),r.assign(i._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,i._`${R} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),r.endIf()}(function childErrorsConfig({properties:e,items:t}){const r={};if(e){r.props={};for(const t in e)r.props[t]=[]}if(t){r.items={};for(let e=0;e<t.length;e++)r.items[e]=[]}return r}(b))}const s="string"==typeof b?b:b._;s&&function processAllErrors(e){const s=r.const("emErrs",i._`[]`);r.forOf("err",c.default.vErrors,(e=>r.if(function matchAnyError(e){return n.and(i._`${e}.keyword !== ${u}`,i._`!${e}.${p}`,n.or(i._`${e}.instancePath === ${R}`,n.and(i._`${e}.instancePath.indexOf(${R}) === 0`,i._`${e}.instancePath[${R}.length] === "/"`)),i._`${e}.schemaPath.indexOf(${v.errSchemaPath}) === 0`,i._`${e}.schemaPath[${v.errSchemaPath}.length] === "/"`)}(e),(()=>r.code(i._`${s}.push(${e})`).assign(i._`${e}.${p}`,!0))))),r.if(i._`${s}.length`,(()=>a.reportError(t,{message:templateExpr(e),params:i._`{errors: ${s}}`})))}(s),e.keepErrors||function removeUsedErrors(){const e=r.const("emErrs",i._`[]`);r.forOf("err",c.default.vErrors,(t=>r.if(i._`!${t}.${p}`,(()=>r.code(i._`${e}.push(${t})`))))),r.assign(c.default.vErrors,e).assign(c.default.errors,i._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const ajvErrors=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(errorMessage(t))};t.default=ajvErrors,e.exports=ajvErrors,e.exports.default=ajvErrors},6870:(e,t)=>{"use strict";function fmtDef(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(time,compareTime),"date-time":fmtDef((function date_time(e){const t=e.split(s);return 2===t.length&&date(t[0])&&time(t[1],!0)}),compareDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function uri(e){return o.test(e)&&a.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function regex(e){if(l.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function byte(e){return c.lastIndex=0,c.test(e)},int32:{type:"number",validate:function validateInt32(e){return Number.isInteger(e)&&e<=p&&e>=u}},int64:{type:"number",validate:function validateInt64(e){return Number.isInteger(e)}},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(e){const t=r.exec(e);if(!t)return!1;const n=+t[1],s=+t[2],o=+t[3];return s>=1&&s<=12&&o>=1&&o<=(2===s&&function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}(n)?29:i[s])}function compareDate(e,t){if(e&&t)return e>t?1:e<t?-1:0}const n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function time(e,t){const r=n.exec(e);if(!r)return!1;const i=+r[1],s=+r[2],o=+r[3],a=r[5];return(i<=23&&s<=59&&o<=59||23===i&&59===s&&60===o)&&(!t||""!==a)}function compareTime(e,t){if(!e||!t)return;const r=n.exec(e),i=n.exec(t);return r&&i?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=i[1]+i[2]+i[3]+(i[4]||""))?1:e<t?-1:0:void 0}const s=/t|\s/i;function compareDateTime(e,t){if(!e||!t)return;const[r,i]=e.split(s),[n,o]=t.split(s),a=compareDate(r,n);return void 0!==a?a||compareTime(i,o):void 0}const o=/\/|:/,a=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;const c=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;const u=-(2**31),p=2**31-1;function validateNumber(){return!0}const l=/[^\\]\\Z/},5477:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(6870),n=r(7963),s=r(3487),o=new s.Name("fullFormats"),a=new s.Name("fastFormats"),formatsPlugin=(e,t={keywords:!0})=>{if(Array.isArray(t))return addFormats(e,t,i.fullFormats,o),e;const[r,s]="fast"===t.mode?[i.fastFormats,a]:[i.fullFormats,o];return addFormats(e,t.formats||i.formatNames,r,s),t.keywords&&n.default(e),e};function addFormats(e,t,r,i){var n,o;null!==(n=(o=e.opts.code).formats)&&void 0!==n||(o.formats=s._`require("ajv-formats/dist/formats").${i}`);for(const i of t)e.addFormat(i,r[i])}formatsPlugin.get=(e,t="full")=>{const r=("fast"===t?i.fastFormats:i.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=formatsPlugin,Object.defineProperty(t,"__esModule",{value:!0}),t.default=formatsPlugin},7963:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const i=r(1581),n=r(3487),s=n.operators,o={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:e,schemaCode:t})=>n.str`should be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:s,keyword:a,it:c}=e,{opts:u,self:p}=c;if(!u.validateFormats)return;const l=new i.KeywordCxt(c,p.RULES.all.format.definition,"format");function compareCode(e){return n._`${e}.compare(${r}, ${s}) ${o[a].fail} 0`}l.$data?function validate$DataFormat(){const r=t.scopeValue("formats",{ref:p.formats,code:u.code.formats}),i=t.const("fmt",n._`${r}[${l.schemaCode}]`);e.fail$data(n.or(n._`typeof ${i} != "object"`,n._`${i} instanceof RegExp`,n._`typeof ${i}.compare != "function"`,compareCode(i)))}():function validateFormat(){const r=l.schema,i=p.formats[r];if(!i||!0===i)return;if("object"!=typeof i||i instanceof RegExp||"function"!=typeof i.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const s=t.scopeValue("formats",{key:r,ref:i,code:u.code.formats?n._`${u.code.formats}${n.getProperty(r)}`:void 0});e.fail$data(compareCode(s))}()},dependencies:["format"]};t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},1581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const i=r(7159),n=r(3924),s=r(1240),o=r(98),a=["/properties"],c="http://json-schema.org/draft-07/schema";class Ajv extends i.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=Ajv,Object.defineProperty(t,"__esModule",{value:!0}),t.default=Ajv;var u=r(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var p=r(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var l=r(7426);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var d=r(6646);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})},7023:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class _CodeOrName{}t._CodeOrName=_CodeOrName,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=Name;class _Code extends _CodeOrName{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof Name&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function _(e,...t){const r=[e[0]];let i=0;for(;i<t.length;)addCodeArg(r,t[i]),r.push(e[++i]);return new _Code(r)}t._Code=_Code,t.nil=new _Code(""),t._=_;const r=new _Code("+");function str(e,...t){const i=[safeStringify(e[0])];let n=0;for(;n<t.length;)i.push(r),addCodeArg(i,t[n]),i.push(r,safeStringify(e[++n]));return function optimize(e){let t=1;for(;t<e.length-1;){if(e[t]===r){const r=mergeExprItems(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(i),new _Code(i)}function addCodeArg(e,t){t instanceof _Code?e.push(...t._items):t instanceof Name?e.push(t):e.push(function interpolate(e){return"number"==typeof e||"boolean"==typeof e||null===e?e:safeStringify(Array.isArray(e)?e.join(","):e)}(t))}function mergeExprItems(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof Name||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof Name?void 0:`"${e}${t.slice(1)}`}function safeStringify(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=str,t.addCodeArg=addCodeArg,t.strConcat=function strConcat(e,t){return t.emptyStr()?e:e.emptyStr()?t:str`${e}${t}`},t.stringify=function stringify(e){return new _Code(safeStringify(e))},t.safeStringify=safeStringify,t.getProperty=function getProperty(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new _Code(`.${e}`):_`[${e}]`},t.getEsmExportName=function getEsmExportName(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new _Code(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function regexpCode(e){return new _Code(e.toString())}},3487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const i=r(7023),n=r(8490);var s=r(7023);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var o=r(8490);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Def extends Node{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?n.varKinds.var:this.varKind,i=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=optimizeExpr(this.rhs,e,t)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof i.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=optimizeExpr(this.rhs,e,t),this}get names(){return addExprNames(this.lhs instanceof i.Name?{}:{...this.lhs.names},this.rhs)}}class AssignOp extends Assign{constructor(e,t,r,i){super(e,r,i),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Label extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Break extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Throw extends Node{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class AnyCode extends Node{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=optimizeExpr(this.code,e,t),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let i=r.length;for(;i--;){const n=r[i];n.optimizeNames(e,t)||(subtractNames(e,n.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>addNames(e,t.names)),{})}}class BlockNode extends ParentNode{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new Else(e):e}return t?!1===e?t instanceof If?t:t.nodes:this.nodes.length?this:new If(not(e),t instanceof If?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=optimizeExpr(this.condition,e,t),this}get names(){const e=super.names;return addExprNames(e,this.condition),this.else&&addNames(e,this.else.names),e}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=optimizeExpr(this.iteration,e,t),this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(e,t,r,i){super(),this.varKind=e,this.name=t,this.from=r,this.to=i}render(e){const t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:s}=this;return`for(${t} ${r}=${i}; ${r}<${s}; ${r}++)`+super.render(e)}get names(){const e=addExprNames(super.names,this.from);return addExprNames(e,this.to)}}class ForIter extends For{constructor(e,t,r,i){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=optimizeExpr(this.iterable,e,t),this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Func.kind="func";class Return extends ParentNode{render(e){return"return "+super.render(e)}}Return.kind="return";class Try extends BlockNode{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,i;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(i=this.finally)||void 0===i||i.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&addNames(e,this.catch.names),this.finally&&addNames(e,this.finally.names),e}}class Catch extends BlockNode{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Catch.kind="catch";class Finally extends BlockNode{render(e){return"finally"+super.render(e)}}Finally.kind="finally";function addNames(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function addExprNames(e,t){return t instanceof i._CodeOrName?addNames(e,t.names):e}function optimizeExpr(e,t,r){return e instanceof i.Name?replaceName(e):function canOptimize(e){return e instanceof i._Code&&e._items.some((e=>e instanceof i.Name&&1===t[e.str]&&void 0!==r[e.str]))}(e)?new i._Code(e._items.reduce(((e,t)=>(t instanceof i.Name&&(t=replaceName(t)),t instanceof i._Code?e.push(...t._items):e.push(t),e)),[])):e;function replaceName(e){const i=r[e.str];return void 0===i||1!==t[e.str]?e:(delete t[e.str],i)}}function subtractNames(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function not(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:i._`!${par(e)}`}t.CodeGen=class CodeGen{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,i){const n=this._scope.toName(t);return void 0!==r&&i&&(this._constants[n.str]=r),this._leafNode(new Def(e,n,r)),n}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Assign(e,t,r))}add(e,r){return this._leafNode(new AssignOp(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==i.nil&&this._leafNode(new AnyCode(e)),this}object(...e){const t=["{"];for(const[r,n]of e)t.length>1&&t.push(","),t.push(r),(r!==n||this.opts.es5)&&(t.push(":"),(0,i.addCodeArg)(t,n));return t.push("}"),new i._Code(t)}if(e,t,r){if(this._blockNode(new If(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new If(e))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new ForLoop(e),t)}forRange(e,t,r,i,s=(this.opts.es5?n.varKinds.var:n.varKinds.let)){const o=this._scope.toName(e);return this._for(new ForRange(s,o,t,r),(()=>i(o)))}forOf(e,t,r,s=n.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof i.Name?t:this.var("_arr",t);return this.forRange("_i",0,i._`${e}.length`,(t=>{this.var(o,i._`${e}[${t}]`),r(o)}))}return this._for(new ForIter("of",s,o,t),(()=>r(o)))}forIn(e,t,r,s=(this.opts.es5?n.varKinds.var:n.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,i._`Object.keys(${t})`,r);const o=this._scope.toName(e);return this._for(new ForIter("in",s,o,t),(()=>r(o)))}endFor(){return this._endBlockNode(For)}label(e){return this._leafNode(new Label(e))}break(e){return this._leafNode(new Break(e))}return(e){const t=new Return;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const i=new Try;if(this._blockNode(i),this.code(e),t){const e=this.name("e");this._currNode=i.catch=new Catch(e),t(e)}return r&&(this._currNode=i.finally=new Finally,this.code(r)),this._endBlockNode(Catch,Finally)}throw(e){return this._leafNode(new Throw(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=i.nil,r,n){return this._blockNode(new Func(e,t,r)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Func)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof If))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=not;const a=mappend(t.operators.AND);t.and=function and(...e){return e.reduce(a)};const c=mappend(t.operators.OR);function mappend(e){return(t,r)=>t===i.nil?r:r===i.nil?t:i._`${par(t)} ${e} ${par(r)}`}function par(e){return e instanceof i.Name?e:i._`(${e})`}t.or=function or(...e){return e.reduce(c)}},8490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const i=r(7023);class ValueError extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var n;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(n=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class Scope{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof i.Name?e:this.name(e)}name(e){return new i.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=Scope;class ValueScopeName extends i.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=i._`.${new i.Name(t)}[${r}]`}}t.ValueScopeName=ValueScopeName;const s=i._`\n`;t.ValueScope=class ValueScope extends Scope{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:i.nil}}get(){return this._scope}name(e){return new ValueScopeName(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const i=this.toName(e),{prefix:n}=i,s=null!==(r=t.key)&&void 0!==r?r:t.ref;let o=this._values[n];if(o){const e=o.get(s);if(e)return e}else o=this._values[n]=new Map;o.set(s,i);const a=this._scope[n]||(this._scope[n]=[]),c=a.length;return a[c]=t.ref,i.setValue(t,{property:n,itemIndex:c}),i}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return i._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},o){let a=i.nil;for(const c in e){const u=e[c];if(!u)continue;const p=s[c]=s[c]||new Map;u.forEach((e=>{if(p.has(e))return;p.set(e,n.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;a=i._`${a}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==o?void 0:o(e)))throw new ValueError(e);a=i._`${a}${s}${this.opts._n}`}p.set(e,n.Completed)}))}return a}}},4181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const i=r(3487),n=r(6776),s=r(2141);function addError(e,t){const r=e.const("err",t);e.if(i._`${s.default.vErrors} === null`,(()=>e.assign(s.default.vErrors,i._`[${r}]`)),i._`${s.default.vErrors}.push(${r})`),e.code(i._`${s.default.errors}++`)}function returnErrors(e,t){const{gen:r,validateName:n,schemaEnv:s}=e;s.$async?r.throw(i._`new ${e.ValidationError}(${t})`):(r.assign(i._`${n}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>i.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?i.str`"${e}" keyword must be ${t} ($data)`:i.str`"${e}" keyword is invalid ($data)`},t.reportError=function reportError(e,r=t.keywordError,n,s){const{it:o}=e,{gen:a,compositeRule:c,allErrors:u}=o,p=errorObjectCode(e,r,n);(null!=s?s:c||u)?addError(a,p):returnErrors(o,i._`[${p}]`)},t.reportExtraError=function reportExtraError(e,r=t.keywordError,i){const{it:n}=e,{gen:o,compositeRule:a,allErrors:c}=n;addError(o,errorObjectCode(e,r,i)),a||c||returnErrors(n,s.default.vErrors)},t.resetErrorsCount=function resetErrorsCount(e,t){e.assign(s.default.errors,t),e.if(i._`${s.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(i._`${s.default.vErrors}.length`,t)),(()=>e.assign(s.default.vErrors,null)))))},t.extendErrors=function extendErrors({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",o,s.default.errors,(o=>{e.const(c,i._`${s.default.vErrors}[${o}]`),e.if(i._`${c}.instancePath === undefined`,(()=>e.assign(i._`${c}.instancePath`,(0,i.strConcat)(s.default.instancePath,a.errorPath)))),e.assign(i._`${c}.schemaPath`,i.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(i._`${c}.schema`,r),e.assign(i._`${c}.data`,n))}))};const o={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function errorObjectCode(e,t,r){const{createErrors:n}=e.it;return!1===n?i._`{}`:function errorObject(e,t,r={}){const{gen:n,it:a}=e,c=[errorInstancePath(a,r),errorSchemaPath(e,r)];return function extraErrorProps(e,{params:t,message:r},n){const{keyword:a,data:c,schemaValue:u,it:p}=e,{opts:l,propertyName:d,topSchemaRef:f,schemaPath:y}=p;n.push([o.keyword,a],[o.params,"function"==typeof t?t(e):t||i._`{}`]),l.messages&&n.push([o.message,"function"==typeof r?r(e):r]);l.verbose&&n.push([o.schema,u],[o.parentSchema,i._`${f}${y}`],[s.default.data,c]);d&&n.push([o.propertyName,d])}(e,t,c),n.object(...c)}(e,t,r)}function errorInstancePath({errorPath:e},{instancePath:t}){const r=t?i.str`${e}${(0,n.getErrorPath)(t,n.Type.Str)}`:e;return[s.default.instancePath,(0,i.strConcat)(s.default.instancePath,r)]}function errorSchemaPath({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let a=s?t:i.str`${t}/${e}`;return r&&(a=i.str`${a}${(0,n.getErrorPath)(r,n.Type.Str)}`),[o.schemaPath,a]}},5173:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const i=r(3487),n=r(7426),s=r(2141),o=r(2531),a=r(6776),c=r(4815);class SchemaEnv{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function compileSchema(e){const t=getCompilingSchema.call(this,e);if(t)return t;const r=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:u}=this.opts.code,{ownProperties:p}=this.opts,l=new i.CodeGen(this.scope,{es5:a,lines:u,ownProperties:p});let d;e.$async&&(d=l.scopeValue("Error",{ref:n.default,code:i._`require("ajv/dist/runtime/validation_error").default`}));const f=l.scopeName("validate");e.validateName=f;const y={gen:l,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,i.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:i.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:i._`""`,opts:this.opts,self:this};let h;try{this._compilations.add(e),(0,c.validateFunctionCode)(y),l.optimize(this.opts.code.optimize);const t=l.toString();h=`${l.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(h=this.opts.code.process(h,e));const r=new Function(`${s.default.self}`,`${s.default.scope}`,h)(this,this.scope.get());if(this.scope.value(f,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:f,validateCode:t,scopeValues:l._values}),this.opts.unevaluated){const{props:e,items:t}=y;r.evaluated={props:e instanceof i.Name?void 0:e,items:t instanceof i.Name?void 0:t,dynamicProps:e instanceof i.Name,dynamicItems:t instanceof i.Name},r.source&&(r.source.evaluated=(0,i.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,h&&this.logger.error("Error compiling schema, function code:",h),t}finally{this._compilations.delete(e)}}function inlineOrCompile(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:compileSchema.call(this,e)}function getCompilingSchema(e){for(const i of this._compilations)if(r=e,(t=i).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return i;var t,r}function resolve(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||resolveSchema.call(this,e,t)}function resolveSchema(e,t){const r=this.opts.uriResolver.parse(t),i=(0,o._getFullPath)(this.opts.uriResolver,r);let n=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&i===n)return getJsonPointer.call(this,r,e);const s=(0,o.normalizeId)(i),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=resolveSchema.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return getJsonPointer.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||compileSchema.call(this,a),s===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,i=t[r];return i&&(n=(0,o.resolveUrl)(this.opts.uriResolver,n,i)),new SchemaEnv({schema:t,schemaId:r,root:e,baseId:n})}return getJsonPointer.call(this,r,a)}}t.SchemaEnv=SchemaEnv,t.compileSchema=compileSchema,t.resolveRef=function resolveRef(e,t,r){var i;r=(0,o.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let s=resolve.call(this,e,r);if(void 0===s){const n=null===(i=e.localRefs)||void 0===i?void 0:i[r],{schemaId:o}=this.opts;n&&(s=new SchemaEnv({schema:n,schemaId:o,root:e,baseId:t}))}return void 0!==s?e.refs[r]=inlineOrCompile.call(this,s):void 0},t.getCompilingSchema=getCompilingSchema,t.resolveSchema=resolveSchema;const u=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,{baseId:t,schema:r,root:i}){var n;if("/"!==(null===(n=e.fragment)||void 0===n?void 0:n[0]))return;for(const i of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(i)];if(void 0===e)return;const n="object"==typeof(r=e)&&r[this.opts.schemaId];!u.has(i)&&n&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,n))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=resolveSchema.call(this,i,e)}const{schemaId:c}=this.opts;return s=s||new SchemaEnv({schema:r,schemaId:c,root:i,baseId:t}),s.schema!==s.root.schema?s:void 0}},2141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n={data:new i.Name("data"),valCxt:new i.Name("valCxt"),instancePath:new i.Name("instancePath"),parentData:new i.Name("parentData"),parentDataProperty:new i.Name("parentDataProperty"),rootData:new i.Name("rootData"),dynamicAnchors:new i.Name("dynamicAnchors"),vErrors:new i.Name("vErrors"),errors:new i.Name("errors"),this:new i.Name("this"),self:new i.Name("self"),scope:new i.Name("scope"),json:new i.Name("json"),jsonPos:new i.Name("jsonPos"),jsonLen:new i.Name("jsonLen"),jsonPart:new i.Name("jsonPart")};t.default=n},6646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(2531);class MissingRefError extends Error{constructor(e,t,r,n){super(n||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,i.resolveUrl)(e,t,r),this.missingSchema=(0,i.normalizeId)((0,i.getFullPath)(e,this.missingRef))}}t.default=MissingRefError},2531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const i=r(6776),n=r(4063),s=r(9461),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function inlineRef(e,t=!0){return"boolean"==typeof e||(!0===t?!hasRef(e):!!t&&countKeys(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(hasRef))return!0;if("object"==typeof r&&hasRef(r))return!0}return!1}function countKeys(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!o.has(r)&&("object"==typeof e[r]&&(0,i.eachItem)(e[r],(e=>t+=countKeys(e))),t===1/0))return 1/0}return t}function getFullPath(e,t="",r){!1!==r&&(t=normalizeId(t));const i=e.parse(t);return _getFullPath(e,i)}function _getFullPath(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=getFullPath,t._getFullPath=_getFullPath;const c=/#\/?$/;function normalizeId(e){return e?e.replace(c,""):""}t.normalizeId=normalizeId,t.resolveUrl=function resolveUrl(e,t,r){return r=normalizeId(r),e.resolve(t,r)};const u=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function getSchemaRefs(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:i}=this.opts,o=normalizeId(e[r]||t),a={"":o},c=getFullPath(i,o,!1),p={},l=new Set;return s(e,{allKeys:!0},((e,t,i,n)=>{if(void 0===n)return;const s=c+t;let o=a[n];function addRef(t){const r=this.opts.uriResolver.resolve;if(t=normalizeId(o?r(o,t):t),l.has(t))throw ambiguos(t);l.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?checkAmbiguosRef(e,i.schema,t):t!==normalizeId(s)&&("#"===t[0]?(checkAmbiguosRef(e,p[t],t),p[t]=e):this.refs[t]=s),t}function addAnchor(e){if("string"==typeof e){if(!u.test(e))throw new Error(`invalid anchor "${e}"`);addRef.call(this,`#${e}`)}}"string"==typeof e[r]&&(o=addRef.call(this,e[r])),addAnchor.call(this,e.$anchor),addAnchor.call(this,e.$dynamicAnchor),a[t]=o})),p;function checkAmbiguosRef(e,t,r){if(void 0!==t&&!n(e,t))throw ambiguos(r)}function ambiguos(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},3141:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function isJSONType(e){return"string"==typeof e&&r.has(e)},t.getRules=function getRules(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},6776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const i=r(3487),n=r(7023);function checkUnknownRules(e,t=e.schema){const{opts:r,self:i}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const n=i.RULES.keywords;for(const r in t)n[r]||checkStrictMode(e,`unknown keyword: "${r}"`)}function schemaHasRules(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function escapeJsonPointer(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function makeMergeEvaluated({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(s,o,a,c)=>{const u=void 0===a?o:a instanceof i.Name?(o instanceof i.Name?e(s,o,a):t(s,o,a),a):o instanceof i.Name?(t(s,a,o),o):r(o,a);return c!==i.Name||u instanceof i.Name?u:n(s,u)}}function evaluatedPropsToName(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",i._`{}`);return void 0!==t&&setEvaluated(e,r,t),r}function setEvaluated(e,t,r){Object.keys(r).forEach((r=>e.assign(i._`${t}${(0,i.getProperty)(r)}`,!0)))}t.toHash=function toHash(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function alwaysValidSchema(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(checkUnknownRules(e,t),!schemaHasRules(t,e.self.RULES.all))},t.checkUnknownRules=checkUnknownRules,t.schemaHasRules=schemaHasRules,t.schemaHasRulesButRef=function schemaHasRulesButRef(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function schemaRefOrVal({topSchemaRef:e,schemaPath:t},r,n,s){if(!s){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return i._`${r}`}return i._`${e}${t}${(0,i.getProperty)(n)}`},t.unescapeFragment=function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))},t.escapeFragment=function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))},t.escapeJsonPointer=escapeJsonPointer,t.unescapeJsonPointer=unescapeJsonPointer,t.eachItem=function eachItem(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if(i._`${r} !== true && ${t} !== undefined`,(()=>{e.if(i._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,i._`${r} || {}`).code(i._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(i._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,i._`${r} || {}`),setEvaluated(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(e,t,r)=>e.if(i._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,i._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(i._`${r} !== true`,(()=>e.assign(r,!0===t||i._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=evaluatedPropsToName,t.setEvaluated=setEvaluated;const s={};var o;function checkStrictMode(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function useFunc(e,t){return e.scopeValue("func",{ref:t,code:s[t.code]||(s[t.code]=new n._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(o=t.Type||(t.Type={})),t.getErrorPath=function getErrorPath(e,t,r){if(e instanceof i.Name){const n=t===o.Num;return r?n?i._`"[" + ${e} + "]"`:i._`"['" + ${e} + "']"`:n?i._`"/" + ${e}`:i._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,i.getProperty)(e).toString():"/"+escapeJsonPointer(e)},t.checkStrictMode=checkStrictMode},8876:(e,t)=>{"use strict";function shouldUseGroup(e,t){return t.rules.some((t=>shouldUseRule(e,t)))}function shouldUseRule(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function schemaHasRulesForType({schema:e,self:t},r){const i=t.RULES.types[r];return i&&!0!==i&&shouldUseGroup(e,i)},t.shouldUseGroup=shouldUseGroup,t.shouldUseRule=shouldUseRule},5667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const i=r(4181),n=r(3487),s=r(2141),o={message:"boolean schema is false"};function falseSchemaError(e,t){const{gen:r,data:n}=e,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,i.reportError)(s,o,void 0,t)}t.topBoolOrEmptySchema=function topBoolOrEmptySchema(e){const{gen:t,schema:r,validateName:i}=e;!1===r?falseSchemaError(e,!1):"object"==typeof r&&!0===r.$async?t.return(s.default.data):(t.assign(n._`${i}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function boolOrEmptySchema(e,t){const{gen:r,schema:i}=e;!1===i?(r.var(t,!1),falseSchemaError(e)):r.var(t,!0)}},453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const i=r(3141),n=r(8876),s=r(4181),o=r(3487),a=r(6776);var c;function getJSONTypes(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(i.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function getSchemaTypes(e){const t=getJSONTypes(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=getJSONTypes,t.coerceAndCheckDataType=function coerceAndCheckDataType(e,t){const{gen:r,data:i,opts:s}=e,a=function coerceToTypes(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,s.coerceTypes),p=t.length>0&&!(0===a.length&&1===t.length&&(0,n.schemaHasRulesForType)(e,t[0]));if(p){const n=checkDataTypes(t,i,s.strictNumbers,c.Wrong);r.if(n,(()=>{a.length?function coerceData(e,t,r){const{gen:i,data:n,opts:s}=e,a=i.let("dataType",o._`typeof ${n}`),c=i.let("coerced",o._`undefined`);"array"===s.coerceTypes&&i.if(o._`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,(()=>i.assign(n,o._`${n}[0]`).assign(a,o._`typeof ${n}`).if(checkDataTypes(t,n,s.strictNumbers),(()=>i.assign(c,n)))));i.if(o._`${c} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===s.coerceTypes)&&coerceSpecificType(e);function coerceSpecificType(e){switch(e){case"string":return void i.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(c,o._`"" + ${n}`).elseIf(o._`${n} === null`).assign(c,o._`""`);case"number":return void i.elseIf(o._`${a} == "boolean" || ${n} === null
|
|
3
3
|
|| (${a} == "string" && ${n} && ${n} == +${n})`).assign(c,o._`+${n}`);case"integer":return void i.elseIf(o._`${a} === "boolean" || ${n} === null
|
|
4
4
|
|| (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(c,o._`+${n}`);case"boolean":return void i.elseIf(o._`${n} === "false" || ${n} === 0 || ${n} === null`).assign(c,!1).elseIf(o._`${n} === "true" || ${n} === 1`).assign(c,!0);case"null":return i.elseIf(o._`${n} === "" || ${n} === 0 || ${n} === false`),void i.assign(c,null);case"array":i.elseIf(o._`${a} === "string" || ${a} === "number"
|
|
5
5
|
|| ${a} === "boolean" || ${n} === null`).assign(c,o._`[${n}]`)}}i.else(),reportTypeError(e),i.endIf(),i.if(o._`${c} !== undefined`,(()=>{i.assign(n,c),function assignParentData({gen:e,parentData:t,parentDataProperty:r},i){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${r}]`,i)))}(e,c)}))}(e,t,a):reportTypeError(e)}))}return p};const u=new Set(["string","number","integer","boolean","null"]);function checkDataType(e,t,r,i=c.Correct){const n=i===c.Correct?o.operators.EQ:o.operators.NEQ;let s;switch(e){case"null":return o._`${t} ${n} null`;case"array":s=o._`Array.isArray(${t})`;break;case"object":s=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=numCond(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=numCond();break;default:return o._`typeof ${t} ${n} ${e}`}return i===c.Correct?s:(0,o.not)(s);function numCond(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,r?o._`isFinite(${t})`:o.nil)}}function checkDataTypes(e,t,r,i){if(1===e.length)return checkDataType(e[0],t,r,i);let n;const s=(0,a.toHash)(e);if(s.array&&s.object){const e=o._`typeof ${t} != "object"`;n=s.null?e:o._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else n=o.nil;s.number&&delete s.integer;for(const e in s)n=(0,o.and)(n,checkDataType(e,t,r,i));return n}t.checkDataType=checkDataType,t.checkDataTypes=checkDataTypes;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function reportTypeError(e){const t=function getTypeErrorContext(e){const{gen:t,data:r,schema:i}=e,n=(0,a.schemaRefOrVal)(e,i,"type");return{gen:t,keyword:"type",data:r,schema:i.type,schemaCode:n,schemaValue:n,parentSchema:i,params:{},it:e}}(e);(0,s.reportError)(t,p)}t.reportTypeError=reportTypeError},313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const i=r(3487),n=r(6776);function assignDefault(e,t,r){const{gen:s,compositeRule:o,data:a,opts:c}=e;if(void 0===r)return;const u=i._`${a}${(0,i.getProperty)(t)}`;if(o)return void(0,n.checkStrictMode)(e,`default is ignored for: ${u}`);let p=i._`${u} === undefined`;"empty"===c.useDefaults&&(p=i._`${p} || ${u} === null || ${u} === ""`),s.if(p,i._`${u} = ${(0,i.stringify)(r)}`)}t.assignDefaults=function assignDefaults(e,t){const{properties:r,items:i}=e.schema;if("object"===t&&r)for(const t in r)assignDefault(e,t,r[t].default);else"array"===t&&Array.isArray(i)&&i.forEach(((t,r)=>assignDefault(e,r,t.default)))}},4815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const i=r(5667),n=r(453),s=r(8876),o=r(453),a=r(313),c=r(5005),u=r(3099),p=r(3487),l=r(2141),d=r(2531),f=r(6776),y=r(4181);function validateFunction({gen:e,validateName:t,schema:r,schemaEnv:i,opts:n},s){n.code.es5?e.func(t,p._`${l.default.data}, ${l.default.valCxt}`,i.$async,(()=>{e.code(p._`"use strict"; ${funcSourceUrl(r,n)}`),function destructureValCxtES5(e,t){e.if(l.default.valCxt,(()=>{e.var(l.default.instancePath,p._`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,p._`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,p._`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,p._`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,p._`${l.default.valCxt}.${l.default.dynamicAnchors}`)}),(()=>{e.var(l.default.instancePath,p._`""`),e.var(l.default.parentData,p._`undefined`),e.var(l.default.parentDataProperty,p._`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,p._`{}`)}))}(e,n),e.code(s)})):e.func(t,p._`${l.default.data}, ${function destructureValCxt(e){return p._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?p._`, ${l.default.dynamicAnchors}={}`:p.nil}}={}`}(n)}`,i.$async,(()=>e.code(funcSourceUrl(r,n)).code(s)))}function funcSourceUrl(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?p._`/*# sourceURL=${r} */`:p.nil}function subschemaCode(e,t){isSchemaObj(e)&&(checkKeywords(e),schemaCxtHasRules(e))?function subSchemaObjCode(e,t){const{schema:r,gen:i,opts:n}=e;n.$comment&&r.$comment&&commentKeyword(e);(function updateContext(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,d.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function checkAsyncSchema(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=i.const("_errs",l.default.errors);typeAndKeywords(e,s),i.var(t,p._`${s} === ${l.default.errors}`)}(e,t):(0,i.boolOrEmptySchema)(e,t)}function schemaCxtHasRules({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function isSchemaObj(e){return"boolean"!=typeof e.schema}function checkKeywords(e){(0,f.checkUnknownRules)(e),function checkRefsAndKeywords(e){const{schema:t,errSchemaPath:r,opts:i,self:n}=e;t.$ref&&i.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function typeAndKeywords(e,t){if(e.opts.jtd)return schemaKeywords(e,[],!1,t);const r=(0,n.getSchemaTypes)(e.schema);schemaKeywords(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function commentKeyword({gen:e,schemaEnv:t,schema:r,errSchemaPath:i,opts:n}){const s=r.$comment;if(!0===n.$comment)e.code(p._`${l.default.self}.logger.log(${s})`);else if("function"==typeof n.$comment){const r=p.str`${i}/$comment`,n=e.scopeValue("root",{ref:t.root});e.code(p._`${l.default.self}.opts.$comment(${s}, ${r}, ${n}.schema)`)}}function schemaKeywords(e,t,r,i){const{gen:n,schema:a,data:c,allErrors:u,opts:d,self:y}=e,{RULES:h}=y;function groupKeywords(f){(0,s.shouldUseGroup)(a,f)&&(f.type?(n.if((0,o.checkDataType)(f.type,c,d.strictNumbers)),iterateKeywords(e,f),1===t.length&&t[0]===f.type&&r&&(n.else(),(0,o.reportTypeError)(e)),n.endIf()):iterateKeywords(e,f),u||n.if(p._`${l.default.errors} === ${i||0}`))}!a.$ref||!d.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(a,h)?(d.jtd||function checkStrictTypes(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function checkContextTypes(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{includesType(e.dataTypes,t)||strictTypesError(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function narrowSchemaTypes(e,t){const r=[];for(const i of e.dataTypes)includesType(t,i)?r.push(i):t.includes("integer")&&"number"===i&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function checkMultipleTypes(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&strictTypesError(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function checkKeywordTypes(e,t){const r=e.self.RULES.all;for(const i in r){const n=r[i];if("object"==typeof n&&(0,s.shouldUseRule)(e.schema,n)){const{type:r}=n.definition;r.length&&!r.some((e=>hasApplicableType(t,e)))&&strictTypesError(e,`missing type "${r.join(",")}" for keyword "${i}"`)}}}(e,e.dataTypes)}(e,t),n.block((()=>{for(const e of h.rules)groupKeywords(e);groupKeywords(h.post)}))):n.block((()=>keywordCode(e,"$ref",h.all.$ref.definition)))}function iterateKeywords(e,t){const{gen:r,schema:i,opts:{useDefaults:n}}=e;n&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,s.shouldUseRule)(i,r)&&keywordCode(e,r.keyword,r.definition,t.type)}))}function hasApplicableType(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function includesType(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function strictTypesError(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function validateFunctionCode(e){isSchemaObj(e)&&(checkKeywords(e),schemaCxtHasRules(e))?function topSchemaObjCode(e){const{schema:t,opts:r,gen:i}=e;return void validateFunction(e,(()=>{r.$comment&&t.$comment&&commentKeyword(e),function checkNoDefault(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),i.let(l.default.vErrors,null),i.let(l.default.errors,0),r.unevaluated&&function resetEvaluated(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",p._`${r}.evaluated`),t.if(p._`${e.evaluated}.dynamicProps`,(()=>t.assign(p._`${e.evaluated}.props`,p._`undefined`))),t.if(p._`${e.evaluated}.dynamicItems`,(()=>t.assign(p._`${e.evaluated}.items`,p._`undefined`)))}(e),typeAndKeywords(e),function returnResults(e){const{gen:t,schemaEnv:r,validateName:i,ValidationError:n,opts:s}=e;r.$async?t.if(p._`${l.default.errors} === 0`,(()=>t.return(l.default.data)),(()=>t.throw(p._`new ${n}(${l.default.vErrors})`))):(t.assign(p._`${i}.errors`,l.default.vErrors),s.unevaluated&&function assignEvaluated({gen:e,evaluated:t,props:r,items:i}){r instanceof p.Name&&e.assign(p._`${t}.props`,r);i instanceof p.Name&&e.assign(p._`${t}.items`,i)}(e),t.return(p._`${l.default.errors} === 0`))}(e)}))}(e):validateFunction(e,(()=>(0,i.topBoolOrEmptySchema)(e)))};class KeywordCxt{constructor(e,t,r){if((0,c.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",getData(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",l.default.errors))}result(e,t,r){this.failResult((0,p.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,p.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(p._`${t} !== undefined && (${(0,p.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?y.reportExtraError:y.reportError)(this,this.def.error,t)}$dataError(){(0,y.reportError)(this,this.def.$dataError||y.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,y.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=p.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=p.nil,t=p.nil){if(!this.$data)return;const{gen:r,schemaCode:i,schemaType:n,def:s}=this;r.if((0,p.or)(p._`${i} === undefined`,t)),e!==p.nil&&r.assign(e,!0),(n.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==p.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:i,it:n}=this;return(0,p.or)(function wrong$DataType(){if(r.length){if(!(t instanceof p.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return p._`${(0,o.checkDataTypes)(e,t,n.opts.strictNumbers,o.DataType.Wrong)}`}return p.nil}(),function invalid$DataSchema(){if(i.validateSchema){const r=e.scopeValue("validate$data",{ref:i.validateSchema});return p._`!${r}(${t})`}return p.nil}())}subschema(e,t){const r=(0,u.getSubschema)(this.it,e);(0,u.extendSubschemaData)(r,this.it,e),(0,u.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return subschemaCode(i,t),i}mergeEvaluated(e,t){const{it:r,gen:i}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(i,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(i,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:i}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return i.if(t,(()=>this.mergeEvaluated(e,p.Name))),!0}}function keywordCode(e,t,r,i){const n=new KeywordCxt(e,r,t);"code"in r?r.code(n,i):n.$data&&r.validate?(0,c.funcKeywordCode)(n,r):"macro"in r?(0,c.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(n,r)}t.KeywordCxt=KeywordCxt;const h=/^\/(?:[^~]|~0|~1)*$/,g=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(e,{dataLevel:t,dataNames:r,dataPathArr:i}){let n,s;if(""===e)return l.default.rootData;if("/"===e[0]){if(!h.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,s=l.default.rootData}else{const o=g.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(n=o[2],"#"===n){if(a>=t)throw new Error(errorMsg("property/index",a));return i[t-a]}if(a>t)throw new Error(errorMsg("data",a));if(s=r[t-a],!n)return s}let o=s;const a=n.split("/");for(const e of a)e&&(s=p._`${s}${(0,p.getProperty)((0,f.unescapeJsonPointer)(e))}`,o=p._`${o} && ${s}`);return o;function errorMsg(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=getData},5005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const i=r(3487),n=r(2141),s=r(412),o=r(4181);function modifyData(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,(()=>t.assign(r,i._`${n.parentData}[${n.parentDataProperty}]`)))}function useKeyword(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,i.stringify)(r)})}t.macroKeywordCode=function macroKeywordCode(e,t){const{gen:r,keyword:n,schema:s,parentSchema:o,it:a}=e,c=t.macro.call(a.self,s,o,a),u=useKeyword(r,n,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const p=r.name("valid");e.subschema({schema:c,schemaPath:i.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:u,compositeRule:!0},p),e.pass(p,(()=>e.error(!0)))},t.funcKeywordCode=function funcKeywordCode(e,t){var r;const{gen:a,keyword:c,schema:u,parentSchema:p,$data:l,it:d}=e;!function checkAsyncKeyword({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(d,t);const f=!l&&t.compile?t.compile.call(d.self,u,p,d):t.validate,y=useKeyword(a,c,f),h=a.let("valid");function assignValid(r=(t.async?i._`await `:i.nil)){const o=d.opts.passContext?n.default.this:n.default.self,c=!("compile"in t&&!l||!1===t.schema);a.assign(h,i._`${r}${(0,s.callValidateCode)(e,y,o,c)}`,t.modifying)}function reportErrs(e){var r;a.if((0,i.not)(null!==(r=t.valid)&&void 0!==r?r:h),e)}e.block$data(h,(function validateKeyword(){if(!1===t.errors)assignValid(),t.modifying&&modifyData(e),reportErrs((()=>e.error()));else{const r=t.async?function validateAsync(){const e=a.let("ruleErrs",null);return a.try((()=>assignValid(i._`await `)),(t=>a.assign(h,!1).if(i._`${t} instanceof ${d.ValidationError}`,(()=>a.assign(e,i._`${t}.errors`)),(()=>a.throw(t))))),e}():function validateSync(){const e=i._`${y}.errors`;return a.assign(e,null),assignValid(i.nil),e}();t.modifying&&modifyData(e),reportErrs((()=>function addErrs(e,t){const{gen:r}=e;r.if(i._`Array.isArray(${t})`,(()=>{r.assign(n.default.vErrors,i._`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`).assign(n.default.errors,i._`${n.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:h)},t.validSchemaType=function validSchemaType(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function validateKeywordUsage({schema:e,opts:t,self:r,errSchemaPath:i},n,s){if(Array.isArray(n.keyword)?!n.keyword.includes(s):n.keyword!==s)throw new Error("ajv implementation error");const o=n.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(n.validateSchema){if(!n.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${i}": `+r.errorsText(n.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}}},3099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const i=r(3487),n=r(6776);t.getSubschema=function getSubschema(e,{keyword:t,schemaProp:r,schema:s,schemaPath:o,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===r?{schema:s,schemaPath:i._`${e.schemaPath}${(0,i.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:i._`${e.schemaPath}${(0,i.getProperty)(t)}${(0,i.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,n.escapeFragment)(r)}`}}if(void 0!==s){if(void 0===o||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:o,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function extendSubschemaData(e,t,{dataProp:r,dataPropType:s,data:o,dataTypes:a,propertyName:c}){if(void 0!==o&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:u}=t;if(void 0!==r){const{errorPath:o,dataPathArr:a,opts:c}=t;dataContextProps(u.let("data",i._`${t.data}${(0,i.getProperty)(r)}`,!0)),e.errorPath=i.str`${o}${(0,n.getErrorPath)(r,s,c.jsPropertySyntax)}`,e.parentDataProperty=i._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}if(void 0!==o){dataContextProps(o instanceof i.Name?o:u.let("data",o,!0)),void 0!==c&&(e.propertyName=c)}function dataContextProps(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}a&&(e.dataTypes=a)},t.extendSubschemaMode=function extendSubschemaMode(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:i,createErrors:n,allErrors:s}){void 0!==i&&(e.compositeRule=i),void 0!==n&&(e.createErrors=n),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}},7159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var i=r(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var n=r(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const s=r(7426),o=r(6646),a=r(3141),c=r(5173),u=r(3487),p=r(2531),l=r(453),d=r(6776),f=r(4775),y=r(3589),defaultRegExp=(e,t)=>new RegExp(e,t);defaultRegExp.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function requiredOptions(e){var t,r,i,n,s,o,a,c,u,p,l,d,f,h,g,m,v,b,R,O,S,I,P,w,j;const $=e.strict,A=null===(t=e.code)||void 0===t?void 0:t.optimize,N=!0===A||void 0===A?1:A||0,x=null!==(i=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==i?i:defaultRegExp,T=null!==(n=e.uriResolver)&&void 0!==n?n:y.default;return{strictSchema:null===(o=null!==(s=e.strictSchema)&&void 0!==s?s:$)||void 0===o||o,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:$)||void 0===c||c,strictTypes:null!==(p=null!==(u=e.strictTypes)&&void 0!==u?u:$)&&void 0!==p?p:"log",strictTuples:null!==(d=null!==(l=e.strictTuples)&&void 0!==l?l:$)&&void 0!==d?d:"log",strictRequired:null!==(h=null!==(f=e.strictRequired)&&void 0!==f?f:$)&&void 0!==h&&h,code:e.code?{...e.code,optimize:N,regExp:x}:{optimize:N,regExp:x},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(m=e.loopEnum)&&void 0!==m?m:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(R=e.inlineRefs)||void 0===R||R,schemaId:null!==(O=e.schemaId)&&void 0!==O?O:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(I=e.validateSchema)||void 0===I||I,validateFormats:null===(P=e.validateFormats)||void 0===P||P,unicodeRegExp:null===(w=e.unicodeRegExp)||void 0===w||w,int32range:null===(j=e.int32range)||void 0===j||j,uriResolver:T}}class Ajv{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...requiredOptions(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function getLogger(e){if(!1===e)return b;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),checkOptions.call(this,m,e,"NOT SUPPORTED"),checkOptions.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=getMetaSchemaOptions.call(this),e.formats&&addInitialFormats.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&addInitialKeywords.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),addInitialSchemas.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let i=f;"id"===r&&(i={...f},i.id=i.$id,delete i.$id),t&&e&&this.addMetaSchema(i,i[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const i=r(t);return"$async"in r||(this.errors=r.errors),i}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return runCompileAsync.call(this,e,t);async function runCompileAsync(e,t){await loadMetaSchema.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||_compileAsync.call(this,r)}async function loadMetaSchema(e){e&&!this.getSchema(e)&&await runCompileAsync.call(this,{$ref:e},!0)}async function _compileAsync(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return checkLoaded.call(this,t),await loadMissingSchema.call(this,t.missingSchema),_compileAsync.call(this,e)}}function checkLoaded({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function loadMissingSchema(e){const r=await _loadSchema.call(this,e);this.refs[e]||await loadMetaSchema.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function _loadSchema(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,i=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,i);return this}let n;if("object"==typeof e){const{schemaId:t}=this.opts;if(n=e[t],void 0!==n&&"string"!=typeof n)throw new Error(`schema ${t} must be string`)}return t=(0,p.normalizeId)(t||n),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,i,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const i=this.validate(r,e);if(!i&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return i}getSchema(e){let t;for(;"string"==typeof(t=getSchEnv.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,i=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,i,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=getSchEnv.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,p.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(checkKeyword.call(this,r,t),!t)return(0,d.eachItem)(r,(e=>addRule.call(this,e))),this;keywordMetaschema.call(this,t);const i={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(r,0===i.type.length?e=>addRule.call(this,e,i):e=>i.type.forEach((t=>addRule.call(this,e,i,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const i of t){const t=i.split("/").slice(1);let n=e;for(const e of t)n=n[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:i}=t.definition,s=n[e];i&&s&&(n[e]=schemaOrData(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const i=e[r];t&&!t.test(r)||("string"==typeof i?delete e[r]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[r]))}}_addSchema(e,t,r,i=this.opts.validateSchema,n=this.opts.addUsedSchema){let s;const{schemaId:o}=this.opts;if("object"==typeof e)s=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,p.normalizeId)(s||r);const u=p.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:u}),this._cache.set(a.schema,a),n&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),i&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function checkOptions(e,t,r,i="error"){for(const n in e){const s=n;s in t&&this.logger[i](`${r}: option ${n}. ${e[s]}`)}}function getSchEnv(e){return e=(0,p.normalizeId)(e),this.schemas[e]||this.refs[e]}function addInitialSchemas(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function addInitialFormats(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function addInitialKeywords(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function getMetaSchemaOptions(){const e={...this.opts};for(const t of h)delete e[t];return e}t.default=Ajv,Ajv.ValidationError=s.default,Ajv.MissingRefError=o.default;const b={log(){},warn(){},error(){}};const R=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(e,t){const{RULES:r}=this;if((0,d.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!R.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function addRule(e,t,r){var i;const n=null==t?void 0:t.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let o=n?s.post:s.rules.find((({type:e})=>e===r));if(o||(o={type:r,rules:[]},s.rules.push(o)),s.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?addBeforeRule.call(this,o,a,t.before):o.rules.push(a),s.all[e]=a,null===(i=t.implements)||void 0===i||i.forEach((e=>this.addKeyword(e)))}function addBeforeRule(e,t,r){const i=e.rules.findIndex((e=>e.keyword===r));i>=0?e.rules.splice(i,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function keywordMetaschema(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=schemaOrData(t)),e.validateSchema=this.compile(t,!0))}const O={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(e){return{anyOf:[e,O]}}},3510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(4063);i.code='require("ajv/dist/runtime/equal").default',t.default=i},4499:(e,t)=>{"use strict";function ucs2length(e){const t=e.length;let r,i=0,n=0;for(;n<t;)i++,r=e.charCodeAt(n++),r>=55296&&r<=56319&&n<t&&(r=e.charCodeAt(n),56320==(64512&r)&&n++);return i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},3589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(540);i.code='require("ajv/dist/runtime/uri").default',t.default=i},7426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class ValidationError extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=ValidationError},4783:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const i=r(3487),n=r(6776),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>i.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>i._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:i}=t;Array.isArray(i)?validateAdditionalItems(e,i):(0,n.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function validateAdditionalItems(e,t){const{gen:r,schema:s,data:o,keyword:a,it:c}=e;c.items=!0;const u=r.const("len",i._`${o}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(i._`${u} <= ${t.length}`);else if("object"==typeof s&&!(0,n.alwaysValidSchema)(c,s)){const s=r.var("valid",i._`${u} <= ${t.length}`);r.if((0,i.not)(s),(()=>function validateItems(s){r.forRange("i",t.length,u,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:n.Type.Num},s),c.allErrors||r.if((0,i.not)(s),(()=>r.break()))}))}(s))),e.ok(s)}}t.validateAdditionalItems=validateAdditionalItems,t.default=s},9351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(412),n=r(3487),s=r(2141),o=r(6776),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>n._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:u,it:p}=e;if(!u)throw new Error("ajv implementation error");const{allErrors:l,opts:d}=p;if(p.props=!0,"all"!==d.removeAdditional&&(0,o.alwaysValidSchema)(p,r))return;const f=(0,i.allSchemaProperties)(a.properties),y=(0,i.allSchemaProperties)(a.patternProperties);function deleteAdditional(e){t.code(n._`delete ${c}[${e}]`)}function additionalPropertyCode(i){if("all"===d.removeAdditional||d.removeAdditional&&!1===r)deleteAdditional(i);else{if(!1===r)return e.setParams({additionalProperty:i}),e.error(),void(l||t.break());if("object"==typeof r&&!(0,o.alwaysValidSchema)(p,r)){const r=t.name("valid");"failing"===d.removeAdditional?(applyAdditionalSchema(i,r,!1),t.if((0,n.not)(r),(()=>{e.reset(),deleteAdditional(i)}))):(applyAdditionalSchema(i,r),l||t.if((0,n.not)(r),(()=>t.break())))}}}function applyAdditionalSchema(t,r,i){const n={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===i&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,r)}!function checkAdditionalProperties(){t.forIn("key",c,(r=>{f.length||y.length?t.if(function isAdditional(r){let s;if(f.length>8){const e=(0,o.schemaRefOrVal)(p,a.properties,"properties");s=(0,i.isOwnProperty)(t,e,r)}else s=f.length?(0,n.or)(...f.map((e=>n._`${r} === ${e}`))):n.nil;y.length&&(s=(0,n.or)(s,...y.map((t=>n._`${(0,i.usePattern)(e,t)}.test(${r})`))));return(0,n.not)(s)}(r),(()=>additionalPropertyCode(r))):additionalPropertyCode(r)}))}(),e.ok(n._`${u} === ${s.default.errors}`)}};t.default=a},1125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(6776),n={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const s=t.name("valid");r.forEach(((t,r)=>{if((0,i.alwaysValidSchema)(n,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},s);e.ok(s),e.mergeEvaluated(o)}))}};t.default=n},19:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(412).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=i},9864:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=r(3487),n=r(6776),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?i.str`must contain at least ${e} valid item(s)`:i.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?i._`{minContains: ${e}}`:i._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:o,it:a}=e;let c,u;const{minContains:p,maxContains:l}=s;a.opts.next?(c=void 0===p?1:p,u=l):c=1;const d=t.const("len",i._`${o}.length`);if(e.setParams({min:c,max:u}),void 0===u&&0===c)return void(0,n.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==u&&c>u)return(0,n.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,n.alwaysValidSchema)(a,r)){let t=i._`${d} >= ${c}`;return void 0!==u&&(t=i._`${t} && ${d} <= ${u}`),void e.pass(t)}a.items=!0;const f=t.name("valid");function validateItemsWithCount(){const e=t.name("_valid"),r=t.let("count",0);validateItems(e,(()=>t.if(e,(()=>function checkLimits(e){t.code(i._`${e}++`),void 0===u?t.if(i._`${e} >= ${c}`,(()=>t.assign(f,!0).break())):(t.if(i._`${e} > ${u}`,(()=>t.assign(f,!1).break())),1===c?t.assign(f,!0):t.if(i._`${e} >= ${c}`,(()=>t.assign(f,!0))))}(r)))))}function validateItems(r,i){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:n.Type.Num,compositeRule:!0},r),i()}))}void 0===u&&1===c?validateItems(f,(()=>t.if(f,(()=>t.break())))):0===c?(t.let(f,!0),void 0!==u&&t.if(i._`${o}.length > 0`,validateItemsWithCount)):(t.let(f,!1),validateItemsWithCount()),e.result(f,(()=>e.reset()))}};t.default=s},7772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const i=r(3487),n=r(6776),s=r(412);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const n=1===t?"property":"properties";return i.str`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>i._`{property: ${e},
|