diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/client-proxies/cms-kit-proxy.js b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/client-proxies/cms-kit-proxy.js new file mode 100644 index 00000000..6761dc06 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/client-proxies/cms-kit-proxy.js @@ -0,0 +1,80 @@ +/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */ + + +// module cms-kit + +(function(){ + + // controller volo.cmsKit.public.ratings.ratingPublic + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.public.ratings.ratingPublic'); + + volo.cmsKit.public.ratings.ratingPublic.create = function(entityType, entityId, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/ratings/' + entityType + '/' + entityId + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.public.ratings.ratingPublic['delete'] = function(entityType, entityId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/ratings/' + entityType + '/' + entityId + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + volo.cmsKit.public.ratings.ratingPublic.getGroupedStarCounts = function(entityType, entityId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/ratings/' + entityType + '/' + entityId + '', + type: 'GET' + }, ajaxParams)); + }; + + })(); + + // controller volo.cmsKit.public.comments.commentPublic + + (function(){ + + abp.utils.createNamespace(window, 'volo.cmsKit.public.comments.commentPublic'); + + volo.cmsKit.public.comments.commentPublic.getList = function(entityType, entityId, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + entityType + '/' + entityId + '', + type: 'GET' + }, ajaxParams)); + }; + + volo.cmsKit.public.comments.commentPublic.create = function(entityType, entityId, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + entityType + '/' + entityId + '', + type: 'POST', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.public.comments.commentPublic.update = function(id, input, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + id + '', + type: 'PUT', + data: JSON.stringify(input) + }, ajaxParams)); + }; + + volo.cmsKit.public.comments.commentPublic['delete'] = function(id, ajaxParams) { + return abp.ajax($.extend(true, { + url: abp.appPath + 'api/cms-kit-public/comments/' + id + '', + type: 'DELETE', + dataType: null + }, ajaxParams)); + }; + + })(); + +})(); + + diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs new file mode 100644 index 00000000..b7b1afc5 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs @@ -0,0 +1,53 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Public.Comments; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Comments.ClientProxies; + +[Dependency(ReplaceServices = true)] +[ExposeServices(typeof(ICommentPublicAppService), typeof(CommentPublicClientProxy))] +public partial class CommentPublicClientProxy : ClientProxyBase, ICommentPublicAppService +{ + public virtual async Task> GetListAsync(string entityType, string entityId) + { + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId } + }); + } + + public virtual async Task CreateAsync(string entityType, string entityId, CreateCommentInput input) + { + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId }, + { typeof(CreateCommentInput), input } + }); + } + + public virtual async Task UpdateAsync(Guid id, UpdateCommentInput input) + { + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(UpdateCommentInput), input } + }); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs new file mode 100644 index 00000000..826d4c0f --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs @@ -0,0 +1,7 @@ +// This file is part of CommentPublicClientProxy, you can customize it here +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Comments.ClientProxies; + +public partial class CommentPublicClientProxy +{ +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs new file mode 100644 index 00000000..583d86a2 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs @@ -0,0 +1,46 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Modeling; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.CmsKit.Public.Ratings; +using System.Collections.Generic; + +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Ratings.ClientProxies; + +[Dependency(ReplaceServices = true)] +[ExposeServices(typeof(IRatingPublicAppService), typeof(RatingPublicClientProxy))] +public partial class RatingPublicClientProxy : ClientProxyBase, IRatingPublicAppService +{ + public virtual async Task CreateAsync(string entityType, string entityId, CreateUpdateRatingInput input) + { + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId }, + { typeof(CreateUpdateRatingInput), input } + }); + } + + public virtual async Task DeleteAsync(string entityType, string entityId) + { + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId } + }); + } + + public virtual async Task> GetGroupedStarCountsAsync(string entityType, string entityId) + { + return await RequestAsync>(nameof(GetGroupedStarCountsAsync), new ClientProxyRequestTypeValue + { + { typeof(string), entityType }, + { typeof(string), entityId } + }); + } +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs new file mode 100644 index 00000000..6a4609f5 --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs @@ -0,0 +1,7 @@ +// This file is part of RatingPublicClientProxy, you can customize it here +// ReSharper disable once CheckNamespace +namespace Volo.CmsKit.Public.Ratings.ClientProxies; + +public partial class RatingPublicClientProxy +{ +} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json new file mode 100644 index 00000000..aa9ddbdd --- /dev/null +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json @@ -0,0 +1,458 @@ +{ + "modules": { + "cms-kit": { + "rootPath": "cms-kit", + "remoteServiceName": "CmsKitPublic", + "controllers": { + "Volo.CmsKit.Public.Ratings.RatingPublicController": { + "controllerName": "RatingPublic", + "controllerGroupName": "RatingPublic", + "isRemoteService": false, + "apiVersion": null, + "type": "Volo.CmsKit.Public.Ratings.RatingPublicController", + "interfaces": [ + { + "type": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + } + ], + "actions": { + "CreateAsyncByEntityTypeAndEntityIdAndInput": { + "uniqueName": "CreateAsyncByEntityTypeAndEntityIdAndInput", + "name": "CreateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-public/ratings/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "typeSimple": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "typeSimple": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Ratings.RatingDto", + "typeSimple": "Volo.CmsKit.Public.Ratings.RatingDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + }, + "DeleteAsyncByEntityTypeAndEntityId": { + "uniqueName": "DeleteAsyncByEntityTypeAndEntityId", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-public/ratings/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + }, + "GetGroupedStarCountsAsyncByEntityTypeAndEntityId": { + "uniqueName": "GetGroupedStarCountsAsyncByEntityTypeAndEntityId", + "name": "GetGroupedStarCountsAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/ratings/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.CmsKit.Public.Ratings.RatingWithStarCountDto]" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + } + } + }, + "Volo.CmsKit.Public.Comments.CommentPublicController": { + "controllerName": "CommentPublic", + "controllerGroupName": "CommentPublic", + "isRemoteService": false, + "apiVersion": null, + "type": "Volo.CmsKit.Public.Comments.CommentPublicController", + "interfaces": [ + { + "type": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + } + ], + "actions": { + "GetListAsyncByEntityTypeAndEntityId": { + "uniqueName": "GetListAsyncByEntityTypeAndEntityId", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/cms-kit-public/comments/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + }, + "CreateAsyncByEntityTypeAndEntityIdAndInput": { + "uniqueName": "CreateAsyncByEntityTypeAndEntityIdAndInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/cms-kit-public/comments/{entityType}/{entityId}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Comments.CreateCommentInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "entityType", + "name": "entityType", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "entityId", + "name": "entityId", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Comments.CommentDto", + "typeSimple": "Volo.CmsKit.Public.Comments.CommentDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/cms-kit-public/comments/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Comments.UpdateCommentInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Comments.CommentDto", + "typeSimple": "Volo.CmsKit.Public.Comments.CommentDto" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/cms-kit-public/comments/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": null, + "implementFrom": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + } + } + } + } + } + }, + "types": {} +} \ No newline at end of file