Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: clean up remaining client type imports using backend types #2510

Merged
merged 1 commit into from
Aug 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
@@ -19,7 +20,6 @@ import {
UenResponse,
YesNoResponse,
} from '../../../shared/types/response'
import { BasicField } from '../../types'

import { FormSgSdk } from './FormSgSdkService'

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'
@@ -35,7 +35,7 @@ export const validateEsrvcId = (
}

export const logoutOfSpcpSession = (
authType: AuthType,
authType: FormAuthType,
): Promise<PublicFormAuthLogoutDto> => {
return axios
.get<PublicFormAuthLogoutDto>(
10 changes: 5 additions & 5 deletions src/public/services/UpdateFormService.ts
Original file line number Diff line number Diff line change
@@ -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'

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'