<commit_before>﻿/* Resources */
angular.module('umbraco.resources').factory('Our.Umbraco.Mortar.Resources.mortarResources',
    function($q, $http, umbRequestHelper) {
        return {
            getContentAliasByGuid: function (guid) {
                var url = "/umbraco/backoffice/MortarApi/MortarApi/GetContentTypeAliasByGuid?guid=" + guid;
                return umbRequestHelper.resourcePromise(
                    $http.get(url),
                    'Failed to retrieve datatype alias by guid'
                );
            },
            getContentTypes: function (allowedContentTypes) {
                var url = "/umbraco/backoffice/MortarApi/MortarApi/GetContentTypes";
                if (allowedContentTypes) {
                    for (var i = 0; i < allowedContentTypes.length; i++) {
                        url += (i == 0 ? "?" : "&") + "allowedContentTypes=" + allowedContentTypes[i];
                    }
                }
                return umbRequestHelper.resourcePromise(
                    $http.get(url),
                    'Failed to retrieve datatypes'
                );
            },
            getDataTypePreValues: function (dtdId) {
                var url = "/umbraco/backoffice/MortarApi/MortarApi/GetDataTypePreValues?dtdid=" + dtdId;
                return umbRequestHelper.resourcePromise(
                    $http.get(url),
                    'Failed to retrieve datatypes'
                );
            }
        };
    });<commit_msg>Added a reference to the new API method in the `mortarResources` module.<commit_after>﻿/* Resources */
angular.module('umbraco.resources').factory('Our.Umbraco.Mortar.Resources.mortarResources',
    function($q, $http, umbRequestHelper) {
        return {
            getContentAliasByGuid: function (guid) {
                var url = "/umbraco/backoffice/MortarApi/MortarApi/GetContentTypeAliasByGuid?guid=" + guid;
                return umbRequestHelper.resourcePromise(
                    $http.get(url),
                    'Failed to retrieve datatype alias by guid'
                );
            },
            getContentTypes: function (allowedContentTypes) {
                var url = "/umbraco/backoffice/MortarApi/MortarApi/GetContentTypes";
                if (allowedContentTypes) {
                    for (var i = 0; i < allowedContentTypes.length; i++) {
                        url += (i == 0 ? "?" : "&") + "allowedContentTypes=" + allowedContentTypes[i];
                    }
                }
                return umbRequestHelper.resourcePromise(
                    $http.get(url),
                    'Failed to retrieve datatypes'
                );
            },
            getDataTypePreValues: function (dtdId) {
                var url = "/umbraco/backoffice/MortarApi/MortarApi/GetDataTypePreValues?dtdid=" + dtdId;
                return umbRequestHelper.resourcePromise(
                    $http.get(url),
                    'Failed to retrieve datatypes'
                );
            },
            getDocTypePreview: function (guid) {
                var url = "/umbraco/backoffice/MortarApi/MortarApi/GetDocTypePreview?guid=" + guid;
                return umbRequestHelper.resourcePromise(
                    $http.get(url),
                    'Failed to retrieve doctype preview by guid'
                );
            },
        };
    });
{'fraction_non_alphanumeric': 0.10216168196624223, 'fraction_numerical': 0.0011844832691738228, 'mean_word_length': 1.5552193645990924, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5833046', 'n_tokens_mistral': 917, 'n_tokens_neox': 849, 'n_words': 158}