resolveContent(url, matchExact, request) {
        const parameters = Object.assign({ 'contentUrl': url, 'matchExact': matchExact }, __classPrivateFieldGet(this, _ContentResolver_api, "f").getDefaultParameters(request === null || request === void 0 ? void 0 : request.select, request === null || request === void 0 ? void 0 : request.expand));
        return new Promise((resolve, reject) => {
            __classPrivateFieldGet(this, _ContentResolver_api, "f").get('/content', parameters).then((response) => {
                var _a, _b;
                const contentData = response.data;
                let status = ResolvedContentStatus.Unknown;
                let content;
                switch (response.status) {
                    case 401:
                        status = ResolvedContentStatus.Unauthorized;
                        break;
                    case 403:
                        status = ResolvedContentStatus.AccessDenied;
                        break;
                    case 404:
                        status = ResolvedContentStatus.NotFound;
                        break;
                    default:
                        if ((contentData === null || contentData === void 0 ? void 0 : contentData.length) > 0) {
                            status = ResolvedContentStatus.Resolved;
                            content = contentData[0];
                        }
                        else {
                            status = ResolvedContentStatus.NotFound;
                        }
                        break;
                }
                ;
                const result = {
                    content: content,
                    branch: response.headers.get('x-epi-branch'),
                    status: status,
                    mode: (_b = models_1.ContextMode[(_a = response.headers.get('x-epi-contextmode')) !== null && _a !== void 0 ? _a : '']) !== null && _b !== void 0 ? _b : models_1.ContextMode.Default,
                    remainingPath: response.headers.get('x-epi-remainingroute'),
                    siteId: response.headers.get('x-epi-siteid'),
                    startPageId: response.headers.get('x-epi-startpageguid'),
                };
                resolve(result);
            }).catch((error) => {
                reject(mapToError(error));
            });
        });
    }
/**
     * Resolve content from an URL.
     *
     * @param url - URL to resolve.
     * @param matchExact - Match the URL exactly or patially.
     * @param request - Additional request parameters.
     * @returns A promise with a ResolvedContent regardless the content was successfully resolved or not.
     * Check the status property whether the resolving was successful.
     * If the service returned a server error, the promise is rejected with a ContentResolverError.
     */
Resolve content from an URL.
@param url - URL to resolve.
@param matchExact - Match the URL exactly or patially.
@param request - Additional request parameters.
@returns A promise with a ResolvedContent regardless the content was successfully resolved or not.
Check the status property whether the resolving was successful.
If the service returned a server error, the promise is rejected with a ContentResolverError.
Resolve content from an URL . @param url - URL to resolve . @param matchExact - Match the URL exactly or patially . @param request - Additional request parameters . @returns A promise with a ResolvedContent regardless the content was successfully resolved or not . Check the status property whether the resolving was successful . If the service returned a server error the promise is rejected with a ContentResolverError .
resolveContent(url, matchExact, request) {
        const parameters = Object.assign({ 'contentUrl': url, 'matchExact': matchExact }, __classPrivateFieldGet(this, _ContentResolver_api, "f").getDefaultParameters(request === null || request === void 0 ? void 0 : request.select, request === null || request === void 0 ? void 0 : request.expand));
        return new Promise((resolve, reject) => {
            __classPrivateFieldGet(this, _ContentResolver_api, "f").get('/content', parameters).then((response) => {
                var _a, _b;
                const contentData = response.data;
                let status = ResolvedContentStatus.Unknown;
                let content;
                switch (response.status) {
                    case 401:
                        status = ResolvedContentStatus.Unauthorized;
                        break;
                    case 403:
                        status = ResolvedContentStatus.AccessDenied;
                        break;
                    case 404:
                        status = ResolvedContentStatus.NotFound;
                        break;
                    default:
                        if ((contentData === null || contentData === void 0 ? void 0 : contentData.length) > 0) {
                            status = ResolvedContentStatus.Resolved;
                            content = contentData[0];
                        }
                        else {
                            status = ResolvedContentStatus.NotFound;
                        }
                        break;
                }
                ;
                const result = {
                    content: content,
                    branch: response.headers.get('x-epi-branch'),
                    status: status,
                    mode: (_b = models_1.ContextMode[(_a = response.headers.get('x-epi-contextmode')) !== null && _a !== void 0 ? _a : '']) !== null && _b !== void 0 ? _b : models_1.ContextMode.Default,
                    remainingPath: response.headers.get('x-epi-remainingroute'),
                    siteId: response.headers.get('x-epi-siteid'),
                    startPageId: response.headers.get('x-epi-startpageguid'),
                };
                resolve(result);
            }).catch((error) => {
                reject(mapToError(error));
            });
        });
    }
resolveContent ( url , matchExact , request ) { const parameters = Object . assign ( { 'contentUrl' : url , 'matchExact' : matchExact } , __classPrivateFieldGet ( this , _ContentResolver_api , "f" ) . getDefaultParameters ( request === null || request === void 0 ? void 0 : request . select , request === null || request === void 0 ? void 0 : request . expand ) ) ; return new Promise ( ( resolve , reject ) => { __classPrivateFieldGet ( this , _ContentResolver_api , "f" ) . get ( '/content' , parameters ) . then ( ( response ) => { var _a , _b ; const contentData = response . data ; let status = ResolvedContentStatus . Unknown ; let content ; switch ( response . status ) { case 401 : status = ResolvedContentStatus . Unauthorized ; break ; case 403 : status = ResolvedContentStatus . AccessDenied ; break ; case 404 : status = ResolvedContentStatus . NotFound ; break ; default : if ( ( contentData === null || contentData === void 0 ? void 0 : contentData . length ) > 0 ) { status = ResolvedContentStatus . Resolved ; content = contentData [ 0 ] ; } else { status = ResolvedContentStatus . NotFound ; } break ; } ; const result = { content : content , branch : response . headers . get ( 'x-epi-branch' ) , status : status , mode : ( _b = models_1 . ContextMode [ ( _a = response . headers . get ( 'x-epi-contextmode' ) ) !== null && _a !== void 0 ? _a : '' ] ) !== null && _b !== void 0 ? _b : models_1 . ContextMode . Default , remainingPath : response . headers . get ( 'x-epi-remainingroute' ) , siteId : response . headers . get ( 'x-epi-siteid' ) , startPageId : response . headers . get ( 'x-epi-startpageguid' ) , } ; resolve ( result ) ; } ) . catch ( ( error ) => { reject ( mapToError ( error ) ) ; } ) ; } ) ; }
Resolve content from an URL.
Resolve content from an URL .