@sovity.de/edc-client 4.0.1 → 4.2.0
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(r,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(r=typeof globalThis<"u"?globalThis:r||self,c(r["sovity-edc-client"]={}))})(this,function(r){"use strict";var Me=Object.defineProperty;var Ue=(r,c,d)=>c in r?Me(r,c,{enumerable:!0,configurable:!0,writable:!0,value:d}):r[c]=d;var p=(r,c,d)=>(Ue(r,typeof c!="symbol"?c+"":c,d),d);const c="http://localhost".replace(/\/+$/,"");class d{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:c}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||O}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:async()=>e}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const h=new d,N=class{constructor(e=h){p(this,"middleware");p(this,"fetchApi",async(e,n)=>{let i={url:e,init:n};for(const s of this.middleware)s.pre&&(i=await s.pre({fetch:this.fetchApi,...i})||i);let o;try{o=await(this.configuration.fetchApi||fetch)(i.url,i.init)}catch(s){for(const f of this.middleware)f.onError&&(o=await f.onError({fetch:this.fetchApi,url:i.url,init:i.init,error:s,response:o?o.clone():void 0})||o);if(o===void 0)throw s instanceof Error?new F(s,"The request failed and the interceptors did not return an alternative response"):s}for(const s of this.middleware)s.post&&(o=await s.post({fetch:this.fetchApi,url:i.url,init:i.init,response:o.clone()})||o);return o});this.configuration=e,this.middleware=e.middleware}withMiddleware(...e){const n=this.clone();return n.middleware=n.middleware.concat(...e),n}withPreMiddleware(...e){const n=e.map(i=>({pre:i}));return this.withMiddleware(...n)}withPostMiddleware(...e){const n=e.map(i=>({post:i}));return this.withMiddleware(...n)}isJsonMime(e){return e?N.jsonRegex.test(e):!1}async request(e,n){const{url:i,init:o}=await this.createFetchParams(e,n),s=await this.fetchApi(i,o);if(s&&s.status>=200&&s.status<300)return s;throw new J(s,"Response returned an error code")}async createFetchParams(e,n){let i=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(i+="?"+this.configuration.queryParamsStringify(e.query));const o=Object.assign({},this.configuration.headers,e.headers);Object.keys(o).forEach(Gt=>o[Gt]===void 0?delete o[Gt]:{});const s=typeof n=="function"?n:async()=>n,f={method:e.method,headers:o,body:e.body,credentials:this.configuration.credentials},g={...f,...await s({init:f,context:e})},be={...g,body:Bt(g.body)||g.body instanceof URLSearchParams||kt(g.body)?g.body:JSON.stringify(g.body)};return{url:i,init:be}}clone(){const e=this.constructor,n=new e(this.configuration);return n.middleware=this.middleware.slice(),n}};let m=N;p(m,"jsonRegex",new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i"));function kt(t){return typeof Blob<"u"&&t instanceof Blob}function Bt(t){return typeof FormData<"u"&&t instanceof FormData}class J extends Error{constructor(n,i){super(i);p(this,"name","ResponseError");this.response=n}}class F extends Error{constructor(n,i){super(i);p(this,"name","FetchError");this.cause=n}}class S extends Error{constructor(n,i){super(i);p(this,"name","RequiredError");this.field=n}}const $t={csv:",",ssv:" ",tsv:" ",pipes:"|"};function a(t,e){const n=t[e];return n!=null}function O(t,e=""){return Object.keys(t).map(n=>w(n,t[n],e)).filter(n=>n.length>0).join("&")}function w(t,e,n=""){const i=n+(n.length?`[${t}]`:t);if(e instanceof Array){const o=e.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(i)}=`);return`${encodeURIComponent(i)}=${o}`}if(e instanceof Set){const o=Array.from(e);return w(t,o,n)}return e instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?O(e,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(e))}`}function Vt(t,e){return Object.keys(t).reduce((n,i)=>({...n,[i]:e(t[i])}),{})}function _t(t){for(const e of t)if(e.contentType==="multipart/form-data")return!0;return!1}class u{constructor(e,n=i=>i){this.raw=e,this.transformer=n}async value(){return this.transformer(await this.raw.json())}}class I{constructor(e){this.raw=e}async value(){}}class zt{constructor(e){this.raw=e}async value(){return await this.raw.blob()}}class Qt{constructor(e){this.raw=e}async value(){return await this.raw.text()}}function Xt(t){let e=!0;return e=e&&"assetId"in t,e=e&&"createdAt"in t,e=e&&"properties"in t,e}function R(t){return E(t)}function E(t,e){return t==null?t:{assetId:t.assetId,createdAt:new Date(t.createdAt),properties:t.properties}}function q(t){if(t!==void 0)return t===null?null:{assetId:t.assetId,createdAt:t.createdAt.toISOString(),properties:t.properties}}function Yt(t){let e=!0;return e=e&&"properties"in t,e}function b(t){return M(t)}function M(t,e){return t==null?t:{id:a(t,"id")?t.id:void 0,properties:t.properties}}function U(t){if(t!==void 0)return t===null?null:{id:t.id,properties:t.properties}}function Wt(t){let e=!0;return e=e&&"properties"in t,e}function L(t){return H(t)}function H(t,e){return t==null?t:{properties:t.properties}}function K(t){if(t!==void 0)return t===null?null:{properties:t.properties}}function Zt(t){let e=!0;return e=e&&"asset"in t,e=e&&"dataAddress"in t,e}function G(t){return k(t)}function k(t,e){return t==null?t:{asset:b(t.asset),dataAddress:L(t.dataAddress)}}function B(t){if(t!==void 0)return t===null?null:{asset:U(t.asset),dataAddress:K(t.dataAddress)}}const vt={Eq:"EQ",Neq:"NEQ",Gt:"GT",Geq:"GEQ",Lt:"LT",Leq:"LEQ",In:"IN"};function xt(t){let e=!0;return e=e&&"leftExpression"in t,e=e&&"operator"in t,e=e&&"rightExpression"in t,e}function $(t){return V(t)}function V(t,e){return t==null?t:{leftExpression:t.leftExpression,operator:t.operator,rightExpression:t.rightExpression}}function _(t){if(t!==void 0)return t===null?null:{leftExpression:t.leftExpression,operator:t.operator,rightExpression:t.rightExpression}}function jt(t){let e=!0;return e=e&&"numActiveConsumingContractAgreements"in t,e}function z(t){return Q(t)}function Q(t,e){return t==null?t:{numActiveConsumingContractAgreements:t.numActiveConsumingContractAgreements,maxActiveConsumingContractAgreements:a(t,"maxActiveConsumingContractAgreements")?t.maxActiveConsumingContractAgreements:void 0}}function te(t){if(t!==void 0)return t===null?null:{numActiveConsumingContractAgreements:t.numActiveConsumingContractAgreements,maxActiveConsumingContractAgreements:t.maxActiveConsumingContractAgreements}}const ee={Running:"RUNNING",Ok:"OK",Error:"ERROR"};function re(t){let e=!0;return e=e&&"name"in t,e=e&&"code"in t,e=e&&"simplifiedState"in t,e}function D(t){return X(t)}function X(t,e){return t==null?t:{name:t.name,code:t.code,simplifiedState:t.simplifiedState}}function T(t){if(t!==void 0)return t===null?null:{name:t.name,code:t.code,simplifiedState:t.simplifiedState}}function ne(t){let e=!0;return e=e&&"transferProcessId"in t,e=e&&"lastUpdatedDate"in t,e=e&&"state"in t,e}function Y(t){return W(t)}function W(t,e){return t==null?t:{transferProcessId:t.transferProcessId,lastUpdatedDate:new Date(t.lastUpdatedDate),state:D(t.state),errorMessage:a(t,"errorMessage")?t.errorMessage:void 0}}function Z(t){if(t!==void 0)return t===null?null:{transferProcessId:t.transferProcessId,lastUpdatedDate:t.lastUpdatedDate.toISOString(),state:T(t.state),errorMessage:t.errorMessage}}const ie={Empty:"EMPTY",AtomicConstraint:"ATOMIC_CONSTRAINT",And:"AND",Or:"OR",Xor:"XOR"};function oe(t){return!0}function y(t){return v(t)}function v(t,e){return t==null?t:{type:a(t,"type")?t.type:void 0,atomicConstraint:a(t,"atomicConstraint")?$(t.atomicConstraint):void 0,and:a(t,"and")?t.and.map(y):void 0,or:a(t,"or")?t.or.map(y):void 0,xor:a(t,"xor")?t.xor.map(y):void 0}}function l(t){if(t!==void 0)return t===null?null:{type:t.type,atomicConstraint:_(t.atomicConstraint),and:t.and===void 0?void 0:t.and.map(l),or:t.or===void 0?void 0:t.or.map(l),xor:t.xor===void 0?void 0:t.xor.map(l)}}function se(t){let e=!0;return e=e&&"constraints"in t,e}function x(t){return j(t)}function j(t,e){return t==null?t:{constraints:y(t.constraints)}}function tt(t){if(t!==void 0)return t===null?null:{constraints:l(t.constraints)}}function ae(t){return!0}function A(t){return et(t)}function et(t,e){return t==null?t:{legacyPolicy:a(t,"legacyPolicy")?t.legacyPolicy:void 0,permission:a(t,"permission")?x(t.permission):void 0}}function P(t){if(t!==void 0)return t===null?null:{legacyPolicy:t.legacyPolicy,permission:tt(t.permission)}}const ce={Consuming:"CONSUMING",Providing:"PROVIDING"};function de(t){let e=!0;return e=e&&"contractAgreementId"in t,e=e&&"contractNegotiationId"in t,e=e&&"direction"in t,e=e&&"counterPartyAddress"in t,e=e&&"counterPartyId"in t,e=e&&"contractSigningDate"in t,e=e&&"contractStartDate"in t,e=e&&"contractEndDate"in t,e=e&&"asset"in t,e=e&&"contractPolicy"in t,e=e&&"transferProcesses"in t,e}function rt(t){return nt(t)}function nt(t,e){return t==null?t:{contractAgreementId:t.contractAgreementId,contractNegotiationId:t.contractNegotiationId,direction:t.direction,counterPartyAddress:t.counterPartyAddress,counterPartyId:t.counterPartyId,contractSigningDate:new Date(t.contractSigningDate),contractStartDate:new Date(t.contractStartDate),contractEndDate:new Date(t.contractEndDate),asset:R(t.asset),contractPolicy:A(t.contractPolicy),transferProcesses:t.transferProcesses.map(Y)}}function it(t){if(t!==void 0)return t===null?null:{contractAgreementId:t.contractAgreementId,contractNegotiationId:t.contractNegotiationId,direction:t.direction,counterPartyAddress:t.counterPartyAddress,counterPartyId:t.counterPartyId,contractSigningDate:t.contractSigningDate.toISOString(),contractStartDate:t.contractStartDate.toISOString(),contractEndDate:t.contractEndDate.toISOString(),asset:q(t.asset),contractPolicy:P(t.contractPolicy),transferProcesses:t.transferProcesses.map(Z)}}function ue(t){let e=!0;return e=e&&"contractAgreements"in t,e}function ot(t){return st(t)}function st(t,e){return t==null?t:{contractAgreements:t.contractAgreements.map(rt)}}function fe(t){if(t!==void 0)return t===null?null:{contractAgreements:t.contractAgreements.map(it)}}function me(t){let e=!0;return e=e&&"contractAgreementId"in t,e=e&&"dataSinkProperties"in t,e=e&&"properties"in t,e}function at(t){return ct(t)}function ct(t,e){return t==null?t:{contractAgreementId:t.contractAgreementId,dataSinkProperties:t.dataSinkProperties,properties:t.properties}}function dt(t){if(t!==void 0)return t===null?null:{contractAgreementId:t.contractAgreementId,dataSinkProperties:t.dataSinkProperties,properties:t.properties}}const pe={ParamsOnly:"PARAMS_ONLY",CustomJson:"CUSTOM_JSON"};function ge(t){let e=!0;return e=e&&"type"in t,e}function ye(t){return ut(t)}function ut(t,e){return t==null?t:{type:t.type,params:a(t,"params")?at(t.params):void 0,customJson:a(t,"customJson")?t.customJson:void 0}}function ft(t){if(t!==void 0)return t===null?null:{type:t.type,params:dt(t.params),customJson:t.customJson}}function le(t){let e=!0;return e=e&&"operandLeft"in t,e=e&&"operator"in t,e}function mt(t){return pt(t)}function pt(t,e){return t==null?t:{operandLeft:t.operandLeft,operator:t.operator,operandRight:a(t,"operandRight")?t.operandRight:void 0}}function gt(t){if(t!==void 0)return t===null?null:{operandLeft:t.operandLeft,operator:t.operator,operandRight:t.operandRight}}function Se(t){let e=!0;return e=e&&"accessPolicyId"in t,e=e&&"contractPolicyId"in t,e=e&&"criteria"in t,e}function yt(t){return lt(t)}function lt(t,e){return t==null?t:{id:a(t,"id")?t.id:void 0,accessPolicyId:t.accessPolicyId,contractPolicyId:t.contractPolicyId,criteria:t.criteria.map(mt),validity:a(t,"validity")?t.validity:void 0}}function St(t){if(t!==void 0)return t===null?null:{id:t.id,accessPolicyId:t.accessPolicyId,contractPolicyId:t.contractPolicyId,criteria:t.criteria.map(gt),validity:t.validity}}function Oe(t){let e=!0;return e=e&&"id"in t,e=e&&"policy"in t,e}function Ot(t){return Dt(t)}function Dt(t,e){return t==null?t:{id:t.id,policy:A(t.policy)}}function Tt(t){if(t!==void 0)return t===null?null:{id:t.id,policy:P(t.policy)}}function De(t){return!0}function Te(t){return At(t)}function At(t,e){return t==null?t:{assetEntry:a(t,"assetEntry")?G(t.assetEntry):void 0,policyDefinitionRequest:a(t,"policyDefinitionRequest")?Ot(t.policyDefinitionRequest):void 0,contractDefinitionRequest:a(t,"contractDefinitionRequest")?yt(t.contractDefinitionRequest):void 0}}function Pt(t){if(t!==void 0)return t===null?null:{assetEntry:B(t.assetEntry),policyDefinitionRequest:Tt(t.policyDefinitionRequest),contractDefinitionRequest:St(t.contractDefinitionRequest)}}function Ae(t){return!0}function Ct(t){return Nt(t)}function Nt(t,e){return t==null?t:{createdAt:a(t,"createdAt")?t.createdAt:void 0,id:a(t,"id")?t.id:void 0}}function Pe(t){if(t!==void 0)return t===null?null:{createdAt:t.createdAt,id:t.id}}function Ce(t){let e=!0;return e=e&&"incomingTransferProcessCounts"in t,e=e&&"outgoingTransferProcessCounts"in t,e}function ht(t){return Jt(t)}function Jt(t,e){return t==null?t:{incomingTransferProcessCounts:t.incomingTransferProcessCounts,outgoingTransferProcessCounts:t.outgoingTransferProcessCounts}}function Ft(t){if(t!==void 0)return t===null?null:{incomingTransferProcessCounts:t.incomingTransferProcessCounts,outgoingTransferProcessCounts:t.outgoingTransferProcessCounts}}function Ne(t){let e=!0;return e=e&&"assetsCount"in t,e=e&&"policiesCount"in t,e=e&&"contractDefinitionsCount"in t,e=e&&"contractAgreementsCount"in t,e=e&&"transferProcessDto"in t,e}function wt(t){return It(t)}function It(t,e){return t==null?t:{assetsCount:t.assetsCount,policiesCount:t.policiesCount,contractDefinitionsCount:t.contractDefinitionsCount,contractAgreementsCount:t.contractAgreementsCount,transferProcessDto:ht(t.transferProcessDto)}}function he(t){if(t!==void 0)return t===null?null:{assetsCount:t.assetsCount,policiesCount:t.policiesCount,contractDefinitionsCount:t.contractDefinitionsCount,contractAgreementsCount:t.contractAgreementsCount,transferProcessDto:Ft(t.transferProcessDto)}}function Je(t){let e=!0;return e=e&&"storedFileId"in t,e=e&&"fileName"in t,e=e&&"fileExtension"in t,e=e&&"mediaType"in t,e=e&&"byteSize"in t,e=e&&"assetProperties"in t,e=e&&"creationDate"in t,e=e&&"lastModifiedDate"in t,e}function C(t){return Rt(t)}function Rt(t,e){return t==null?t:{storedFileId:t.storedFileId,fileName:t.fileName,fileExtension:t.fileExtension,mediaType:t.mediaType,byteSize:t.byteSize,assetProperties:t.assetProperties,creationDate:new Date(t.creationDate),lastModifiedDate:new Date(t.lastModifiedDate)}}function Fe(t){if(t!==void 0)return t===null?null:{storedFileId:t.storedFileId,fileName:t.fileName,fileExtension:t.fileExtension,mediaType:t.mediaType,byteSize:t.byteSize,assetProperties:t.assetProperties,creationDate:t.creationDate.toISOString(),lastModifiedDate:t.lastModifiedDate.toISOString()}}const we={Consuming:"CONSUMING",Providing:"PROVIDING"};function Ie(t){let e=!0;return e=e&&"transferProcessId"in t,e=e&&"createdDate"in t,e=e&&"lastUpdatedDate"in t,e=e&&"state"in t,e=e&&"contractAgreementId"in t,e=e&&"direction"in t,e=e&&"counterPartyConnectorEndpoint"in t,e=e&&"assetName"in t,e=e&&"assetId"in t,e}function Et(t){return qt(t)}function qt(t,e){return t==null?t:{transferProcessId:t.transferProcessId,createdDate:new Date(t.createdDate),lastUpdatedDate:new Date(t.lastUpdatedDate),state:D(t.state),contractAgreementId:t.contractAgreementId,direction:t.direction,counterPartyConnectorEndpoint:t.counterPartyConnectorEndpoint,assetName:t.assetName,assetId:t.assetId,errorMessage:a(t,"errorMessage")?t.errorMessage:void 0}}function bt(t){if(t!==void 0)return t===null?null:{transferProcessId:t.transferProcessId,createdDate:t.createdDate.toISOString(),lastUpdatedDate:t.lastUpdatedDate.toISOString(),state:T(t.state),contractAgreementId:t.contractAgreementId,direction:t.direction,counterPartyConnectorEndpoint:t.counterPartyConnectorEndpoint,assetName:t.assetName,assetId:t.assetId,errorMessage:t.errorMessage}}function Re(t){let e=!0;return e=e&&"transferEntries"in t,e}function Mt(t){return Ut(t)}function Ut(t,e){return t==null?t:{transferEntries:t.transferEntries.map(Et)}}function Ee(t){if(t!==void 0)return t===null?null:{transferEntries:t.transferEntries.map(bt)}}class Lt extends m{async connectorLimitsRaw(e){const n={},i={},o=await this.request({path:"/wrapper/ee/connector-limits",method:"GET",headers:i,query:n},e);return new u(o,s=>z(s))}async connectorLimits(e){return await(await this.connectorLimitsRaw(e)).value()}async createStoredFileAssetRaw(e,n){if(e.storedFileId===null||e.storedFileId===void 0)throw new S("storedFileId","Required parameter requestParameters.storedFileId was null or undefined when calling createStoredFileAsset.");if(e.requestBody===null||e.requestBody===void 0)throw new S("requestBody","Required parameter requestParameters.requestBody was null or undefined when calling createStoredFileAsset.");const i={},o={};o["Content-Type"]="application/json";const s=await this.request({path:"/wrapper/ee/file-storage/{storedFileId}/assets".replace("{storedFileId}",encodeURIComponent(String(e.storedFileId))),method:"POST",headers:o,query:i,body:e.requestBody},n);return new u(s,f=>C(f))}async createStoredFileAsset(e,n){return await(await this.createStoredFileAssetRaw(e,n)).value()}async listStoredFilesRaw(e){const n={},i={},o=await this.request({path:"/wrapper/ee/file-storage/stored-files",method:"GET",headers:i,query:n},e);return new u(o,s=>s.map(C))}async listStoredFiles(e){return await(await this.listStoredFilesRaw(e)).value()}}class Ht extends m{async contractAgreementEndpointRaw(e){const n={},i={},o=await this.request({path:"/wrapper/ui/pages/contract-agreement-page",method:"GET",headers:i,query:n},e);return new u(o,s=>ot(s))}async contractAgreementEndpoint(e){return await(await this.contractAgreementEndpointRaw(e)).value()}async initiateTransferRaw(e,n){const i={},o={};o["Content-Type"]="application/json";const s=await this.request({path:"/wrapper/ui/pages/contract-agreement-page/transfers",method:"POST",headers:o,query:i,body:ft(e.contractAgreementTransferRequest)},n);return new u(s,f=>Ct(f))}async initiateTransfer(e={},n){return await(await this.initiateTransferRaw(e,n)).value()}async transferHistoryPageEndpointRaw(e){const n={},i={},o=await this.request({path:"/wrapper/ui/pages/transfer-history-page",method:"GET",headers:i,query:n},e);return new u(o,s=>Mt(s))}async transferHistoryPageEndpoint(e){return await(await this.transferHistoryPageEndpointRaw(e)).value()}}class Kt extends m{async createOfferEndpointRaw(e,n){const i={},o={};o["Content-Type"]="application/json";const s=await this.request({path:"/wrapper/use-case-api/contract-offer",method:"POST",headers:o,query:i,body:Pt(e.createOfferingDto)},n);return new I(s)}async createOfferEndpoint(e={},n){await this.createOfferEndpointRaw(e,n)}async getSupportedFunctionsRaw(e){const n={},i={},o=await this.request({path:"/wrapper/use-case-api/supported-policy-functions",method:"GET",headers:i,query:n},e);return new u(o)}async getSupportedFunctions(e){return await(await this.getSupportedFunctionsRaw(e)).value()}async kpiEndpointRaw(e){const n={},i={},o=await this.request({path:"/wrapper/use-case-api/kpis",method:"GET",headers:i,query:n},e);return new u(o,s=>wt(s))}async kpiEndpoint(e){return await(await this.kpiEndpointRaw(e)).value()}}function qe(t){const e=new d({basePath:t.managementApiUrl,headers:{"x-api-key":t.managementApiKey??"ApiKeyDefaultValue"},credentials:"same-origin",...t.configOverrides});return{uiApi:new Ht(e),useCaseApi:new Kt(e),enterpriseEditionApi:new Lt(e)}}r.AssetDtoFromJSON=R,r.AssetDtoFromJSONTyped=E,r.AssetDtoToJSON=q,r.AssetEntryDtoFromJSON=G,r.AssetEntryDtoFromJSONTyped=k,r.AssetEntryDtoToJSON=B,r.AssetRequestDtoFromJSON=b,r.AssetRequestDtoFromJSONTyped=M,r.AssetRequestDtoToJSON=U,r.AtomicConstraintDtoFromJSON=$,r.AtomicConstraintDtoFromJSONTyped=V,r.AtomicConstraintDtoOperatorEnum=vt,r.AtomicConstraintDtoToJSON=_,r.BASE_PATH=c,r.BaseAPI=m,r.BlobApiResponse=zt,r.COLLECTION_FORMATS=$t,r.Configuration=d,r.ConnectorLimitsFromJSON=z,r.ConnectorLimitsFromJSONTyped=Q,r.ConnectorLimitsToJSON=te,r.ContractAgreementCardDirectionEnum=ce,r.ContractAgreementCardFromJSON=rt,r.ContractAgreementCardFromJSONTyped=nt,r.ContractAgreementCardToJSON=it,r.ContractAgreementPageFromJSON=ot,r.ContractAgreementPageFromJSONTyped=st,r.ContractAgreementPageToJSON=fe,r.ContractAgreementTransferProcessFromJSON=Y,r.ContractAgreementTransferProcessFromJSONTyped=W,r.ContractAgreementTransferProcessToJSON=Z,r.ContractAgreementTransferRequestFromJSON=ye,r.ContractAgreementTransferRequestFromJSONTyped=ut,r.ContractAgreementTransferRequestParamsFromJSON=at,r.ContractAgreementTransferRequestParamsFromJSONTyped=ct,r.ContractAgreementTransferRequestParamsToJSON=dt,r.ContractAgreementTransferRequestToJSON=ft,r.ContractAgreementTransferRequestTypeEnum=pe,r.ContractDefinitionRequestDtoFromJSON=yt,r.ContractDefinitionRequestDtoFromJSONTyped=lt,r.ContractDefinitionRequestDtoToJSON=St,r.CreateOfferingDtoFromJSON=Te,r.CreateOfferingDtoFromJSONTyped=At,r.CreateOfferingDtoToJSON=Pt,r.CriterionDtoFromJSON=mt,r.CriterionDtoFromJSONTyped=pt,r.CriterionDtoToJSON=gt,r.DataAddressDtoFromJSON=L,r.DataAddressDtoFromJSONTyped=H,r.DataAddressDtoToJSON=K,r.DefaultConfig=h,r.EnterpriseEditionApi=Lt,r.ExpressionDtoFromJSON=y,r.ExpressionDtoFromJSONTyped=v,r.ExpressionDtoToJSON=l,r.ExpressionDtoTypeEnum=ie,r.FetchError=F,r.IdResponseDtoFromJSON=Ct,r.IdResponseDtoFromJSONTyped=Nt,r.IdResponseDtoToJSON=Pe,r.JSONApiResponse=u,r.KpiResultFromJSON=wt,r.KpiResultFromJSONTyped=It,r.KpiResultToJSON=he,r.PermissionDtoFromJSON=x,r.PermissionDtoFromJSONTyped=j,r.PermissionDtoToJSON=tt,r.PolicyDefinitionRequestDtoFromJSON=Ot,r.PolicyDefinitionRequestDtoFromJSONTyped=Dt,r.PolicyDefinitionRequestDtoToJSON=Tt,r.PolicyDtoFromJSON=A,r.PolicyDtoFromJSONTyped=et,r.PolicyDtoToJSON=P,r.RequiredError=S,r.ResponseError=J,r.StoredFileFromJSON=C,r.StoredFileFromJSONTyped=Rt,r.StoredFileToJSON=Fe,r.TextApiResponse=Qt,r.TransferHistoryEntryDirectionEnum=we,r.TransferHistoryEntryFromJSON=Et,r.TransferHistoryEntryFromJSONTyped=qt,r.TransferHistoryEntryToJSON=bt,r.TransferHistoryPageFromJSON=Mt,r.TransferHistoryPageFromJSONTyped=Ut,r.TransferHistoryPageToJSON=Ee,r.TransferProcessStateFromJSON=D,r.TransferProcessStateFromJSONTyped=X,r.TransferProcessStateSimplifiedStateEnum=ee,r.TransferProcessStateToJSON=T,r.TransferProcessStatesDtoFromJSON=ht,r.TransferProcessStatesDtoFromJSONTyped=Jt,r.TransferProcessStatesDtoToJSON=Ft,r.UIApi=Ht,r.UseCaseApi=Kt,r.VoidApiResponse=I,r.buildEdcClient=qe,r.canConsumeForm=_t,r.exists=a,r.instanceOfAssetDto=Xt,r.instanceOfAssetEntryDto=Zt,r.instanceOfAssetRequestDto=Yt,r.instanceOfAtomicConstraintDto=xt,r.instanceOfConnectorLimits=jt,r.instanceOfContractAgreementCard=de,r.instanceOfContractAgreementPage=ue,r.instanceOfContractAgreementTransferProcess=ne,r.instanceOfContractAgreementTransferRequest=ge,r.instanceOfContractAgreementTransferRequestParams=me,r.instanceOfContractDefinitionRequestDto=Se,r.instanceOfCreateOfferingDto=De,r.instanceOfCriterionDto=le,r.instanceOfDataAddressDto=Wt,r.instanceOfExpressionDto=oe,r.instanceOfIdResponseDto=Ae,r.instanceOfKpiResult=Ne,r.instanceOfPermissionDto=se,r.instanceOfPolicyDefinitionRequestDto=Oe,r.instanceOfPolicyDto=ae,r.instanceOfStoredFile=Je,r.instanceOfTransferHistoryEntry=Ie,r.instanceOfTransferHistoryPage=Re,r.instanceOfTransferProcessState=re,r.instanceOfTransferProcessStatesDto=Ce,r.mapValues=Vt,r.querystring=O,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(r,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(r=typeof globalThis<"u"?globalThis:r||self,c(r["sovity-edc-client"]={}))})(this,function(r){"use strict";var Me=Object.defineProperty;var Ue=(r,c,f)=>c in r?Me(r,c,{enumerable:!0,configurable:!0,writable:!0,value:f}):r[c]=f;var p=(r,c,f)=>(Ue(r,typeof c!="symbol"?c+"":c,f),f);const c="http://localhost".replace(/\/+$/,"");class f{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:c}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||O}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){const e=this.configuration.accessToken;if(e)return typeof e=="function"?e:async()=>e}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const J=new f,h=class{constructor(e=J){p(this,"middleware");p(this,"fetchApi",async(e,n)=>{let i={url:e,init:n};for(const s of this.middleware)s.pre&&(i=await s.pre({fetch:this.fetchApi,...i})||i);let o;try{o=await(this.configuration.fetchApi||fetch)(i.url,i.init)}catch(s){for(const d of this.middleware)d.onError&&(o=await d.onError({fetch:this.fetchApi,url:i.url,init:i.init,error:s,response:o?o.clone():void 0})||o);if(o===void 0)throw s instanceof Error?new I(s,"The request failed and the interceptors did not return an alternative response"):s}for(const s of this.middleware)s.post&&(o=await s.post({fetch:this.fetchApi,url:i.url,init:i.init,response:o.clone()})||o);return o});this.configuration=e,this.middleware=e.middleware}withMiddleware(...e){const n=this.clone();return n.middleware=n.middleware.concat(...e),n}withPreMiddleware(...e){const n=e.map(i=>({pre:i}));return this.withMiddleware(...n)}withPostMiddleware(...e){const n=e.map(i=>({post:i}));return this.withMiddleware(...n)}isJsonMime(e){return e?h.jsonRegex.test(e):!1}async request(e,n){const{url:i,init:o}=await this.createFetchParams(e,n),s=await this.fetchApi(i,o);if(s&&s.status>=200&&s.status<300)return s;throw new w(s,"Response returned an error code")}async createFetchParams(e,n){let i=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(i+="?"+this.configuration.queryParamsStringify(e.query));const o=Object.assign({},this.configuration.headers,e.headers);Object.keys(o).forEach(Kt=>o[Kt]===void 0?delete o[Kt]:{});const s=typeof n=="function"?n:async()=>n,d={method:e.method,headers:o,body:e.body,credentials:this.configuration.credentials},g={...d,...await s({init:d,context:e})},be={...g,body:kt(g.body)||g.body instanceof URLSearchParams||$t(g.body)?g.body:JSON.stringify(g.body)};return{url:i,init:be}}clone(){const e=this.constructor,n=new e(this.configuration);return n.middleware=this.middleware.slice(),n}};let m=h;p(m,"jsonRegex",new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i"));function $t(t){return typeof Blob<"u"&&t instanceof Blob}function kt(t){return typeof FormData<"u"&&t instanceof FormData}class w extends Error{constructor(n,i){super(i);p(this,"name","ResponseError");this.response=n}}class I extends Error{constructor(n,i){super(i);p(this,"name","FetchError");this.cause=n}}class S extends Error{constructor(n,i){super(i);p(this,"name","RequiredError");this.field=n}}const Bt={csv:",",ssv:" ",tsv:" ",pipes:"|"};function a(t,e){const n=t[e];return n!=null}function O(t,e=""){return Object.keys(t).map(n=>F(n,t[n],e)).filter(n=>n.length>0).join("&")}function F(t,e,n=""){const i=n+(n.length?`[${t}]`:t);if(e instanceof Array){const o=e.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(i)}=`);return`${encodeURIComponent(i)}=${o}`}if(e instanceof Set){const o=Array.from(e);return F(t,o,n)}return e instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?O(e,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(e))}`}function Vt(t,e){return Object.keys(t).reduce((n,i)=>({...n,[i]:e(t[i])}),{})}function _t(t){for(const e of t)if(e.contentType==="multipart/form-data")return!0;return!1}class u{constructor(e,n=i=>i){this.raw=e,this.transformer=n}async value(){return this.transformer(await this.raw.json())}}class R{constructor(e){this.raw=e}async value(){}}class zt{constructor(e){this.raw=e}async value(){return await this.raw.blob()}}class Qt{constructor(e){this.raw=e}async value(){return await this.raw.text()}}function Xt(t){let e=!0;return e=e&&"assetId"in t,e=e&&"createdAt"in t,e=e&&"properties"in t,e}function D(t){return E(t)}function E(t,e){return t==null?t:{assetId:t.assetId,createdAt:new Date(t.createdAt),properties:t.properties}}function q(t){if(t!==void 0)return t===null?null:{assetId:t.assetId,createdAt:t.createdAt.toISOString(),properties:t.properties}}function Yt(t){let e=!0;return e=e&&"properties"in t,e}function b(t){return M(t)}function M(t,e){return t==null?t:{id:a(t,"id")?t.id:void 0,properties:t.properties}}function U(t){if(t!==void 0)return t===null?null:{id:t.id,properties:t.properties}}function Wt(t){let e=!0;return e=e&&"properties"in t,e}function L(t){return H(t)}function H(t,e){return t==null?t:{properties:t.properties}}function G(t){if(t!==void 0)return t===null?null:{properties:t.properties}}function Zt(t){let e=!0;return e=e&&"asset"in t,e=e&&"dataAddress"in t,e}function K(t){return $(t)}function $(t,e){return t==null?t:{asset:b(t.asset),dataAddress:L(t.dataAddress)}}function k(t){if(t!==void 0)return t===null?null:{asset:U(t.asset),dataAddress:G(t.dataAddress)}}const vt={Eq:"EQ",Neq:"NEQ",Gt:"GT",Geq:"GEQ",Lt:"LT",Leq:"LEQ",In:"IN"};function xt(t){let e=!0;return e=e&&"leftExpression"in t,e=e&&"operator"in t,e=e&&"rightExpression"in t,e}function B(t){return V(t)}function V(t,e){return t==null?t:{leftExpression:t.leftExpression,operator:t.operator,rightExpression:t.rightExpression}}function _(t){if(t!==void 0)return t===null?null:{leftExpression:t.leftExpression,operator:t.operator,rightExpression:t.rightExpression}}function jt(t){let e=!0;return e=e&&"numActiveConsumingContractAgreements"in t,e}function z(t){return Q(t)}function Q(t,e){return t==null?t:{numActiveConsumingContractAgreements:t.numActiveConsumingContractAgreements,maxActiveConsumingContractAgreements:a(t,"maxActiveConsumingContractAgreements")?t.maxActiveConsumingContractAgreements:void 0}}function te(t){if(t!==void 0)return t===null?null:{numActiveConsumingContractAgreements:t.numActiveConsumingContractAgreements,maxActiveConsumingContractAgreements:t.maxActiveConsumingContractAgreements}}const ee={Running:"RUNNING",Ok:"OK",Error:"ERROR"};function re(t){let e=!0;return e=e&&"name"in t,e=e&&"code"in t,e=e&&"simplifiedState"in t,e}function T(t){return X(t)}function X(t,e){return t==null?t:{name:t.name,code:t.code,simplifiedState:t.simplifiedState}}function A(t){if(t!==void 0)return t===null?null:{name:t.name,code:t.code,simplifiedState:t.simplifiedState}}function ne(t){let e=!0;return e=e&&"transferProcessId"in t,e=e&&"lastUpdatedDate"in t,e=e&&"state"in t,e}function Y(t){return W(t)}function W(t,e){return t==null?t:{transferProcessId:t.transferProcessId,lastUpdatedDate:new Date(t.lastUpdatedDate),state:T(t.state),errorMessage:a(t,"errorMessage")?t.errorMessage:void 0}}function Z(t){if(t!==void 0)return t===null?null:{transferProcessId:t.transferProcessId,lastUpdatedDate:t.lastUpdatedDate.toISOString(),state:A(t.state),errorMessage:t.errorMessage}}const ie={Empty:"EMPTY",AtomicConstraint:"ATOMIC_CONSTRAINT",And:"AND",Or:"OR",Xor:"XOR"};function oe(t){return!0}function y(t){return v(t)}function v(t,e){return t==null?t:{type:a(t,"type")?t.type:void 0,atomicConstraint:a(t,"atomicConstraint")?B(t.atomicConstraint):void 0,and:a(t,"and")?t.and.map(y):void 0,or:a(t,"or")?t.or.map(y):void 0,xor:a(t,"xor")?t.xor.map(y):void 0}}function l(t){if(t!==void 0)return t===null?null:{type:t.type,atomicConstraint:_(t.atomicConstraint),and:t.and===void 0?void 0:t.and.map(l),or:t.or===void 0?void 0:t.or.map(l),xor:t.xor===void 0?void 0:t.xor.map(l)}}function se(t){let e=!0;return e=e&&"constraints"in t,e}function x(t){return j(t)}function j(t,e){return t==null?t:{constraints:y(t.constraints)}}function tt(t){if(t!==void 0)return t===null?null:{constraints:l(t.constraints)}}function ae(t){return!0}function P(t){return et(t)}function et(t,e){return t==null?t:{legacyPolicy:a(t,"legacyPolicy")?t.legacyPolicy:void 0,permission:a(t,"permission")?x(t.permission):void 0}}function C(t){if(t!==void 0)return t===null?null:{legacyPolicy:t.legacyPolicy,permission:tt(t.permission)}}const ce={Consuming:"CONSUMING",Providing:"PROVIDING"};function de(t){let e=!0;return e=e&&"contractAgreementId"in t,e=e&&"contractNegotiationId"in t,e=e&&"direction"in t,e=e&&"counterPartyAddress"in t,e=e&&"counterPartyId"in t,e=e&&"contractSigningDate"in t,e=e&&"contractStartDate"in t,e=e&&"contractEndDate"in t,e=e&&"asset"in t,e=e&&"contractPolicy"in t,e=e&&"transferProcesses"in t,e}function rt(t){return nt(t)}function nt(t,e){return t==null?t:{contractAgreementId:t.contractAgreementId,contractNegotiationId:t.contractNegotiationId,direction:t.direction,counterPartyAddress:t.counterPartyAddress,counterPartyId:t.counterPartyId,contractSigningDate:new Date(t.contractSigningDate),contractStartDate:new Date(t.contractStartDate),contractEndDate:new Date(t.contractEndDate),asset:D(t.asset),contractPolicy:P(t.contractPolicy),transferProcesses:t.transferProcesses.map(Y)}}function it(t){if(t!==void 0)return t===null?null:{contractAgreementId:t.contractAgreementId,contractNegotiationId:t.contractNegotiationId,direction:t.direction,counterPartyAddress:t.counterPartyAddress,counterPartyId:t.counterPartyId,contractSigningDate:t.contractSigningDate.toISOString(),contractStartDate:t.contractStartDate.toISOString(),contractEndDate:t.contractEndDate.toISOString(),asset:q(t.asset),contractPolicy:C(t.contractPolicy),transferProcesses:t.transferProcesses.map(Z)}}function ue(t){let e=!0;return e=e&&"contractAgreements"in t,e}function ot(t){return st(t)}function st(t,e){return t==null?t:{contractAgreements:t.contractAgreements.map(rt)}}function fe(t){if(t!==void 0)return t===null?null:{contractAgreements:t.contractAgreements.map(it)}}function me(t){let e=!0;return e=e&&"contractAgreementId"in t,e=e&&"dataSinkProperties"in t,e=e&&"properties"in t,e}function at(t){return ct(t)}function ct(t,e){return t==null?t:{contractAgreementId:t.contractAgreementId,dataSinkProperties:t.dataSinkProperties,properties:t.properties}}function dt(t){if(t!==void 0)return t===null?null:{contractAgreementId:t.contractAgreementId,dataSinkProperties:t.dataSinkProperties,properties:t.properties}}const pe={ParamsOnly:"PARAMS_ONLY",CustomJson:"CUSTOM_JSON"};function ge(t){let e=!0;return e=e&&"type"in t,e}function ye(t){return ut(t)}function ut(t,e){return t==null?t:{type:t.type,params:a(t,"params")?at(t.params):void 0,customJson:a(t,"customJson")?t.customJson:void 0}}function ft(t){if(t!==void 0)return t===null?null:{type:t.type,params:dt(t.params),customJson:t.customJson}}function le(t){let e=!0;return e=e&&"operandLeft"in t,e=e&&"operator"in t,e}function mt(t){return pt(t)}function pt(t,e){return t==null?t:{operandLeft:t.operandLeft,operator:t.operator,operandRight:a(t,"operandRight")?t.operandRight:void 0}}function gt(t){if(t!==void 0)return t===null?null:{operandLeft:t.operandLeft,operator:t.operator,operandRight:t.operandRight}}function Se(t){let e=!0;return e=e&&"accessPolicyId"in t,e=e&&"contractPolicyId"in t,e=e&&"criteria"in t,e}function yt(t){return lt(t)}function lt(t,e){return t==null?t:{id:a(t,"id")?t.id:void 0,accessPolicyId:t.accessPolicyId,contractPolicyId:t.contractPolicyId,criteria:t.criteria.map(mt),validity:a(t,"validity")?t.validity:void 0}}function St(t){if(t!==void 0)return t===null?null:{id:t.id,accessPolicyId:t.accessPolicyId,contractPolicyId:t.contractPolicyId,criteria:t.criteria.map(gt),validity:t.validity}}function Oe(t){let e=!0;return e=e&&"id"in t,e=e&&"policy"in t,e}function Ot(t){return Dt(t)}function Dt(t,e){return t==null?t:{id:t.id,policy:P(t.policy)}}function Tt(t){if(t!==void 0)return t===null?null:{id:t.id,policy:C(t.policy)}}function De(t){return!0}function Te(t){return At(t)}function At(t,e){return t==null?t:{assetEntry:a(t,"assetEntry")?K(t.assetEntry):void 0,policyDefinitionRequest:a(t,"policyDefinitionRequest")?Ot(t.policyDefinitionRequest):void 0,contractDefinitionRequest:a(t,"contractDefinitionRequest")?yt(t.contractDefinitionRequest):void 0}}function Pt(t){if(t!==void 0)return t===null?null:{assetEntry:k(t.assetEntry),policyDefinitionRequest:Tt(t.policyDefinitionRequest),contractDefinitionRequest:St(t.contractDefinitionRequest)}}function Ae(t){return!0}function Ct(t){return Nt(t)}function Nt(t,e){return t==null?t:{createdAt:a(t,"createdAt")?t.createdAt:void 0,id:a(t,"id")?t.id:void 0}}function Pe(t){if(t!==void 0)return t===null?null:{createdAt:t.createdAt,id:t.id}}function Ce(t){let e=!0;return e=e&&"incomingTransferProcessCounts"in t,e=e&&"outgoingTransferProcessCounts"in t,e}function ht(t){return Jt(t)}function Jt(t,e){return t==null?t:{incomingTransferProcessCounts:t.incomingTransferProcessCounts,outgoingTransferProcessCounts:t.outgoingTransferProcessCounts}}function wt(t){if(t!==void 0)return t===null?null:{incomingTransferProcessCounts:t.incomingTransferProcessCounts,outgoingTransferProcessCounts:t.outgoingTransferProcessCounts}}function Ne(t){let e=!0;return e=e&&"assetsCount"in t,e=e&&"policiesCount"in t,e=e&&"contractDefinitionsCount"in t,e=e&&"contractAgreementsCount"in t,e=e&&"transferProcessDto"in t,e}function It(t){return Ft(t)}function Ft(t,e){return t==null?t:{assetsCount:t.assetsCount,policiesCount:t.policiesCount,contractDefinitionsCount:t.contractDefinitionsCount,contractAgreementsCount:t.contractAgreementsCount,transferProcessDto:ht(t.transferProcessDto)}}function he(t){if(t!==void 0)return t===null?null:{assetsCount:t.assetsCount,policiesCount:t.policiesCount,contractDefinitionsCount:t.contractDefinitionsCount,contractAgreementsCount:t.contractAgreementsCount,transferProcessDto:wt(t.transferProcessDto)}}function Je(t){let e=!0;return e=e&&"storedFileId"in t,e=e&&"fileName"in t,e=e&&"fileExtension"in t,e=e&&"mediaType"in t,e=e&&"byteSize"in t,e=e&&"assetProperties"in t,e=e&&"creationDate"in t,e=e&&"lastModifiedDate"in t,e}function N(t){return Rt(t)}function Rt(t,e){return t==null?t:{storedFileId:t.storedFileId,fileName:t.fileName,fileExtension:t.fileExtension,mediaType:t.mediaType,byteSize:t.byteSize,assetProperties:t.assetProperties,creationDate:new Date(t.creationDate),lastModifiedDate:new Date(t.lastModifiedDate)}}function we(t){if(t!==void 0)return t===null?null:{storedFileId:t.storedFileId,fileName:t.fileName,fileExtension:t.fileExtension,mediaType:t.mediaType,byteSize:t.byteSize,assetProperties:t.assetProperties,creationDate:t.creationDate.toISOString(),lastModifiedDate:t.lastModifiedDate.toISOString()}}const Ie={Consuming:"CONSUMING",Providing:"PROVIDING"};function Fe(t){let e=!0;return e=e&&"transferProcessId"in t,e=e&&"createdDate"in t,e=e&&"lastUpdatedDate"in t,e=e&&"state"in t,e=e&&"contractAgreementId"in t,e=e&&"direction"in t,e=e&&"counterPartyConnectorEndpoint"in t,e=e&&"assetName"in t,e=e&&"assetId"in t,e}function Et(t){return qt(t)}function qt(t,e){return t==null?t:{transferProcessId:t.transferProcessId,createdDate:new Date(t.createdDate),lastUpdatedDate:new Date(t.lastUpdatedDate),state:T(t.state),contractAgreementId:t.contractAgreementId,direction:t.direction,counterPartyConnectorEndpoint:t.counterPartyConnectorEndpoint,assetName:t.assetName,assetId:t.assetId,errorMessage:a(t,"errorMessage")?t.errorMessage:void 0}}function bt(t){if(t!==void 0)return t===null?null:{transferProcessId:t.transferProcessId,createdDate:t.createdDate.toISOString(),lastUpdatedDate:t.lastUpdatedDate.toISOString(),state:A(t.state),contractAgreementId:t.contractAgreementId,direction:t.direction,counterPartyConnectorEndpoint:t.counterPartyConnectorEndpoint,assetName:t.assetName,assetId:t.assetId,errorMessage:t.errorMessage}}function Re(t){let e=!0;return e=e&&"transferEntries"in t,e}function Mt(t){return Ut(t)}function Ut(t,e){return t==null?t:{transferEntries:t.transferEntries.map(Et)}}function Ee(t){if(t!==void 0)return t===null?null:{transferEntries:t.transferEntries.map(bt)}}class Lt extends m{async connectorLimitsRaw(e){const n={},i={},o=await this.request({path:"/wrapper/ee/connector-limits",method:"GET",headers:i,query:n},e);return new u(o,s=>z(s))}async connectorLimits(e){return await(await this.connectorLimitsRaw(e)).value()}async createStoredFileAssetRaw(e,n){if(e.storedFileId===null||e.storedFileId===void 0)throw new S("storedFileId","Required parameter requestParameters.storedFileId was null or undefined when calling createStoredFileAsset.");if(e.requestBody===null||e.requestBody===void 0)throw new S("requestBody","Required parameter requestParameters.requestBody was null or undefined when calling createStoredFileAsset.");const i={},o={};o["Content-Type"]="application/json";const s=await this.request({path:"/wrapper/ee/file-storage/{storedFileId}/assets".replace("{storedFileId}",encodeURIComponent(String(e.storedFileId))),method:"POST",headers:o,query:i,body:e.requestBody},n);return new u(s,d=>N(d))}async createStoredFileAsset(e,n){return await(await this.createStoredFileAssetRaw(e,n)).value()}async listStoredFilesRaw(e){const n={},i={},o=await this.request({path:"/wrapper/ee/file-storage/stored-files",method:"GET",headers:i,query:n},e);return new u(o,s=>s.map(N))}async listStoredFiles(e){return await(await this.listStoredFilesRaw(e)).value()}}class Ht extends m{async contractAgreementEndpointRaw(e){const n={},i={},o=await this.request({path:"/wrapper/ui/pages/contract-agreement-page",method:"GET",headers:i,query:n},e);return new u(o,s=>ot(s))}async contractAgreementEndpoint(e){return await(await this.contractAgreementEndpointRaw(e)).value()}async getTransferProcessAssetRaw(e,n){if(e.transferProcessId===null||e.transferProcessId===void 0)throw new S("transferProcessId","Required parameter requestParameters.transferProcessId was null or undefined when calling getTransferProcessAsset.");const i={},o={},s=await this.request({path:"/wrapper/ui/pages/transfer-history-page/transfer-processes/{transferProcessId}/asset".replace("{transferProcessId}",encodeURIComponent(String(e.transferProcessId))),method:"GET",headers:o,query:i},n);return new u(s,d=>D(d))}async getTransferProcessAsset(e,n){return await(await this.getTransferProcessAssetRaw(e,n)).value()}async initiateTransferRaw(e,n){const i={},o={};o["Content-Type"]="application/json";const s=await this.request({path:"/wrapper/ui/pages/contract-agreement-page/transfers",method:"POST",headers:o,query:i,body:ft(e.contractAgreementTransferRequest)},n);return new u(s,d=>Ct(d))}async initiateTransfer(e={},n){return await(await this.initiateTransferRaw(e,n)).value()}async transferHistoryPageEndpointRaw(e){const n={},i={},o=await this.request({path:"/wrapper/ui/pages/transfer-history-page",method:"GET",headers:i,query:n},e);return new u(o,s=>Mt(s))}async transferHistoryPageEndpoint(e){return await(await this.transferHistoryPageEndpointRaw(e)).value()}}class Gt extends m{async createOfferEndpointRaw(e,n){const i={},o={};o["Content-Type"]="application/json";const s=await this.request({path:"/wrapper/use-case-api/contract-offer",method:"POST",headers:o,query:i,body:Pt(e.createOfferingDto)},n);return new R(s)}async createOfferEndpoint(e={},n){await this.createOfferEndpointRaw(e,n)}async getSupportedFunctionsRaw(e){const n={},i={},o=await this.request({path:"/wrapper/use-case-api/supported-policy-functions",method:"GET",headers:i,query:n},e);return new u(o)}async getSupportedFunctions(e){return await(await this.getSupportedFunctionsRaw(e)).value()}async kpiEndpointRaw(e){const n={},i={},o=await this.request({path:"/wrapper/use-case-api/kpis",method:"GET",headers:i,query:n},e);return new u(o,s=>It(s))}async kpiEndpoint(e){return await(await this.kpiEndpointRaw(e)).value()}}function qe(t){const e=new f({basePath:t.managementApiUrl,headers:{"x-api-key":t.managementApiKey??"ApiKeyDefaultValue"},credentials:"same-origin",...t.configOverrides});return{uiApi:new Ht(e),useCaseApi:new Gt(e),enterpriseEditionApi:new Lt(e)}}r.AssetDtoFromJSON=D,r.AssetDtoFromJSONTyped=E,r.AssetDtoToJSON=q,r.AssetEntryDtoFromJSON=K,r.AssetEntryDtoFromJSONTyped=$,r.AssetEntryDtoToJSON=k,r.AssetRequestDtoFromJSON=b,r.AssetRequestDtoFromJSONTyped=M,r.AssetRequestDtoToJSON=U,r.AtomicConstraintDtoFromJSON=B,r.AtomicConstraintDtoFromJSONTyped=V,r.AtomicConstraintDtoOperatorEnum=vt,r.AtomicConstraintDtoToJSON=_,r.BASE_PATH=c,r.BaseAPI=m,r.BlobApiResponse=zt,r.COLLECTION_FORMATS=Bt,r.Configuration=f,r.ConnectorLimitsFromJSON=z,r.ConnectorLimitsFromJSONTyped=Q,r.ConnectorLimitsToJSON=te,r.ContractAgreementCardDirectionEnum=ce,r.ContractAgreementCardFromJSON=rt,r.ContractAgreementCardFromJSONTyped=nt,r.ContractAgreementCardToJSON=it,r.ContractAgreementPageFromJSON=ot,r.ContractAgreementPageFromJSONTyped=st,r.ContractAgreementPageToJSON=fe,r.ContractAgreementTransferProcessFromJSON=Y,r.ContractAgreementTransferProcessFromJSONTyped=W,r.ContractAgreementTransferProcessToJSON=Z,r.ContractAgreementTransferRequestFromJSON=ye,r.ContractAgreementTransferRequestFromJSONTyped=ut,r.ContractAgreementTransferRequestParamsFromJSON=at,r.ContractAgreementTransferRequestParamsFromJSONTyped=ct,r.ContractAgreementTransferRequestParamsToJSON=dt,r.ContractAgreementTransferRequestToJSON=ft,r.ContractAgreementTransferRequestTypeEnum=pe,r.ContractDefinitionRequestDtoFromJSON=yt,r.ContractDefinitionRequestDtoFromJSONTyped=lt,r.ContractDefinitionRequestDtoToJSON=St,r.CreateOfferingDtoFromJSON=Te,r.CreateOfferingDtoFromJSONTyped=At,r.CreateOfferingDtoToJSON=Pt,r.CriterionDtoFromJSON=mt,r.CriterionDtoFromJSONTyped=pt,r.CriterionDtoToJSON=gt,r.DataAddressDtoFromJSON=L,r.DataAddressDtoFromJSONTyped=H,r.DataAddressDtoToJSON=G,r.DefaultConfig=J,r.EnterpriseEditionApi=Lt,r.ExpressionDtoFromJSON=y,r.ExpressionDtoFromJSONTyped=v,r.ExpressionDtoToJSON=l,r.ExpressionDtoTypeEnum=ie,r.FetchError=I,r.IdResponseDtoFromJSON=Ct,r.IdResponseDtoFromJSONTyped=Nt,r.IdResponseDtoToJSON=Pe,r.JSONApiResponse=u,r.KpiResultFromJSON=It,r.KpiResultFromJSONTyped=Ft,r.KpiResultToJSON=he,r.PermissionDtoFromJSON=x,r.PermissionDtoFromJSONTyped=j,r.PermissionDtoToJSON=tt,r.PolicyDefinitionRequestDtoFromJSON=Ot,r.PolicyDefinitionRequestDtoFromJSONTyped=Dt,r.PolicyDefinitionRequestDtoToJSON=Tt,r.PolicyDtoFromJSON=P,r.PolicyDtoFromJSONTyped=et,r.PolicyDtoToJSON=C,r.RequiredError=S,r.ResponseError=w,r.StoredFileFromJSON=N,r.StoredFileFromJSONTyped=Rt,r.StoredFileToJSON=we,r.TextApiResponse=Qt,r.TransferHistoryEntryDirectionEnum=Ie,r.TransferHistoryEntryFromJSON=Et,r.TransferHistoryEntryFromJSONTyped=qt,r.TransferHistoryEntryToJSON=bt,r.TransferHistoryPageFromJSON=Mt,r.TransferHistoryPageFromJSONTyped=Ut,r.TransferHistoryPageToJSON=Ee,r.TransferProcessStateFromJSON=T,r.TransferProcessStateFromJSONTyped=X,r.TransferProcessStateSimplifiedStateEnum=ee,r.TransferProcessStateToJSON=A,r.TransferProcessStatesDtoFromJSON=ht,r.TransferProcessStatesDtoFromJSONTyped=Jt,r.TransferProcessStatesDtoToJSON=wt,r.UIApi=Ht,r.UseCaseApi=Gt,r.VoidApiResponse=R,r.buildEdcClient=qe,r.canConsumeForm=_t,r.exists=a,r.instanceOfAssetDto=Xt,r.instanceOfAssetEntryDto=Zt,r.instanceOfAssetRequestDto=Yt,r.instanceOfAtomicConstraintDto=xt,r.instanceOfConnectorLimits=jt,r.instanceOfContractAgreementCard=de,r.instanceOfContractAgreementPage=ue,r.instanceOfContractAgreementTransferProcess=ne,r.instanceOfContractAgreementTransferRequest=ge,r.instanceOfContractAgreementTransferRequestParams=me,r.instanceOfContractDefinitionRequestDto=Se,r.instanceOfCreateOfferingDto=De,r.instanceOfCriterionDto=le,r.instanceOfDataAddressDto=Wt,r.instanceOfExpressionDto=oe,r.instanceOfIdResponseDto=Ae,r.instanceOfKpiResult=Ne,r.instanceOfPermissionDto=se,r.instanceOfPolicyDefinitionRequestDto=Oe,r.instanceOfPolicyDto=ae,r.instanceOfStoredFile=Je,r.instanceOfTransferHistoryEntry=Fe,r.instanceOfTransferHistoryPage=Re,r.instanceOfTransferProcessState=re,r.instanceOfTransferProcessStatesDto=Ce,r.mapValues=Vt,r.querystring=O,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
|
|
2
2
|
//# sourceMappingURL=sovity-edc-client.umd.cjs.map
|