graphdb-workbench
Version:
The web application for GraphDB APIs
2 lines • 4.3 kB
JavaScript
export const __webpack_id__=6018;export const __webpack_ids__=[19,6018,74081,77512,90275];export const __webpack_modules__={19:(t,e,i)=>{i.r(e),i.d(e,{UpdateEndpointRequest:()=>n});class n{_id;_label;_description;_active;_default;_options;constructor(t){this._id=t.id,this._label=t.label,this._description=t.description,this._active=t.active,this._default=t.default,this._options=t.options}getUpdateDefaultEndpointRequest(){return{default:this.default}}getUpdateEndpointActiveStateRequest(){return{active:!this.active}}getUpdateEndpointSettingsRequest(){return{options:this.options?this.options.toFlatJSON():null}}set id(t){this._id=t}get id(){return this._id}set label(t){this._label=t}get label(){return this._label}set description(t){this._description=t}get description(){return this._description}set active(t){this._active=t}get active(){return this._active}set default(t){this._default=t}get default(){return this._default}set options(t){this._options=t}get options(){return this._options}}},6018:(t,e,i)=>{i.r(e),i.d(e,{endpointInfoModelMapper:()=>r,endpointsInfoListMapper:()=>o});var n=i(74081),s=i(90275);const o=(t,e)=>{if(!t||!t.endpoints)return new n.GraphqlEndpointsInfoList;const i=t.endpoints.map(t=>r(t,e));return new n.GraphqlEndpointsInfoList(i)},r=(t,e)=>{if(t)return new n.GraphqlEndpointInfo({endpointId:t.id,endpointURI:(0,s.resolveGraphqlEndpoint)(e,t.id),label:t.label,description:t.description,default:t.default,active:t.active,lastModified:t.lastModified,objectsCount:t.objectsCount,propertiesCount:t.propertiesCount,warnings:t.warnings,errors:t.errors})}},74081:(t,e,i)=>{i.r(e),i.d(e,{GraphqlEndpointInfo:()=>s,GraphqlEndpointsInfoList:()=>o});var n=i(19);class s{_endpointId;_endpointURI;_label;_description;_default;_active;_lastModified;_objectsCount;_propertiesCount;_warnings;_errors;_createdSuccessfully;constructor(t={}){this._endpointId=t.endpointId,this._endpointURI=t.endpointURI,this._label=t.label,this._description=t.description,this._default=t.default,this._active=t.active,this._lastModified=t.lastModified,this._objectsCount=t.objectsCount,this._propertiesCount=t.propertiesCount,this._warnings=t.warnings,this._errors=t.errors,this._createdSuccessfully=0===this._errors}toUpdateEndpointRequest(t){return new n.UpdateEndpointRequest({id:this.endpointId,label:this.label,description:this.description,active:this.active,default:this.default,options:t})}get createdSuccessfully(){return this._createdSuccessfully}get endpointId(){return this._endpointId}set endpointId(t){this._endpointId=t}get endpointURI(){return this._endpointURI}set endpointURI(t){this._endpointURI=t}get label(){return this._label}set label(t){this._label=t}get description(){return this._description}set description(t){this._description=t}get default(){return this._default}set default(t){this._default=t}get active(){return this._active}set active(t){this._active=t}get lastModified(){return this._lastModified}set lastModified(t){this._lastModified=t}get objectsCount(){return this._objectsCount}set objectsCount(t){this._objectsCount=t}get propertiesCount(){return this._propertiesCount}set propertiesCount(t){this._propertiesCount=t}get warnings(){return this._warnings}set warnings(t){this._warnings=t}get errors(){return this._errors}set errors(t){this._errors=t}}class o{_originalEndpointsList;_endpoints;constructor(t){this._originalEndpointsList=t||[],this._endpoints=t||[]}updateEndpoint(t){const e=this._endpoints.findIndex(e=>e.endpointId===t.endpointId);-1!==e&&(this._endpoints[e]=t)}filter(t){this._endpoints=this._originalEndpointsList.filter(e=>e.endpointId.toLowerCase().includes(t.toLowerCase())||e.label?.toLowerCase().includes(t.toLowerCase()))}findDefaultEndpoint(){return this._endpoints.find(t=>t.default)}get endpoints(){return this._endpoints}set endpoints(t){this._endpoints=t}}},77512:(t,e,i)=>{i.r(e),i.d(e,{endpointUrl:()=>n});const n={PLAYGROUND:"graphql/playground",CREATE_ENDPOINT:"graphql/endpoint/create",ENDPOINT_MANAGEMENT:"graphql/endpoints"}},90275:(t,e,i)=>{i.r(e),i.d(e,{resolveGraphqlEndpoint:()=>o,resolvePlaygroundUrlWithEndpoint:()=>r});var n=i(77512),s=i(69289);const o=(t,e)=>`${s.REPOSITORIES_ENDPOINT}/${t}/graphql/${e}`,r=t=>`${n.endpointUrl.PLAYGROUND}?endpointId=${t}`}};
//# sourceMappingURL=6018.00a6f69198b8c42408f7.bundle.js.map