-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STTYPES-15 Provide TS definitions for claiming feature in the stripes…
…-acq-components lib
- Loading branch information
1 parent
5b24b65
commit 235eaef
Showing
19 changed files
with
80 additions
and
3 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
11 changes: 10 additions & 1 deletion
11
acq-components/lib/FindRecords/hooks/useRecordsSelect/useRecordsSelect.d.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 |
---|---|---|
@@ -1 +1,10 @@ | ||
export const useRecordsSelect: any; | ||
interface useRecordsSelectReturn<T> { | ||
allRecordsSelected: boolean; | ||
selectedRecordsMap: Record<string, T>; | ||
selectedRecordsLength: number; | ||
toggleSelectAll: () => void; | ||
selectRecord: (record: T) => void; | ||
isRecordSelected: ({ item: T }); | ||
} | ||
|
||
export declare function useRecordsSelect<T = unknown & { id: string }>({ records }: { records: T[] }): useRecordsSelectReturn<T>; |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './FindRecords'; | ||
export { useRecordsSelect } from './hooks'; |
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 @@ | ||
export * from './menu-items'; |
6 changes: 6 additions & 0 deletions
6
...lib/claiming/components/menu-items/DelayClaimActionMenuItem/DelayClaimActionMenuItem.d.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,6 @@ | ||
interface DelayClaimActionMenuItemProps { | ||
disabled?: boolean; | ||
onClick: (e?: Event) => void; | ||
} | ||
|
||
export declare function DelayClaimActionMenuItem(props: DelayClaimActionMenuItemProps): any; |
1 change: 1 addition & 0 deletions
1
acq-components/lib/claiming/components/menu-items/DelayClaimActionMenuItem/index.d.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 @@ | ||
export { DelayClaimActionMenuItem } from './DelayClaimActionMenuItem'; |
6 changes: 6 additions & 0 deletions
6
.../components/menu-items/MarkUnreceivableActionMenuItem/MarkUnreceivableActionMenuItem.d.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,6 @@ | ||
interface MarkUnreceivableActionMenuItemProps { | ||
disabled?: boolean; | ||
onClick: (e?: Event) => void; | ||
} | ||
|
||
export declare function MarkUnreceivableActionMenuItem(props: MarkUnreceivableActionMenuItemProps): any; |
1 change: 1 addition & 0 deletions
1
acq-components/lib/claiming/components/menu-items/MarkUnreceivableActionMenuItem/index.d.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 @@ | ||
export { MarkUnreceivableActionMenuItem } from './MarkUnreceivableActionMenuItem'; |
6 changes: 6 additions & 0 deletions
6
...s/lib/claiming/components/menu-items/SendClaimActionMenuItem/SendClaimActionMenuItem.d.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,6 @@ | ||
interface SendClaimActionMenuItemProps { | ||
disabled?: boolean; | ||
onClick: (e?: Event) => void; | ||
} | ||
|
||
export declare function SendClaimActionMenuItem(props: SendClaimActionMenuItemProps): any; |
1 change: 1 addition & 0 deletions
1
acq-components/lib/claiming/components/menu-items/SendClaimActionMenuItem/index.d.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 @@ | ||
export { SendClaimActionMenuItem } from './SendClaimActionMenuItem'; |
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 @@ | ||
export { DelayClaimActionMenuItem } from './DelayClaimActionMenuItem'; | ||
export { MarkUnreceivableActionMenuItem } from './MarkUnreceivableActionMenuItem'; | ||
export { SendClaimActionMenuItem } from './SendClaimActionMenuItem'; |
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 @@ | ||
export { useClaimsSend } from './useClaimsSend'; |
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 @@ | ||
export { useClaimsSend } from './useClaimsSend'; |
25 changes: 25 additions & 0 deletions
25
acq-components/lib/claiming/hooks/useClaimsSend/useClaimsSend.d.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,25 @@ | ||
interface SendClaimsData { | ||
claimingPieceIds: string[]; | ||
} | ||
|
||
export interface ClaimingResult { | ||
pieceId: string; | ||
type: 'success' | 'failure'; | ||
error?: { | ||
code?: string; | ||
message: string; | ||
type?: string; | ||
}; | ||
} | ||
|
||
export interface SendClaimsResponse { | ||
claimingPieceResults: ClaimingResult[]; | ||
totalRecords: number; | ||
} | ||
|
||
interface useClaimsSendReturn { | ||
isLoading: boolean; | ||
sendClaims: ({ data }: { data: SendClaimsData }) => Promise<SendClaimsResponse>; | ||
} | ||
|
||
export declare function useClaimsSend(): useClaimsSendReturn; |
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,2 @@ | ||
export * from './components'; | ||
export * from './hooks'; |
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 @@ | ||
export { usePiecesStatusBatchUpdate } from './usePiecesStatusBatchUpdate'; | ||
11 changes: 10 additions & 1 deletion
11
acq-components/lib/hooks/useShowCallout/useShowCallout.d.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 |
---|---|---|
@@ -1 +1,10 @@ | ||
export const useShowCallout: any; | ||
import { CalloutContextType } from '../../../../core'; | ||
|
||
type ShowCalloutFnArgs = Omit<Parameters<CalloutContextType['sendCallout']>[0], 'message'> & { | ||
message?: string, | ||
messageId?: string, | ||
}; | ||
|
||
type ShowCalloutFn = (args: ShowCalloutFnArgs) => void; | ||
|
||
export declare function useShowCallout(): ShowCalloutFn; |
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