Skip to content

Commit

Permalink
refactor: move src/types/api/auth to shared/types/form/form_auth (#2510)
Browse files Browse the repository at this point in the history
  • Loading branch information
karrui authored Aug 4, 2021
1 parent 97eb1cc commit f428b93
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 10 deletions.
File renamed without changes.
5 changes: 5 additions & 0 deletions shared/types/form/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export * from './form'
export * from './form_auth'
export * from './form_feedback'
export * from './form_logic'
export * from './form_logo'
2 changes: 1 addition & 1 deletion src/public/services/EncryptionService.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BasicField } from '../../../shared/types/field'
import {
AttachmentResponse,
CheckboxResponse,
Expand All @@ -19,7 +20,6 @@ import {
UenResponse,
YesNoResponse,
} from '../../../shared/types/response'
import { BasicField } from '../../types'

import { FormSgSdk } from './FormSgSdkService'

Expand Down
6 changes: 3 additions & 3 deletions src/public/services/PublicFormAuthService.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import axios from 'axios'

import { AuthType } from '../../types'
import {
FormAuthType,
PublicFormAuthLogoutDto,
PublicFormAuthRedirectDto,
PublicFormAuthValidateEsrvcIdDto,
} from '../../types/api'
} from '../../../shared/types/form'

// Exported for testing
export const PUBLIC_FORMS_ENDPOINT = '/api/v3/forms'
Expand Down Expand Up @@ -35,7 +35,7 @@ export const validateEsrvcId = (
}

export const logoutOfSpcpSession = (
authType: AuthType,
authType: FormAuthType,
): Promise<PublicFormAuthLogoutDto> => {
return axios
.get<PublicFormAuthLogoutDto>(
Expand Down
10 changes: 5 additions & 5 deletions src/public/services/UpdateFormService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ import {
import {
AdminFormDto,
AdminFormViewDto,
EndPageUpdateDto,
FormSettings,
LogicDto,
PermissionsUpdateDto,
SettingsUpdateDto,
} from '../../../shared/types/form/form'
import { LogicDto } from '../../../shared/types/form/form_logic'
StartPageUpdateDto,
} from '../../../shared/types/form'
import { SubmissionResponseDto } from '../../../shared/types/submission'
import {
EmailSubmissionDto,
EncryptSubmissionDto,
EndPageUpdateDto,
FormUpdateParams,
PermissionsUpdateDto,
StartPageUpdateDto,
} from '../../types/api'
import { createEmailSubmissionFormData } from '../utils/submission'

Expand Down
1 change: 1 addition & 0 deletions src/types/api/form_auth.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../../../shared/types/form/form_auth'
2 changes: 1 addition & 1 deletion src/types/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './core'
export * from './auth'
export * from './form_auth'
export * from './field'
export * from './form'
export * from './billing'
Expand Down

0 comments on commit f428b93

Please sign in to comment.