Skip to content
Draft
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions typescript/formsApps.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,16 @@ type _NewFormsApp = {
}>
/** Google analytics tag id */
googleAnalyticsTagId?: string
/**
* OAuth2 authentication settings for the forms app.
*
* If `forceOAuthAuthentication` is `true`, all users will be required to
* authenticate via the OAuth2 provider specified in `integrationProviderId`.
*/
oAuth2Authentication?: {
integrationProviderId: string
forceOAuthAuthentication?: boolean
}
}

export type NewVolunteersFormsApp = _NewFormsApp & {
Expand Down
18 changes: 18 additions & 0 deletions typescript/integrations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export type IntegrationType =
| 'NYLAS'
| 'SHAREPOINT'
| 'CIVIC_REC'
| 'OAUTH_2'

type IntegrationBase = {
organisationId: string
Expand Down Expand Up @@ -302,6 +303,22 @@ export type IntegrationCivicRec<S = SavedSecret> = IntegrationBase & {
}
}

export type IntegrationOAuth2Provider<S = SavedSecret> = {
id: string
label: string
clientId: string
clientSecret: ConstrainedSecret<S>
attributeRequestMethod: 'GET' | 'POST'
issuerURL: string
}

export type IntegrationOAuth2<S = SavedSecret> = IntegrationBase & {
type: 'OAUTH_2'
configuration: {
providers: IntegrationOAuth2Provider<S>[]
}
}

export type DeleteIntegrationValidationResults = {
forms: Array<{
formId: number
Expand Down Expand Up @@ -338,3 +355,4 @@ export type Integration<S = SavedSecret> =
| IntegrationNylas
| IntegrationSharepoint<S>
| IntegrationCivicRec<S>
| IntegrationOAuth2<S>