Browse Source

Static proxy

pull/128/head
malik masis 4 years ago
parent
commit
dfd63c94de
  1. 80
      apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/client-proxies/cms-kit-proxy.js
  2. 53
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs
  3. 7
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs
  4. 46
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs
  5. 7
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs
  6. 458
      services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json

80
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));
};
})();
})();

53
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>, ICommentPublicAppService
{
public virtual async Task<ListResultDto<CommentWithDetailsDto>> GetListAsync(string entityType, string entityId)
{
return await RequestAsync<ListResultDto<CommentWithDetailsDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId }
});
}
public virtual async Task<CommentDto> CreateAsync(string entityType, string entityId, CreateCommentInput input)
{
return await RequestAsync<CommentDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId },
{ typeof(CreateCommentInput), input }
});
}
public virtual async Task<CommentDto> UpdateAsync(Guid id, UpdateCommentInput input)
{
return await RequestAsync<CommentDto>(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 }
});
}
}

7
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
{
}

46
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>, IRatingPublicAppService
{
public virtual async Task<RatingDto> CreateAsync(string entityType, string entityId, CreateUpdateRatingInput input)
{
return await RequestAsync<RatingDto>(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<List<RatingWithStarCountDto>> GetGroupedStarCountsAsync(string entityType, string entityId)
{
return await RequestAsync<List<RatingWithStarCountDto>>(nameof(GetGroupedStarCountsAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), entityType },
{ typeof(string), entityId }
});
}
}

7
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
{
}

458
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<Volo.CmsKit.Public.Ratings.RatingWithStarCountDto>",
"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<Volo.CmsKit.Public.Comments.CommentWithDetailsDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<Volo.CmsKit.Public.Comments.CommentWithDetailsDto>"
},
"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": {}
}
Loading…
Cancel
Save