in formstack-baton-requests/src/main/scala/com/gu/identity/formstackbatonrequests/services/FormstackService.scala [17:37]
def accountFormsForGivenPage(page: Int, accountToken: FormstackAccountToken): Either[Throwable, FormsResponse]
def formSubmissionsForGivenPage(page: Int, formId: String, minTimeUTC: LocalDateTime, maxTimeUTC: Option[LocalDateTime], encryptionPassword: String, accountToken: FormstackAccountToken): Either[Throwable, FormSubmissions]
def submissionData(requestEmail:String, submissionIdEmails: List[SubmissionIdEmail], config: PerformLambdaConfig): Either[Throwable, List[FormstackSubmissionQuestionAnswer]]
def deleteUserData(requestEmail:String, submissionIdEmails: List[SubmissionIdEmail], config: PerformLambdaConfig): Either[Throwable, List[SubmissionDeletionReponse]]
}
//this used to group results to multiple formstack calls in found and not found results.
//for not found results we basically have just the id and for the found results we have whatever the particular api call would return
case class FormstackResponses(found:List[Submission], notFound: List[SubmissionIdEmail])
sealed trait FormstackSkippableError extends Throwable
case class FormstackDecryptionError(message: String) extends FormstackSkippableError
case class FormstackAuthError(message: String) extends FormstackSkippableError
object CustomHttp extends BaseHttp(
options = Seq(
HttpOptions.connTimeout(2000),
HttpOptions.readTimeout(10000),
HttpOptions.followRedirects(false)
)
)
class FormstackService(http:BaseHttp = CustomHttp) extends FormstackRequestService with LazyLogging {