bugfix: copy/regenerate link for invitation action added to connection request lis in orgs feature.
This commit is contained in:
@@ -18,6 +18,12 @@ export interface CounterpartItemDto {
|
||||
status: 'PENDING' | 'ACTIVE' | 'REJECTED' | 'EXPIRED';
|
||||
createdAt: string;
|
||||
acceptedAt: string | null;
|
||||
/**
|
||||
* Set by GET /organizations/connections when this PENDING row came from inviteOrganization()
|
||||
* (joined server-side). Lets the main table show copy-invite without opening history.
|
||||
*/
|
||||
pendingInvitationId?: string | null;
|
||||
invitationStatus?: OrganizationInvitationHistoryItemDto['status'] | null;
|
||||
}
|
||||
|
||||
export interface OrganizationInvitationHistoryItemDto {
|
||||
@@ -36,7 +42,7 @@ export const organizationApi = {
|
||||
},
|
||||
|
||||
list: async (): Promise<{ success: boolean; data: { items: CounterpartItemDto[] } }> => {
|
||||
const response = await apiClient.get('/organizations/links');
|
||||
const response = await apiClient.get('/organizations/connections');
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -48,23 +54,27 @@ export const organizationApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
createLink: async (
|
||||
createConnectionRequest: async (
|
||||
targetOrganizationId: string,
|
||||
): Promise<{ success: boolean; data: { id: string; status: 'PENDING' | 'ACTIVE' | 'REJECTED' } }> => {
|
||||
const response = await apiClient.post('/organizations/links', { targetOrganizationId });
|
||||
const response = await apiClient.post('/organizations/connections', { targetOrganizationId });
|
||||
return response.data;
|
||||
},
|
||||
|
||||
respondLink: async (
|
||||
linkId: string,
|
||||
respondToConnectionRequest: async (
|
||||
connectionId: string,
|
||||
action: 'ACCEPT' | 'REJECT',
|
||||
): Promise<{ success: boolean; data: { id: string; status: 'PENDING' | 'ACTIVE' | 'REJECTED' } }> => {
|
||||
const response = await apiClient.patch(`/organizations/links/${linkId}/respond`, { action });
|
||||
const response = await apiClient.patch(`/organizations/connections/${connectionId}/respond`, {
|
||||
action,
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
|
||||
deleteLink: async (linkId: string): Promise<{ success: boolean; data: { id: string }; message: string }> => {
|
||||
const response = await apiClient.delete(`/organizations/links/${linkId}`);
|
||||
deleteConnection: async (
|
||||
connectionId: string,
|
||||
): Promise<{ success: boolean; data: { id: string }; message: string }> => {
|
||||
const response = await apiClient.delete(`/organizations/connections/${connectionId}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user