-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34542 from software-mansion-labs/ts/centralized-a…
…pi-types [TS migration] Create centralized types for API params
- Loading branch information
Showing
152 changed files
with
1,720 additions
and
948 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,6 @@ | ||
type AcceptWalletTermsParams = { | ||
hasAcceptedTerms: boolean; | ||
reportID: string; | ||
}; | ||
|
||
export default AcceptWalletTermsParams; |
5 changes: 5 additions & 0 deletions
5
src/libs/API/parameters/ActivatePhysicalExpensifyCardParams.ts
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,5 @@ | ||
type ActivatePhysicalExpensifyCardParams = { | ||
cardLastFourDigits: string; | ||
cardID: number; | ||
}; | ||
export default ActivatePhysicalExpensifyCardParams; |
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,13 @@ | ||
type AddCommentOrAttachementParams = { | ||
reportID: string; | ||
reportActionID?: string; | ||
commentReportActionID?: string | null; | ||
reportComment?: string; | ||
file?: File; | ||
timezone?: string; | ||
shouldAllowActionableMentionWhispers?: boolean; | ||
clientCreatedTime?: string; | ||
isOldDotConciergeChat?: boolean; | ||
}; | ||
|
||
export default AddCommentOrAttachementParams; |
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,10 @@ | ||
type AddEmojiReactionParams = { | ||
reportID: string; | ||
skinTone: string | number; | ||
emojiCode: string; | ||
reportActionID: string; | ||
createdAt: string; | ||
useEmojiReactions: boolean; | ||
}; | ||
|
||
export default AddEmojiReactionParams; |
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,8 @@ | ||
type AddMembersToWorkspaceParams = { | ||
employees: string; | ||
welcomeNote: string; | ||
policyID: string; | ||
reportCreationData?: string; | ||
}; | ||
|
||
export default AddMembersToWorkspaceParams; |
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,3 @@ | ||
type AddNewContactMethodParams = {partnerUserID: string}; | ||
|
||
export default AddNewContactMethodParams; |
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,14 @@ | ||
import type {ValueOf} from 'type-fest'; | ||
import type CONST from '@src/CONST'; | ||
|
||
type AddPaymentCardParams = { | ||
cardNumber: string; | ||
cardYear: string; | ||
cardMonth: string; | ||
cardCVV: string; | ||
addressName: string; | ||
addressZip: string; | ||
currency: ValueOf<typeof CONST.CURRENCY>; | ||
isP2PDebitCard: boolean; | ||
}; | ||
export default AddPaymentCardParams; |
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,12 @@ | ||
type AddPersonalBankAccountParams = { | ||
addressName: string; | ||
routingNumber: string; | ||
accountNumber: string; | ||
isSavings: boolean; | ||
setupType: string; | ||
bank?: string; | ||
plaidAccountID: string; | ||
plaidAccessToken: string; | ||
}; | ||
|
||
export default AddPersonalBankAccountParams; |
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,9 @@ | ||
type AddSchoolPrincipalParams = { | ||
firstName: string; | ||
lastName: string; | ||
partnerUserID: string; | ||
policyID: string; | ||
reportCreationData: string; | ||
}; | ||
|
||
export default AddSchoolPrincipalParams; |
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,15 @@ | ||
import type {ValueOf} from 'type-fest'; | ||
import type CONST from '@src/CONST'; | ||
import type {WriteCapability} from '@src/types/onyx/Report'; | ||
|
||
type AddWorkspaceRoomParams = { | ||
reportID: string; | ||
createdReportActionID: string; | ||
policyID?: string; | ||
reportName?: string; | ||
visibility?: ValueOf<typeof CONST.REPORT.VISIBILITY>; | ||
writeCapability?: WriteCapability; | ||
welcomeMessage?: string; | ||
}; | ||
|
||
export default AddWorkspaceRoomParams; |
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,6 @@ | ||
type AnswerQuestionsForWalletParams = { | ||
idologyAnswers: string; | ||
idNumber: string; | ||
}; | ||
|
||
export default AnswerQuestionsForWalletParams; |
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,10 @@ | ||
type AuthenticatePusherParams = { | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
socket_id: string; | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
channel_name: string; | ||
shouldRetry: boolean; | ||
forceNetworkRequest: boolean; | ||
}; | ||
|
||
export default AuthenticatePusherParams; |
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,7 @@ | ||
type BankAccountHandlePlaidErrorParams = { | ||
bankAccountID: number; | ||
error: string; | ||
errorDescription: string; | ||
plaidRequestID: string; | ||
}; | ||
export default BankAccountHandlePlaidErrorParams; |
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,9 @@ | ||
import type {ValueOf} from 'type-fest'; | ||
import type CONST from '@src/CONST'; | ||
|
||
type BeginAppleSignInParams = { | ||
idToken: string | undefined | null; | ||
preferredLocale: ValueOf<typeof CONST.LOCALES> | null; | ||
}; | ||
|
||
export default BeginAppleSignInParams; |
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,9 @@ | ||
import type {ValueOf} from 'type-fest'; | ||
import type CONST from '@src/CONST'; | ||
|
||
type BeginGoogleSignInParams = { | ||
token: string | null; | ||
preferredLocale: ValueOf<typeof CONST.LOCALES> | null; | ||
}; | ||
|
||
export default BeginGoogleSignInParams; |
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,5 @@ | ||
type BeginSignInParams = { | ||
email: string; | ||
}; | ||
|
||
export default BeginSignInParams; |
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,6 @@ | ||
type CancelTaskParams = { | ||
cancelledTaskReportActionID?: string; | ||
taskReportID?: string; | ||
}; | ||
|
||
export default CancelTaskParams; |
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,6 @@ | ||
type ChronosRemoveOOOEventParams = { | ||
googleEventID: string; | ||
reportActionID: string; | ||
}; | ||
|
||
export default ChronosRemoveOOOEventParams; |
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,3 @@ | ||
type CloseAccountParams = {message: string}; | ||
|
||
export default CloseAccountParams; |
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,10 @@ | ||
type CompleteEngagementModalParams = { | ||
reportID: string; | ||
reportActionID?: string; | ||
commentReportActionID?: string | null; | ||
reportComment?: string; | ||
engagementChoice: string; | ||
timezone?: string; | ||
}; | ||
|
||
export default CompleteEngagementModalParams; |
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,6 @@ | ||
type CompleteTaskParams = { | ||
taskReportID?: string; | ||
completedTaskReportActionID?: string; | ||
}; | ||
|
||
export default CompleteTaskParams; |
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,7 @@ | ||
type ConnectBankAccountManuallyParams = { | ||
bankAccountID: number; | ||
accountNumber?: string; | ||
routingNumber?: string; | ||
plaidMask?: string; | ||
}; | ||
export default ConnectBankAccountManuallyParams; |
10 changes: 10 additions & 0 deletions
10
src/libs/API/parameters/ConnectBankAccountWithPlaidParams.ts
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,10 @@ | ||
type ConnectBankAccountWithPlaidParams = { | ||
bankAccountID: number; | ||
routingNumber: string; | ||
accountNumber: string; | ||
bank?: string; | ||
plaidAccountID: string; | ||
plaidAccessToken: string; | ||
}; | ||
|
||
export default ConnectBankAccountWithPlaidParams; |
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,15 @@ | ||
type CreateTaskParams = { | ||
parentReportActionID?: string; | ||
parentReportID?: string; | ||
taskReportID?: string; | ||
createdTaskReportActionID?: string; | ||
title?: string; | ||
description?: string; | ||
assignee?: string; | ||
assigneeAccountID?: number; | ||
assigneeChatReportID?: string; | ||
assigneeChatReportActionID?: string; | ||
assigneeChatCreatedReportActionID?: string; | ||
}; | ||
|
||
export default CreateTaskParams; |
20 changes: 20 additions & 0 deletions
20
src/libs/API/parameters/CreateWorkspaceFromIOUPaymentParams.ts
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,20 @@ | ||
type CreateWorkspaceFromIOUPaymentParams = { | ||
policyID: string; | ||
announceChatReportID: string; | ||
adminsChatReportID: string; | ||
expenseChatReportID: string; | ||
ownerEmail: string; | ||
makeMeAdmin: boolean; | ||
policyName: string; | ||
type: string; | ||
announceCreatedReportActionID: string; | ||
adminsCreatedReportActionID: string; | ||
expenseCreatedReportActionID: string; | ||
customUnitID: string; | ||
customUnitRateID: string; | ||
iouReportID: string; | ||
memberData: string; | ||
reportActionID: string; | ||
}; | ||
|
||
export default CreateWorkspaceFromIOUPaymentParams; |
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,17 @@ | ||
type CreateWorkspaceParams = { | ||
policyID: string; | ||
announceChatReportID: string; | ||
adminsChatReportID: string; | ||
expenseChatReportID: string; | ||
ownerEmail: string; | ||
makeMeAdmin: boolean; | ||
policyName: string; | ||
type: string; | ||
announceCreatedReportActionID: string; | ||
adminsCreatedReportActionID: string; | ||
expenseCreatedReportActionID: string; | ||
customUnitID: string; | ||
customUnitRateID: string; | ||
}; | ||
|
||
export default CreateWorkspaceParams; |
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,6 @@ | ||
type DeleteCommentParams = { | ||
reportID: string; | ||
reportActionID: string; | ||
}; | ||
|
||
export default DeleteCommentParams; |
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,3 @@ | ||
type DeleteContactMethodParams = {partnerUserID: string}; | ||
|
||
export default DeleteContactMethodParams; |
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,6 @@ | ||
type DeleteMembersFromWorkspaceParams = { | ||
emailList: string; | ||
policyID: string; | ||
}; | ||
|
||
export default DeleteMembersFromWorkspaceParams; |
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,3 @@ | ||
type DeletePaymentBankAccountParams = {bankAccountID: number}; | ||
|
||
export default DeletePaymentBankAccountParams; |
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,4 @@ | ||
type DeletePaymentCardParams = { | ||
fundID: number; | ||
}; | ||
export default DeletePaymentCardParams; |
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,5 @@ | ||
type DeleteWorkspaceAvatarParams = { | ||
policyID: string; | ||
}; | ||
|
||
export default DeleteWorkspaceAvatarParams; |
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,5 @@ | ||
type DeleteWorkspaceParams = { | ||
policyID: string; | ||
}; | ||
|
||
export default DeleteWorkspaceParams; |
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,10 @@ | ||
type EditTaskAssigneeParams = { | ||
taskReportID?: string; | ||
assignee?: string; | ||
editedTaskReportActionID?: string; | ||
assigneeChatReportID?: string; | ||
assigneeChatReportActionID?: string; | ||
assigneeChatCreatedReportActionID?: string; | ||
}; | ||
|
||
export default EditTaskAssigneeParams; |
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,8 @@ | ||
type EditTaskParams = { | ||
taskReportID?: string; | ||
title?: string; | ||
description?: string; | ||
editedTaskReportActionID?: string; | ||
}; | ||
|
||
export default EditTaskParams; |
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,6 @@ | ||
type ExpandURLPreviewParams = { | ||
reportID: string; | ||
reportActionID: string; | ||
}; | ||
|
||
export default ExpandURLPreviewParams; |
Oops, something went wrong.