@sovity.de/edc-client 3.2.0 → 4.0.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.
- package/dist/EdcClient.d.ts +1 -5
- package/dist/generated/apis/EnterpriseEditionApi.d.ts +0 -13
- package/dist/generated/apis/UIApi.d.ts +18 -1
- package/dist/generated/apis/UseCaseApi.d.ts +12 -1
- package/dist/generated/apis/index.d.ts +0 -1
- package/dist/generated/models/AssetEntryDto.d.ts +28 -0
- package/dist/generated/models/AssetRequestDto.d.ts +28 -0
- package/dist/generated/models/AtomicConstraintDto.d.ts +45 -0
- package/dist/generated/models/ContractAgreementTransferRequest.d.ts +41 -0
- package/dist/generated/models/ContractAgreementTransferRequestParams.d.ts +36 -0
- package/dist/generated/models/ContractDefinitionRequestDto.d.ts +45 -0
- package/dist/generated/models/CreateOfferingDto.d.ts +35 -0
- package/dist/generated/models/CriterionDto.d.ts +32 -0
- package/dist/generated/models/DataAddressDto.d.ts +22 -0
- package/dist/generated/models/ExpressionDto.d.ts +61 -0
- package/dist/generated/models/IdResponseDto.d.ts +26 -0
- package/dist/generated/models/PermissionDto.d.ts +21 -0
- package/dist/generated/models/PolicyDefinitionRequestDto.d.ts +27 -0
- package/dist/generated/models/PolicyDto.d.ts +9 -2
- package/dist/generated/models/TransferHistoryEntry.d.ts +83 -0
- package/dist/generated/models/TransferHistoryPage.d.ts +21 -0
- package/dist/generated/models/index.d.ts +15 -15
- package/dist/sovity-edc-client.js +661 -706
- package/dist/sovity-edc-client.js.map +1 -1
- package/dist/sovity-edc-client.umd.cjs +1 -1
- package/dist/sovity-edc-client.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/generated/apis/BrokerServerApi.d.ts +0 -40
- package/dist/generated/models/CatalogPageQuery.d.ts +0 -49
- package/dist/generated/models/CatalogPageResult.d.ts +0 -42
- package/dist/generated/models/CatalogPageSortingItem.d.ts +0 -36
- package/dist/generated/models/CnfFilter.d.ts +0 -21
- package/dist/generated/models/CnfFilterAttribute.d.ts +0 -33
- package/dist/generated/models/CnfFilterItem.d.ts +0 -26
- package/dist/generated/models/CnfFilterValue.d.ts +0 -21
- package/dist/generated/models/CnfFilterValueAttribute.d.ts +0 -26
- package/dist/generated/models/ConnectorListEntry.d.ts +0 -82
- package/dist/generated/models/ConnectorPageQuery.d.ts +0 -40
- package/dist/generated/models/ConnectorPageResult.d.ts +0 -35
- package/dist/generated/models/ConnectorPageSortingItem.d.ts +0 -34
- package/dist/generated/models/ContractOfferConnectorInfo.d.ts +0 -52
- package/dist/generated/models/ContractOfferDto.d.ts +0 -35
- package/dist/generated/models/PaginationMetadata.d.ts +0 -38
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(n,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(n=typeof globalThis<"u"?globalThis:n||self,s(n["sovity-edc-client"]={}))})(this,function(n){"use strict";var Be=Object.defineProperty;var Ue=(n,s,l)=>s in n?Be(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l;var g=(n,s,l)=>(Ue(n,typeof s!="symbol"?s+"":s,l),l);const s="http://localhost".replace(/\/+$/,"");class l{constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:s}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||y}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 l,I=class{constructor(e=J){g(this,"middleware");g(this,"fetchApi",async(e,r)=>{let i={url:e,init:r};for(const a of this.middleware)a.pre&&(i=await a.pre({fetch:this.fetchApi,...i})||i);let o;try{o=await(this.configuration.fetchApi||fetch)(i.url,i.init)}catch(a){for(const u of this.middleware)u.onError&&(o=await u.onError({fetch:this.fetchApi,url:i.url,init:i.init,error:a,response:o?o.clone():void 0})||o);if(o===void 0)throw a instanceof Error?new D(a,"The request failed and the interceptors did not return an alternative response"):a}for(const a of this.middleware)a.post&&(o=await a.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 r=this.clone();return r.middleware=r.middleware.concat(...e),r}withPreMiddleware(...e){const r=e.map(i=>({pre:i}));return this.withMiddleware(...r)}withPostMiddleware(...e){const r=e.map(i=>({post:i}));return this.withMiddleware(...r)}isJsonMime(e){return e?I.jsonRegex.test(e):!1}async request(e,r){const{url:i,init:o}=await this.createFetchParams(e,r),a=await this.fetchApi(i,o);if(a&&a.status>=200&&a.status<300)return a;throw new w(a,"Response returned an error code")}async createFetchParams(e,r){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(C=>o[C]===void 0?delete o[C]:{});const a=typeof r=="function"?r:async()=>r,u={method:e.method,headers:o,body:e.body,credentials:this.configuration.credentials},d={...u,...await a({init:u,context:e})},O={...d,body:kt(d.body)||d.body instanceof URLSearchParams||$t(d.body)?d.body:JSON.stringify(d.body)};return{url:i,init:O}}clone(){const e=this.constructor,r=new e(this.configuration);return r.middleware=this.middleware.slice(),r}};let m=I;g(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(r,i){super(i);g(this,"name","ResponseError");this.response=r}}class D extends Error{constructor(r,i){super(i);g(this,"name","FetchError");this.cause=r}}class p extends Error{constructor(r,i){super(i);g(this,"name","RequiredError");this.field=r}}const zt={csv:",",ssv:" ",tsv:" ",pipes:"|"};function c(t,e){const r=t[e];return r!=null}function y(t,e=""){return Object.keys(t).map(r=>E(r,t[r],e)).filter(r=>r.length>0).join("&")}function E(t,e,r=""){const i=r+(r.length?`[${t}]`:t);if(e instanceof Array){const o=e.map(a=>encodeURIComponent(String(a))).join(`&${encodeURIComponent(i)}=`);return`${encodeURIComponent(i)}=${o}`}if(e instanceof Set){const o=Array.from(e);return E(t,o,r)}return e instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?y(e,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(e))}`}function Gt(t,e){return Object.keys(t).reduce((r,i)=>({...r,[i]:e(t[i])}),{})}function R(t){for(const e of t)if(e.contentType==="multipart/form-data")return!0;return!1}class f{constructor(e,r=i=>i){this.raw=e,this.transformer=r}async value(){return this.transformer(await this.raw.json())}}class _t{constructor(e){this.raw=e}async value(){}}class Ht{constructor(e){this.raw=e}async value(){return await this.raw.blob()}}class Wt{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 F(t){return b(t)}function b(t,e){return t==null?t:{assetId:t.assetId,createdAt:new Date(t.createdAt),properties:t.properties}}function P(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&&"id"in t,e=e&&"selectedIds"in t,e}function M(t){return q(t)}function q(t,e){return t==null?t:{id:t.id,selectedIds:t.selectedIds}}function L(t){if(t!==void 0)return t===null?null:{id:t.id,selectedIds:t.selectedIds}}function Zt(t){let e=!0;return e=e&&"selectedAttributeValues"in t,e}function V(t){return Q(t)}function Q(t,e){return t==null?t:{selectedAttributeValues:t.selectedAttributeValues.map(M)}}function B(t){if(t!==void 0)return t===null?null:{selectedAttributeValues:t.selectedAttributeValues.map(L)}}const vt={Match:"MATCH",Title:"TITLE",MostRecent:"MOST_RECENT",Originator:"ORIGINATOR"};function xt(t){return!0}function jt(t){return U(t)}function U(t,e){return t==null?t:{filter:c(t,"filter")?V(t.filter):void 0,searchQuery:c(t,"searchQuery")?t.searchQuery:void 0,sorting:c(t,"sorting")?t.sorting:void 0,pageOneBased:c(t,"pageOneBased")?t.pageOneBased:void 0}}function K(t){if(t!==void 0)return t===null?null:{filter:B(t.filter),searchQuery:t.searchQuery,sorting:t.sorting,pageOneBased:t.pageOneBased}}const te={Match:"MATCH",Title:"TITLE",MostRecent:"MOST_RECENT",Originator:"ORIGINATOR"};function ee(t){let e=!0;return e=e&&"sorting"in t,e=e&&"title"in t,e}function $(t){return k(t)}function k(t,e){return t==null?t:{sorting:t.sorting,title:t.title}}function z(t){if(t!==void 0)return t===null?null:{sorting:t.sorting,title:t.title}}function ne(t){let e=!0;return e=e&&"id"in t,e=e&&"title"in t,e}function G(t){return _(t)}function _(t,e){return t==null?t:{id:t.id,title:t.title}}function H(t){if(t!==void 0)return t===null?null:{id:t.id,title:t.title}}function re(t){let e=!0;return e=e&&"id"in t,e=e&&"title"in t,e=e&&"values"in t,e}function W(t){return X(t)}function X(t,e){return t==null?t:{id:t.id,title:t.title,values:t.values.map(G)}}function Y(t){if(t!==void 0)return t===null?null:{id:t.id,title:t.title,values:t.values.map(H)}}function ie(t){let e=!0;return e=e&&"fields"in t,e}function Z(t){return v(t)}function v(t,e){return t==null?t:{fields:t.fields.map(W)}}function x(t){if(t!==void 0)return t===null?null:{fields:t.fields.map(Y)}}const oe={Online:"ONLINE",Offline:"OFFLINE"};function ae(t){let e=!0;return e=e&&"endpoint"in t,e=e&&"title"in t,e=e&&"description"in t,e=e&&"onlineStatus"in t,e}function j(t){return tt(t)}function tt(t,e){return t==null?t:{endpoint:t.endpoint,title:t.title,description:t.description,onlineStatus:t.onlineStatus,offlineSinceOrLastUpdatedAt:c(t,"offlineSinceOrLastUpdatedAt")?new Date(t.offlineSinceOrLastUpdatedAt):void 0}}function et(t){if(t!==void 0)return t===null?null:{endpoint:t.endpoint,title:t.title,description:t.description,onlineStatus:t.onlineStatus,offlineSinceOrLastUpdatedAt:t.offlineSinceOrLastUpdatedAt===void 0?void 0:t.offlineSinceOrLastUpdatedAt.toISOString()}}function ce(t){let e=!0;return e=e&&"legacyPolicy"in t,e}function T(t){return nt(t)}function nt(t,e){return t==null?t:{legacyPolicy:t.legacyPolicy}}function N(t){if(t!==void 0)return t===null?null:{legacyPolicy:t.legacyPolicy}}function se(t){let e=!0;return e=e&&"connectorInfo"in t,e=e&&"asset"in t,e=e&&"policy"in t,e}function rt(t){return it(t)}function it(t,e){return t==null?t:{connectorInfo:j(t.connectorInfo),asset:F(t.asset),policy:T(t.policy)}}function ot(t){if(t!==void 0)return t===null?null:{connectorInfo:et(t.connectorInfo),asset:P(t.asset),policy:N(t.policy)}}function ue(t){let e=!0;return e=e&&"numTotal"in t,e=e&&"numVisible"in t,e=e&&"pageOneBased"in t,e=e&&"pageSize"in t,e}function h(t){return at(t)}function at(t,e){return t==null?t:{numTotal:t.numTotal,numVisible:t.numVisible,pageOneBased:t.pageOneBased,pageSize:t.pageSize}}function A(t){if(t!==void 0)return t===null?null:{numTotal:t.numTotal,numVisible:t.numVisible,pageOneBased:t.pageOneBased,pageSize:t.pageSize}}function de(t){let e=!0;return e=e&&"availableFilters"in t,e=e&&"availableSortings"in t,e=e&&"paginationMetadata"in t,e=e&&"contractOffers"in t,e}function ct(t){return st(t)}function st(t,e){return t==null?t:{availableFilters:Z(t.availableFilters),availableSortings:t.availableSortings.map($),paginationMetadata:h(t.paginationMetadata),contractOffers:t.contractOffers.map(rt)}}function fe(t){if(t!==void 0)return t===null?null:{availableFilters:x(t.availableFilters),availableSortings:t.availableSortings.map(z),paginationMetadata:A(t.paginationMetadata),contractOffers:t.contractOffers.map(ot)}}function le(t){let e=!0;return e=e&&"numActiveConsumingContractAgreements"in t,e}function ut(t){return dt(t)}function dt(t,e){return t==null?t:{numActiveConsumingContractAgreements:t.numActiveConsumingContractAgreements,maxActiveConsumingContractAgreements:c(t,"maxActiveConsumingContractAgreements")?t.maxActiveConsumingContractAgreements:void 0}}function me(t){if(t!==void 0)return t===null?null:{numActiveConsumingContractAgreements:t.numActiveConsumingContractAgreements,maxActiveConsumingContractAgreements:t.maxActiveConsumingContractAgreements}}const ge={Online:"ONLINE",Offline:"OFFLINE"};function Se(t){let e=!0;return e=e&&"id"in t,e=e&&"idsId"in t,e=e&&"endpoint"in t,e=e&&"title"in t,e=e&&"description"in t,e=e&&"onlineStatus"in t,e}function ft(t){return lt(t)}function lt(t,e){return t==null?t:{id:t.id,idsId:t.idsId,endpoint:t.endpoint,title:t.title,description:t.description,createdAt:c(t,"createdAt")?new Date(t.createdAt):void 0,lastFetchAt:c(t,"lastFetchAt")?new Date(t.lastFetchAt):void 0,onlineStatus:t.onlineStatus,offlineSince:c(t,"offlineSince")?new Date(t.offlineSince):void 0,numContractOffers:c(t,"numContractOffers")?t.numContractOffers:void 0}}function mt(t){if(t!==void 0)return t===null?null:{id:t.id,idsId:t.idsId,endpoint:t.endpoint,title:t.title,description:t.description,createdAt:t.createdAt===void 0?void 0:t.createdAt.toISOString(),lastFetchAt:t.lastFetchAt===void 0?void 0:t.lastFetchAt.toISOString(),onlineStatus:t.onlineStatus,offlineSince:t.offlineSince===void 0?void 0:t.offlineSince.toISOString(),numContractOffers:t.numContractOffers}}const Oe={Title:"TITLE",MostRecent:"MOST_RECENT"};function Ce(t){return!0}function pe(t){return gt(t)}function gt(t,e){return t==null?t:{searchQuery:c(t,"searchQuery")?t.searchQuery:void 0,sorting:c(t,"sorting")?t.sorting:void 0,pageOneBased:c(t,"pageOneBased")?t.pageOneBased:void 0}}function St(t){if(t!==void 0)return t===null?null:{searchQuery:t.searchQuery,sorting:t.sorting,pageOneBased:t.pageOneBased}}const ye={Title:"TITLE",MostRecent:"MOST_RECENT"};function Fe(t){let e=!0;return e=e&&"sorting"in t,e=e&&"title"in t,e}function Ot(t){return Ct(t)}function Ct(t,e){return t==null?t:{sorting:t.sorting,title:t.title}}function pt(t){if(t!==void 0)return t===null?null:{sorting:t.sorting,title:t.title}}function Pe(t){let e=!0;return e=e&&"availableSortings"in t,e=e&&"paginationMetadata"in t,e=e&&"connectors"in t,e}function yt(t){return Ft(t)}function Ft(t,e){return t==null?t:{availableSortings:t.availableSortings.map(Ot),paginationMetadata:h(t.paginationMetadata),connectors:t.connectors.map(ft)}}function Te(t){if(t!==void 0)return t===null?null:{availableSortings:t.availableSortings.map(pt),paginationMetadata:A(t.paginationMetadata),connectors:t.connectors.map(mt)}}const Ne={Running:"RUNNING",Ok:"OK",Error:"ERROR"};function he(t){let e=!0;return e=e&&"name"in t,e=e&&"code"in t,e=e&&"simplifiedState"in t,e}function Pt(t){return Tt(t)}function Tt(t,e){return t==null?t:{name:t.name,code:t.code,simplifiedState:t.simplifiedState}}function Nt(t){if(t!==void 0)return t===null?null:{name:t.name,code:t.code,simplifiedState:t.simplifiedState}}function Ae(t){let e=!0;return e=e&&"transferProcessId"in t,e=e&&"lastUpdatedDate"in t,e=e&&"state"in t,e}function ht(t){return At(t)}function At(t,e){return t==null?t:{transferProcessId:t.transferProcessId,lastUpdatedDate:new Date(t.lastUpdatedDate),state:Pt(t.state),errorMessage:c(t,"errorMessage")?t.errorMessage:void 0}}function It(t){if(t!==void 0)return t===null?null:{transferProcessId:t.transferProcessId,lastUpdatedDate:t.lastUpdatedDate.toISOString(),state:Nt(t.state),errorMessage:t.errorMessage}}const Ie={Consuming:"CONSUMING",Providing:"PROVIDING"};function Je(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 Jt(t){return wt(t)}function wt(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:F(t.asset),contractPolicy:T(t.contractPolicy),transferProcesses:t.transferProcesses.map(ht)}}function Dt(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:P(t.asset),contractPolicy:N(t.contractPolicy),transferProcesses:t.transferProcesses.map(It)}}function we(t){let e=!0;return e=e&&"contractAgreements"in t,e}function Et(t){return Rt(t)}function Rt(t,e){return t==null?t:{contractAgreements:t.contractAgreements.map(Jt)}}function De(t){if(t!==void 0)return t===null?null:{contractAgreements:t.contractAgreements.map(Dt)}}function Ee(t){let e=!0;return e=e&&"incomingTransferProcessCounts"in t,e=e&&"outgoingTransferProcessCounts"in t,e}function bt(t){return Mt(t)}function Mt(t,e){return t==null?t:{incomingTransferProcessCounts:t.incomingTransferProcessCounts,outgoingTransferProcessCounts:t.outgoingTransferProcessCounts}}function qt(t){if(t!==void 0)return t===null?null:{incomingTransferProcessCounts:t.incomingTransferProcessCounts,outgoingTransferProcessCounts:t.outgoingTransferProcessCounts}}function Re(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 Lt(t){return Vt(t)}function Vt(t,e){return t==null?t:{assetsCount:t.assetsCount,policiesCount:t.policiesCount,contractDefinitionsCount:t.contractDefinitionsCount,contractAgreementsCount:t.contractAgreementsCount,transferProcessDto:bt(t.transferProcessDto)}}function be(t){if(t!==void 0)return t===null?null:{assetsCount:t.assetsCount,policiesCount:t.policiesCount,contractDefinitionsCount:t.contractDefinitionsCount,contractAgreementsCount:t.contractAgreementsCount,transferProcessDto:qt(t.transferProcessDto)}}function Me(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 S(t){return Qt(t)}function Qt(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 qe(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()}}class Le extends m{async catalogPageRaw(e,r){const i={},o={};o["Content-Type"]="application/json";const a=await this.request({path:"/wrapper/broker/catalog-page",method:"POST",headers:o,query:i,body:K(e.catalogPageQuery)},r);return new f(a,u=>ct(u))}async catalogPage(e={},r){return await(await this.catalogPageRaw(e,r)).value()}async connectorPageRaw(e,r){const i={},o={};o["Content-Type"]="application/json";const a=await this.request({path:"/wrapper/broker/connector-page",method:"POST",headers:o,query:i,body:St(e.connectorPageQuery)},r);return new f(a,u=>yt(u))}async connectorPage(e={},r){return await(await this.connectorPageRaw(e,r)).value()}}class Bt extends m{async connectorLimitsRaw(e){const r={},i={},o=await this.request({path:"/wrapper/ee/connector-limits",method:"GET",headers:i,query:r},e);return new f(o,a=>ut(a))}async connectorLimits(e){return await(await this.connectorLimitsRaw(e)).value()}async createStoredFileAssetRaw(e,r){if(e.storedFileId===null||e.storedFileId===void 0)throw new p("storedFileId","Required parameter requestParameters.storedFileId was null or undefined when calling createStoredFileAsset.");if(e.requestBody===null||e.requestBody===void 0)throw new p("requestBody","Required parameter requestParameters.requestBody was null or undefined when calling createStoredFileAsset.");const i={},o={};o["Content-Type"]="application/json";const a=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},r);return new f(a,u=>S(u))}async createStoredFileAsset(e,r){return await(await this.createStoredFileAssetRaw(e,r)).value()}async listStoredFilesRaw(e){const r={},i={},o=await this.request({path:"/wrapper/ee/file-storage/stored-files",method:"GET",headers:i,query:r},e);return new f(o,a=>a.map(S))}async listStoredFiles(e){return await(await this.listStoredFilesRaw(e)).value()}async uploadStoredFileRaw(e,r){const i={},o={},u=R([{contentType:"multipart/form-data"}]);let d,O=!1;O=u,O?d=new FormData:d=new URLSearchParams,e.file!==void 0&&d.append("file",e.file);const C=await this.request({path:"/wrapper/ee/file-storage/stored-files",method:"POST",headers:o,query:i,body:d},r);return new f(C,Qe=>S(Qe))}async uploadStoredFile(e={},r){return await(await this.uploadStoredFileRaw(e,r)).value()}}class Ut extends m{async contractAgreementEndpointRaw(e){const r={},i={},o=await this.request({path:"/wrapper/ui/pages/contract-agreement-page",method:"GET",headers:i,query:r},e);return new f(o,a=>Et(a))}async contractAgreementEndpoint(e){return await(await this.contractAgreementEndpointRaw(e)).value()}}class Kt extends m{async getSupportedFunctionsRaw(e){const r={},i={},o=await this.request({path:"/wrapper/use-case-api/supported-policy-functions",method:"GET",headers:i,query:r},e);return new f(o)}async getSupportedFunctions(e){return await(await this.getSupportedFunctionsRaw(e)).value()}async kpiEndpointRaw(e){const r={},i={},o=await this.request({path:"/wrapper/use-case-api/kpis",method:"GET",headers:i,query:r},e);return new f(o,a=>Lt(a))}async kpiEndpoint(e){return await(await this.kpiEndpointRaw(e)).value()}}function Ve(t){const e=new l({basePath:t.managementApiUrl,headers:{"x-api-key":t.managementApiKey??"ApiKeyDefaultValue"},credentials:"same-origin",...t.configOverrides});return{uiApi:new Ut(e),useCaseApi:new Kt(e),enterpriseEditionApi:new Bt(e)}}n.AssetDtoFromJSON=F,n.AssetDtoFromJSONTyped=b,n.AssetDtoToJSON=P,n.BASE_PATH=s,n.BaseAPI=m,n.BlobApiResponse=Ht,n.BrokerServerApi=Le,n.COLLECTION_FORMATS=zt,n.CatalogPageQueryFromJSON=jt,n.CatalogPageQueryFromJSONTyped=U,n.CatalogPageQuerySortingEnum=vt,n.CatalogPageQueryToJSON=K,n.CatalogPageResultFromJSON=ct,n.CatalogPageResultFromJSONTyped=st,n.CatalogPageResultToJSON=fe,n.CatalogPageSortingItemFromJSON=$,n.CatalogPageSortingItemFromJSONTyped=k,n.CatalogPageSortingItemSortingEnum=te,n.CatalogPageSortingItemToJSON=z,n.CnfFilterAttributeFromJSON=W,n.CnfFilterAttributeFromJSONTyped=X,n.CnfFilterAttributeToJSON=Y,n.CnfFilterFromJSON=Z,n.CnfFilterFromJSONTyped=v,n.CnfFilterItemFromJSON=G,n.CnfFilterItemFromJSONTyped=_,n.CnfFilterItemToJSON=H,n.CnfFilterToJSON=x,n.CnfFilterValueAttributeFromJSON=M,n.CnfFilterValueAttributeFromJSONTyped=q,n.CnfFilterValueAttributeToJSON=L,n.CnfFilterValueFromJSON=V,n.CnfFilterValueFromJSONTyped=Q,n.CnfFilterValueToJSON=B,n.Configuration=l,n.ConnectorLimitsFromJSON=ut,n.ConnectorLimitsFromJSONTyped=dt,n.ConnectorLimitsToJSON=me,n.ConnectorListEntryFromJSON=ft,n.ConnectorListEntryFromJSONTyped=lt,n.ConnectorListEntryOnlineStatusEnum=ge,n.ConnectorListEntryToJSON=mt,n.ConnectorPageQueryFromJSON=pe,n.ConnectorPageQueryFromJSONTyped=gt,n.ConnectorPageQuerySortingEnum=Oe,n.ConnectorPageQueryToJSON=St,n.ConnectorPageResultFromJSON=yt,n.ConnectorPageResultFromJSONTyped=Ft,n.ConnectorPageResultToJSON=Te,n.ConnectorPageSortingItemFromJSON=Ot,n.ConnectorPageSortingItemFromJSONTyped=Ct,n.ConnectorPageSortingItemSortingEnum=ye,n.ConnectorPageSortingItemToJSON=pt,n.ContractAgreementCardDirectionEnum=Ie,n.ContractAgreementCardFromJSON=Jt,n.ContractAgreementCardFromJSONTyped=wt,n.ContractAgreementCardToJSON=Dt,n.ContractAgreementPageFromJSON=Et,n.ContractAgreementPageFromJSONTyped=Rt,n.ContractAgreementPageToJSON=De,n.ContractAgreementTransferProcessFromJSON=ht,n.ContractAgreementTransferProcessFromJSONTyped=At,n.ContractAgreementTransferProcessToJSON=It,n.ContractOfferConnectorInfoFromJSON=j,n.ContractOfferConnectorInfoFromJSONTyped=tt,n.ContractOfferConnectorInfoOnlineStatusEnum=oe,n.ContractOfferConnectorInfoToJSON=et,n.ContractOfferDtoFromJSON=rt,n.ContractOfferDtoFromJSONTyped=it,n.ContractOfferDtoToJSON=ot,n.DefaultConfig=J,n.EnterpriseEditionApi=Bt,n.FetchError=D,n.JSONApiResponse=f,n.KpiResultFromJSON=Lt,n.KpiResultFromJSONTyped=Vt,n.KpiResultToJSON=be,n.PaginationMetadataFromJSON=h,n.PaginationMetadataFromJSONTyped=at,n.PaginationMetadataToJSON=A,n.PolicyDtoFromJSON=T,n.PolicyDtoFromJSONTyped=nt,n.PolicyDtoToJSON=N,n.RequiredError=p,n.ResponseError=w,n.StoredFileFromJSON=S,n.StoredFileFromJSONTyped=Qt,n.StoredFileToJSON=qe,n.TextApiResponse=Wt,n.TransferProcessStateFromJSON=Pt,n.TransferProcessStateFromJSONTyped=Tt,n.TransferProcessStateSimplifiedStateEnum=Ne,n.TransferProcessStateToJSON=Nt,n.TransferProcessStatesDtoFromJSON=bt,n.TransferProcessStatesDtoFromJSONTyped=Mt,n.TransferProcessStatesDtoToJSON=qt,n.UIApi=Ut,n.UseCaseApi=Kt,n.VoidApiResponse=_t,n.buildEdcClient=Ve,n.canConsumeForm=R,n.exists=c,n.instanceOfAssetDto=Xt,n.instanceOfCatalogPageQuery=xt,n.instanceOfCatalogPageResult=de,n.instanceOfCatalogPageSortingItem=ee,n.instanceOfCnfFilter=ie,n.instanceOfCnfFilterAttribute=re,n.instanceOfCnfFilterItem=ne,n.instanceOfCnfFilterValue=Zt,n.instanceOfCnfFilterValueAttribute=Yt,n.instanceOfConnectorLimits=le,n.instanceOfConnectorListEntry=Se,n.instanceOfConnectorPageQuery=Ce,n.instanceOfConnectorPageResult=Pe,n.instanceOfConnectorPageSortingItem=Fe,n.instanceOfContractAgreementCard=Je,n.instanceOfContractAgreementPage=we,n.instanceOfContractAgreementTransferProcess=Ae,n.instanceOfContractOfferConnectorInfo=ae,n.instanceOfContractOfferDto=se,n.instanceOfKpiResult=Re,n.instanceOfPaginationMetadata=ue,n.instanceOfPolicyDto=ce,n.instanceOfStoredFile=Me,n.instanceOfTransferProcessState=he,n.instanceOfTransferProcessStatesDto=Ee,n.mapValues=Gt,n.querystring=y,Object.defineProperty(n,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,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"})});
|
|
2
2
|
//# sourceMappingURL=sovity-edc-client.umd.cjs.map
|