Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
generic-client-layer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Applications
Sargasso
generic-client-layer
Commits
13bbc5b7
Commit
13bbc5b7
authored
1 year ago
by
Ajay Nishad
Browse files
Options
Downloads
Patches
Plain Diff
refactor: format code
parent
2b68d204
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
mappings/on_update.jsonata
+1
-1
1 addition, 1 deletion
mappings/on_update.jsonata
mappings/update.jsonata
+1
-1
1 addition, 1 deletion
mappings/update.jsonata
src/gcl/gcl.controller.ts
+51
-50
51 additions, 50 deletions
src/gcl/gcl.controller.ts
src/gcl/gcl.service.ts
+53
-53
53 additions, 53 deletions
src/gcl/gcl.service.ts
with
106 additions
and
105 deletions
mappings/on_update.jsonata
+
1
−
1
View file @
13bbc5b7
...
@@ -57,4 +57,4 @@
...
@@ -57,4 +57,4 @@
}
}
}[]
}[]
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
mappings/update.jsonata
+
1
−
1
View file @
13bbc5b7
...
@@ -8,4 +8,4 @@ $.data.{
...
@@ -8,4 +8,4 @@ $.data.{
},
},
"update_target":updateDetails.updateTarget
"update_target":updateDetails.updateTarget
}
}
}[]
}[]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/gcl/gcl.controller.ts
+
51
−
50
View file @
13bbc5b7
...
@@ -2,55 +2,56 @@ import { inject } from "inversify";
...
@@ -2,55 +2,56 @@ import { inject } from "inversify";
import
{
controller
,
httpPost
,
requestBody
}
from
"
inversify-express-utils
"
;
import
{
controller
,
httpPost
,
requestBody
}
from
"
inversify-express-utils
"
;
import
{
GCLService
}
from
"
./gcl.service
"
;
import
{
GCLService
}
from
"
./gcl.service
"
;
@
controller
(
"
/
"
)
@
controller
(
'
/
'
)
export
class
GCLController
{
export
class
GCLController
{
constructor
(@
inject
(
GCLService
)
private
service
:
GCLService
)
{}
constructor
(@
inject
(
GCLService
)
private
service
:
GCLService
)
{
}
@
httpPost
(
"
search
"
)
public
async
search
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
@
httpPost
(
'
search
'
)
const
searchResult
=
await
this
.
service
.
search
(
body
);
public
async
search
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
return
searchResult
;
const
searchResult
=
await
this
.
service
.
search
(
body
);
}
return
searchResult
;
}
@
httpPost
(
"
select
"
)
public
async
select
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
@
httpPost
(
'
select
'
)
const
selectResult
=
await
this
.
service
.
select
(
body
);
public
async
select
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
return
selectResult
;
const
selectResult
=
await
this
.
service
.
select
(
body
);
}
return
selectResult
;
}
@
httpPost
(
"
init
"
)
public
async
init
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
@
httpPost
(
'
init
'
)
const
initResult
=
await
this
.
service
.
init
(
body
);
public
async
init
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
return
initResult
;
const
initResult
=
await
this
.
service
.
init
(
body
);
}
return
initResult
;
}
@
httpPost
(
"
confirm
"
)
public
async
confirm
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
@
httpPost
(
'
confirm
'
)
const
confirmResult
=
await
this
.
service
.
confirm
(
body
);
public
async
confirm
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
return
confirmResult
;
const
confirmResult
=
await
this
.
service
.
confirm
(
body
);
}
return
confirmResult
;
}
@
httpPost
(
"
status
"
)
public
async
status
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
@
httpPost
(
'
status
'
)
const
statusResult
=
await
this
.
service
.
status
(
body
);
public
async
status
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
return
statusResult
;
const
statusResult
=
await
this
.
service
.
status
(
body
);
}
return
statusResult
;
}
@
httpPost
(
"
rating
"
)
public
async
rating
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
@
httpPost
(
'
rating
'
)
const
statusResult
=
await
this
.
service
.
rating
(
body
);
public
async
rating
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
return
statusResult
;
const
statusResult
=
await
this
.
service
.
rating
(
body
);
}
return
statusResult
;
}
@
httpPost
(
"
cancel
"
)
public
async
cancel
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
@
httpPost
(
'
cancel
'
)
const
statusResult
=
await
this
.
service
.
cancel
(
body
);
public
async
cancel
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
return
statusResult
;
const
statusResult
=
await
this
.
service
.
cancel
(
body
);
}
return
statusResult
;
}
@
httpPost
(
"
update
"
)
public
async
update
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
@
httpPost
(
'
update
'
)
const
updateResult
=
await
this
.
service
.
update
(
body
);
public
async
update
(@
requestBody
()
body
:
any
):
Promise
<
any
>
{
return
updateResult
;
const
updateResult
=
await
this
.
service
.
update
(
body
);
}
return
updateResult
;
}
}
}
This diff is collapsed.
Click to expand it.
src/gcl/gcl.service.ts
+
53
−
53
View file @
13bbc5b7
...
@@ -4,74 +4,74 @@ import { PSClientService } from "../psclient/psclient.service";
...
@@ -4,74 +4,74 @@ import { PSClientService } from "../psclient/psclient.service";
@
injectable
()
@
injectable
()
export
class
GCLService
{
export
class
GCLService
{
constructor
(
constructor
(
@
inject
(
TLService
)
private
tlService
:
TLService
,
@
inject
(
TLService
)
private
tlService
:
TLService
,
@
inject
(
PSClientService
)
private
psClientService
:
PSClientService
@
inject
(
PSClientService
)
private
psClientService
:
PSClientService
)
{}
)
{
}
async
search
(
body
:
any
)
{
async
search
(
body
:
any
)
{
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
search
"
);
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
search
"
);
const
psResponse
=
await
this
.
psClientService
.
post
(
payload
);
const
psResponse
=
await
this
.
psClientService
.
post
(
payload
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_search
"
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_search
"
);
return
response
;
return
response
;
}
}
async
select
(
body
:
any
)
{
async
select
(
body
:
any
)
{
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
select
"
);
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
select
"
);
const
psResponse
=
await
this
.
psClientService
.
postMany
(
payload
);
const
psResponse
=
await
this
.
psClientService
.
postMany
(
payload
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_select
"
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_select
"
);
return
response
;
return
response
;
}
}
async
init
(
body
:
any
)
{
async
init
(
body
:
any
)
{
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
init
"
);
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
init
"
);
const
psResponse
=
await
this
.
psClientService
.
postMany
(
payload
);
const
psResponse
=
await
this
.
psClientService
.
postMany
(
payload
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_init
"
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_init
"
);
return
response
;
return
response
;
}
}
async
confirm
(
body
:
any
)
{
async
confirm
(
body
:
any
)
{
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
confirm
"
);
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
confirm
"
);
const
psResponse
=
await
this
.
psClientService
.
postMany
(
payload
);
const
psResponse
=
await
this
.
psClientService
.
postMany
(
payload
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_confirm
"
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_confirm
"
);
return
response
;
return
response
;
}
}
async
status
(
body
:
any
)
{
async
status
(
body
:
any
)
{
// const payload = await this.tlService.transform(body, "select");
// const payload = await this.tlService.transform(body, "select");
// const psResponse = await this.psClientService.postMany(payload);
// const psResponse = await this.psClientService.postMany(payload);
// const response = await this.tlService.transform(psResponse, "on_select");
// const response = await this.tlService.transform(psResponse, "on_select");
// return response;
// return response;
return
"
In Progress
"
;
return
"
In Progress
"
;
}
}
async
rating
(
body
:
any
)
{
async
rating
(
body
:
any
)
{
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
rating
"
);
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
rating
"
);
const
psResponse
=
await
this
.
psClientService
.
post
(
payload
);
const
psResponse
=
await
this
.
psClientService
.
post
(
payload
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_rating
"
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_rating
"
);
return
response
;
return
response
;
}
}
async
cancel
(
body
:
any
)
{
async
cancel
(
body
:
any
)
{
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
cancel
"
);
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
cancel
"
);
const
psResponse
=
await
this
.
psClientService
.
post
(
payload
);
const
psResponse
=
await
this
.
psClientService
.
post
(
payload
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_cancel
"
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_cancel
"
);
return
response
;
return
response
;
}
}
async
update
(
body
:
any
)
{
async
update
(
body
:
any
)
{
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
update
"
);
const
payload
=
await
this
.
tlService
.
transform
(
body
,
"
update
"
);
const
psResponse
=
await
this
.
psClientService
.
postMany
(
payload
);
const
psResponse
=
await
this
.
psClientService
.
postMany
(
payload
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_update
"
);
const
response
=
await
this
.
tlService
.
transform
(
psResponse
,
"
on_update
"
);
return
response
;
return
response
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment