-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(iterable): user deletion improvements
- Loading branch information
1 parent
f51a8c6
commit 35ea46a
Showing
4 changed files
with
276 additions
and
2 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
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,93 @@ | ||
[ | ||
{ | ||
"request": { | ||
"body": [ | ||
{ | ||
"destType": "ITERABLE", | ||
"userAttributes": [ | ||
{ | ||
"userId": "rudder1" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"body": [ | ||
{ | ||
"destType": "ITERABLE", | ||
"userAttributes": [ | ||
{ | ||
"userId": "rudder2" | ||
} | ||
], | ||
"config": { | ||
"apiToken": "dummyApiKey" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"body": [ | ||
{ | ||
"destType": "ITERABLE", | ||
"userAttributes": [ | ||
{ | ||
"userId": "rudder1" | ||
}, | ||
{ | ||
"userId": "rudder2" | ||
} | ||
], | ||
"config": { | ||
"apiKey": "dummyApiKey" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"body": [ | ||
{ | ||
"destType": "ITERABLE", | ||
"userAttributes": [ | ||
{ | ||
"userId": "rudder3" | ||
}, | ||
{ | ||
"userId": "rudder4" | ||
} | ||
], | ||
"config": { | ||
"apiKey": "invalidKey" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"body": [ | ||
{ | ||
"destType": "ITERABLE", | ||
"userAttributes": [ | ||
{ | ||
"userId": "rudder5" | ||
}, | ||
{ | ||
"userId": "rudder6" | ||
} | ||
], | ||
"config": { | ||
"apiKey": "dummyApiKey" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] |
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,32 @@ | ||
[ | ||
[ | ||
{ | ||
"statusCode": 400, | ||
"error": "Config for deletion not present" | ||
} | ||
], | ||
[ | ||
{ | ||
"statusCode": 400, | ||
"error": "api key for deletion not present" | ||
} | ||
], | ||
[ | ||
{ | ||
"statusCode": 400, | ||
"error": "User deletion request failed for userIds : [{\"userId\":\"rudder2\",\"Reason\":\"User does not exist. Email: UserId: rudder2\"}]" | ||
} | ||
], | ||
[ | ||
{ | ||
"error": "User deletion request failed : Invalid API key", | ||
"statusCode": 401 | ||
} | ||
], | ||
[ | ||
{ | ||
"statusCode": 200, | ||
"status": "successful" | ||
} | ||
] | ||
] |
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,138 @@ | ||
[ | ||
[ | ||
{ | ||
"type": "delete", | ||
"reqParams": [ | ||
"https://api.iterable.com/api/users/byUserId/rudder1", | ||
{}, | ||
{ | ||
"Accept": "application/json", | ||
"api_key": "dummyApiKey" | ||
} | ||
], | ||
"response": { | ||
"response": { | ||
"data": { | ||
"msg": "All users associated with rudder1 were successfully deleted", | ||
"code": "Success", | ||
"params": null | ||
}, | ||
"status": 200 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "delete", | ||
"reqParams": [ | ||
"https://api.iterable.com/api/users/byUserId/rudder2", | ||
{}, | ||
{ | ||
"Accept": "application/json", | ||
"api_key": "dummyApiKey" | ||
} | ||
], | ||
"response": { | ||
"response": { | ||
"data": { | ||
"msg": "User does not exist. Email: UserId: rudder2", | ||
"code": "BadParams", | ||
"params": null | ||
}, | ||
"status": 400 | ||
} | ||
} | ||
} | ||
], | ||
[ | ||
{ | ||
"type": "delete", | ||
"reqParams": [ | ||
"https://api.iterable.com/api/users/byUserId/rudder3", | ||
{}, | ||
{ | ||
"Accept": "application/json", | ||
"api_key": "invalidKey" | ||
} | ||
], | ||
"response": { | ||
"response": { | ||
"data": { | ||
"msg": "Invalid API key", | ||
"code": "Success", | ||
"params": { | ||
"endpoint": "/api/users/byUserId/rudder3" | ||
} | ||
}, | ||
"status": 401 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "delete", | ||
"reqParams": [ | ||
"https://api.iterable.com/api/users/byUserId/rudder4", | ||
{}, | ||
{ | ||
"Accept": "application/json", | ||
"api_key": "invalidKey" | ||
} | ||
], | ||
"response": { | ||
"response": { | ||
"data": { | ||
"msg": "Invalid API key", | ||
"code": "Success", | ||
"params": { | ||
"endpoint": "/api/users/byUserId/rudder3" | ||
} | ||
}, | ||
"status": 401 | ||
} | ||
} | ||
} | ||
], | ||
[ | ||
{ | ||
"type": "delete", | ||
"reqParams": [ | ||
"https://api.iterable.com/api/users/byUserId/rudder5", | ||
{}, | ||
{ | ||
"Accept": "application/json", | ||
"api_key": "dummyApiKey" | ||
} | ||
], | ||
"response": { | ||
"response": { | ||
"data": { | ||
"msg": "All users associated with rudder5 were successfully deleted", | ||
"code": "Success", | ||
"params": null | ||
}, | ||
"status": 200 | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "delete", | ||
"reqParams": [ | ||
"https://api.iterable.com/api/users/byUserId/rudder6", | ||
{}, | ||
{ | ||
"Accept": "application/json", | ||
"api_key": "dummyApiKey" | ||
} | ||
], | ||
"response": { | ||
"response": { | ||
"data": { | ||
"msg": "All users associated with rudder6 were successfully deleted", | ||
"code": "Success", | ||
"params": null | ||
}, | ||
"status": 200 | ||
} | ||
} | ||
} | ||
] | ||
] |