Skip to content

Commit 4295b47

Browse files
feat: add test mode feature (#400)
1 parent 54a400a commit 4295b47

18 files changed

+814
-88
lines changed

apps/api/OsmoX-API.postman_collection.json

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info": {
3-
"_postman_id": "54a84395-9a6f-42f0-a130-615811b203fa",
3+
"_postman_id": "94e8e403-1d7b-4516-af46-e7865654e4b5",
44
"name": "OsmoX-API",
55
"description": "List of all APIs used in OsmoX",
66
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
@@ -679,7 +679,7 @@
679679
"body": {
680680
"mode": "graphql",
681681
"graphql": {
682-
"query": "query {\r\n notifications(\r\n options: {\r\n limit: 5\r\n offset: 0\r\n sortBy: \"createdOn\"\r\n sortOrder: DESC\r\n search: \"[email protected]\"\r\n filters: [{ field: \"applicationId\", operator: \"eq\", value: \"1\" }]\r\n }\r\n ) {\r\n notifications {\r\n applicationDetails {\r\n applicationId\r\n name\r\n userId\r\n status\r\n createdOn\r\n updatedOn\r\n }\r\n applicationId\r\n channelType\r\n createdBy\r\n createdOn\r\n data\r\n deliveryStatus\r\n id\r\n providerDetails {\r\n providerId\r\n name\r\n channelType\r\n isEnabled\r\n configuration\r\n applicationId\r\n userId\r\n status\r\n }\r\n providerId\r\n result\r\n status\r\n updatedBy\r\n updatedOn\r\n }\r\n total,\r\n offset,\r\n limit\r\n }\r\n}",
682+
"query": "query {\r\n notifications(\r\n options: {\r\n limit: 5\r\n offset: 0\r\n sortBy: \"createdOn\"\r\n sortOrder: DESC\r\n # search: \"[email protected]\"\r\n filters: [{ field: \"applicationId\", operator: \"eq\", value: \"1\" }]\r\n }\r\n ) {\r\n notifications {\r\n applicationDetails {\r\n applicationId\r\n name\r\n userId\r\n status\r\n createdOn\r\n updatedOn\r\n }\r\n applicationId\r\n channelType\r\n createdBy\r\n createdOn\r\n data\r\n deliveryStatus\r\n id\r\n providerDetails {\r\n providerId\r\n name\r\n channelType\r\n isEnabled\r\n configuration\r\n applicationId\r\n userId\r\n status\r\n }\r\n providerId\r\n result\r\n status\r\n updatedBy\r\n updatedOn\r\n }\r\n total,\r\n offset,\r\n limit\r\n }\r\n}",
683683
"variables": ""
684684
}
685685
},
@@ -830,7 +830,7 @@
830830
"body": {
831831
"mode": "graphql",
832832
"graphql": {
833-
"query": "query {\r\n applications(\r\n options: {\r\n limit: 5\r\n offset: 0\r\n sortBy: \"createdOn\"\r\n sortOrder: ASC\r\n search: \"Pinestem\"\r\n filters: [{ field: \"applicationId\", operator: \"eq\", value: \"1\" }]\r\n }\r\n ) {\r\n applications {\r\n applicationId\r\n name\r\n userId\r\n createdOn\r\n updatedOn\r\n status\r\n }\r\n total,\r\n offset,\r\n limit\r\n }\r\n}",
833+
"query": "query {\r\n applications(\r\n options: {\r\n limit: 5\r\n offset: 0\r\n sortBy: \"createdOn\"\r\n sortOrder: ASC\r\n # search: \"Pinestem\"\r\n filters: [{ field: \"applicationId\", operator: \"eq\", value: \"1\" }]\r\n }\r\n ) {\r\n applications {\r\n applicationId\r\n name\r\n userId\r\n testModeEnabled\r\n whitelistRecipients\r\n createdOn\r\n updatedOn\r\n status\r\n }\r\n total,\r\n offset,\r\n limit\r\n }\r\n}",
834834
"variables": ""
835835
}
836836
},
@@ -878,8 +878,8 @@
878878
"body": {
879879
"mode": "graphql",
880880
"graphql": {
881-
"query": "mutation CreateApplication {\r\n application(createApplicationInput: {\r\n name: \"<newApplicationName>\",\r\n }) {\r\n applicationId\r\n name\r\n userId\r\n createdOn\r\n updatedOn\r\n status\r\n }\r\n}",
882-
"variables": ""
881+
"query": "mutation CreateApplication\r\n($whitelistRecipients: JSONObject!) \r\n{\r\n application(createApplicationInput: {\r\n name: \"<newApplicationName>\",\r\n testModeEnabled: 0,\r\n whitelistRecipients: $whitelistRecipients,\r\n }) {\r\n applicationId\r\n name\r\n userId\r\n testModeEnabled\r\n whitelistRecipients\r\n createdOn\r\n updatedOn\r\n status\r\n }\r\n}",
882+
"variables": "{\n \"whitelistRecipients\": {\n \"2\": [\"[email protected]\",\"[email protected]\"], \n \"5\": [\"+19800176002\",\"+19800176003\"]\n }\n}"
883883
}
884884
},
885885
"url": {
@@ -894,6 +894,54 @@
894894
"description": "Allows successfully creating an application based on the options passed."
895895
},
896896
"response": []
897+
},
898+
{
899+
"name": "Update Application",
900+
"event": [
901+
{
902+
"listen": "test",
903+
"script": {
904+
"exec": [
905+
""
906+
],
907+
"type": "text/javascript",
908+
"packages": {}
909+
}
910+
}
911+
],
912+
"request": {
913+
"method": "POST",
914+
"header": [
915+
{
916+
"key": "Authorization",
917+
"value": "Bearer {{auth-token}}",
918+
"type": "text"
919+
},
920+
{
921+
"key": "Content-Type",
922+
"value": "application/json",
923+
"type": "text"
924+
}
925+
],
926+
"body": {
927+
"mode": "graphql",
928+
"graphql": {
929+
"query": "mutation UpdateApplication($applicationId: Float!, $whitelistRecipients: JSONObject!) {\r\n updateApplication(updateApplicationInput: {\r\n applicationId: $applicationId,\r\n name: \"<updatedApplicationName>\",\r\n testModeEnabled: 1,\r\n whitelistRecipients: $whitelistRecipients,\r\n }) {\r\n applicationId\r\n name\r\n userId\r\n testModeEnabled\r\n whitelistRecipients\r\n createdOn\r\n updatedOn\r\n status\r\n }\r\n}",
930+
"variables": "{\n \"applicationId\": {{applicationId}},\n \"whitelistRecipients\": {\n \"2\": [\"[email protected]\",\"[email protected]\"], \n \"15\": [\"+19800176002\",\"+19800176003\"]\n }\n}"
931+
}
932+
},
933+
"url": {
934+
"raw": "{{base_url}}/graphql",
935+
"host": [
936+
"{{base_url}}"
937+
],
938+
"path": [
939+
"graphql"
940+
]
941+
},
942+
"description": "Allows successfully updating an application based on the options passed."
943+
},
944+
"response": []
897945
}
898946
],
899947
"description": "These API calls are responsible for all operations related to Applications such as creation, display etc."

0 commit comments

Comments
 (0)