-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
212 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
step_1: | ||
call: reflect.mock | ||
args: | ||
response: | ||
firstName: null | ||
lastName: null | ||
idCode: 'EE60001019906' | ||
displayName: 'Admin' | ||
JWTCreated: 1674204041000 | ||
login: 'Admin' | ||
authorities: | ||
- 'ROLE_ADMINISTRATOR' | ||
- 'ROLE_SERVICE_MANAGER' | ||
- 'ROLE_CUSTOMER_SUPPORT_AGENT' | ||
- 'ROLE_CHATBOT_TRAINER' | ||
- 'ROLE_ANALYST' | ||
JWTExpirationTimestamp: 1674232841000 | ||
result: reflected_request | ||
|
||
step_2: | ||
return: ${reflected_request.response.body} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
step_1: | ||
call: reflect.mock | ||
args: | ||
response: | ||
data: | ||
- id: '22fa5630-6f92-4d50-92ba-685c872383af' | ||
customerSupportId: '' | ||
customerSupportDisplayName: '' | ||
endUserId: '' | ||
endUserFirstName: '' | ||
endUserLastName: '' | ||
status: 'OPEN' | ||
created: '2023-01-17T13:18:38.808+00:00' | ||
updated: '2023-01-17T13:19:26.348+00:00' | ||
ended: null | ||
endUserOs: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36' | ||
endUserUrl: 'https://test.buerokratt.ee/' | ||
forwardedToName: null | ||
forwardedByUser: '' | ||
forwardedFromCsa: '' | ||
forwardedToCsa: '' | ||
lastMessage: 'Suunan teid klienditeenindajale. Varuge natukene kannatust.' | ||
contactsMessage: null | ||
lastMessageTimestamp: '2023-01-17T13:19:26.316+00:00' | ||
- id: '5206b7bd-0812-40a8-ae1d-3774f07f06f0' | ||
customerSupportId: '' | ||
customerSupportDisplayName: '' | ||
endUserId: '' | ||
endUserFirstName: '' | ||
endUserLastName: '' | ||
status: 'OPEN' | ||
created: '2023-01-19T13:38:32.421+00:00' | ||
updated: '2023-01-19T13:38:32.430+00:00' | ||
ended: null | ||
endUserOs: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36' | ||
endUserUrl: 'https://test.buerokratt.ee/' | ||
forwardedToName: null | ||
forwardedByUser: '' | ||
forwardedFromCsa: '' | ||
forwardedToCsa: '' | ||
lastMessage: 'aitäh' | ||
contactsMessage: null | ||
lastMessageTimestamp: '2022-11-23T09:33:56.803+00:00' | ||
- id: 'b7bba1c2-b7ab-4b17-825a-2d66a7d16fc4' | ||
customerSupportId: '' | ||
customerSupportDisplayName: '' | ||
endUserId: '' | ||
endUserFirstName: '' | ||
endUserLastName: '' | ||
status: 'OPEN' | ||
created: '2023-01-19T13:38:32.421+00:00' | ||
updated: '2023-01-19T13:38:32.430+00:00' | ||
ended: null | ||
endUserOs: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36' | ||
endUserUrl: 'https://test.buerokratt.ee/' | ||
forwardedToName: null | ||
forwardedByUser: '' | ||
forwardedFromCsa: '' | ||
forwardedToCsa: '' | ||
lastMessage: 'dasnhpwa' | ||
contactsMessage: null | ||
lastMessageTimestamp: '2023-01-18T12:24:54.557+00:00' | ||
result: reflected_request | ||
|
||
step_2: | ||
return: ${reflected_request.response.body} |
11 changes: 11 additions & 0 deletions
11
DSL/Ruuter/GET/generic/cs-get-customer-support-activity.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
step_1: | ||
call: reflect.mock | ||
args: | ||
response: | ||
idCode: 'EE49902216518' | ||
active: 'true' | ||
status: 'idle' | ||
result: reflected_request | ||
|
||
step_2: | ||
return: ${reflected_request.response.body} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
step_1: | ||
call: reflect.mock | ||
args: | ||
response: | ||
userId': 1 | ||
forwardedChatPopupNotifications: true | ||
forwardedChatSoundNotifications: true | ||
forwardedChatEmailNotifications: true | ||
newChatPopupNotifications: true | ||
newChatSoundNotifications: true | ||
newChatEmailNotifications: true | ||
useAutocorrect: false | ||
result: reflected_request | ||
|
||
step_2: | ||
return: ${reflected_request.response.body} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
step_1: | ||
call: reflect.mock | ||
args: | ||
response: | ||
data: | ||
get_user: | ||
- authorities: | ||
- "ROLE_ADMINISTRATOR" | ||
result: reflected_request | ||
|
||
step_2: | ||
return: ${reflected_request.response.body} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import axios, { AxiosError } from 'axios'; | ||
|
||
const instance = axios.create({ | ||
baseURL: import.meta.env.REACT_APP_RUUTER_V2_ANALYTICS_API_URL, | ||
headers: { | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json', | ||
}, | ||
withCredentials: true, | ||
}); | ||
|
||
instance.interceptors.response.use( | ||
(response) => { | ||
return response; | ||
}, | ||
(error: AxiosError) => { | ||
if (error.response?.status === 401) { | ||
//TODO: handle unauthorized requests | ||
} | ||
return Promise.reject(error); | ||
} | ||
); | ||
|
||
export default instance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import axios, {AxiosError} from 'axios'; | ||
|
||
const testCookie = 'bearer ' + (localStorage.getItem('token') || 'test'); | ||
|
||
const instance = axios.create({ | ||
baseURL: import.meta.env.REACT_APP_RUUTER_V1_PRIVATE_API_URL + '/generic/', | ||
headers: { | ||
Accept: 'application/json', | ||
Testcookie: '' | ||
}, | ||
withCredentials: false, | ||
}); | ||
|
||
instance.interceptors.request.use((config) => { | ||
config.headers['Testcookie'] = testCookie; | ||
return config; | ||
}); | ||
|
||
instance.interceptors.response.use( | ||
(response) => { | ||
return response; | ||
}, | ||
(error: AxiosError) => { | ||
if (error.response?.status === 401) { | ||
|
||
} | ||
return Promise.reject(error); | ||
}, | ||
); | ||
|
||
export default instance; |