mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 14:27:23 +00:00
address feedback suggestions
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
export enum OrderByDirection {
|
||||
ASC = "asc",
|
||||
DESC = "desc"
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useMutation, useQuery, useQueryClient, UseQueryOptions } from "@tanstack/react-query";
|
||||
|
||||
import { apiRequest } from "@app/config/request";
|
||||
import { OrderByDirection } from "@app/hooks/api/generic/types";
|
||||
|
||||
import { TGroupOrgMembership } from "../groups/types";
|
||||
import {
|
||||
@@ -8,6 +9,7 @@ import {
|
||||
Invoice,
|
||||
License,
|
||||
Organization,
|
||||
OrgIdentityOrderBy,
|
||||
OrgPlanTable,
|
||||
PlanBillingInfo,
|
||||
PmtMethod,
|
||||
@@ -372,9 +374,9 @@ export const useGetIdentityMembershipOrgs = (
|
||||
organizationId,
|
||||
offset = 0,
|
||||
limit = 100,
|
||||
orderBy = "name",
|
||||
direction = "asc",
|
||||
textFilter = ""
|
||||
orderBy = OrgIdentityOrderBy.Name,
|
||||
orderDirection = OrderByDirection.ASC,
|
||||
search = ""
|
||||
}: TListOrgIdentitiesDTO,
|
||||
options?: Omit<
|
||||
UseQueryOptions<
|
||||
@@ -390,8 +392,8 @@ export const useGetIdentityMembershipOrgs = (
|
||||
offset: String(offset),
|
||||
limit: String(limit),
|
||||
orderBy: String(orderBy),
|
||||
direction: String(direction),
|
||||
textFilter: String(textFilter)
|
||||
orderDirection: String(orderDirection),
|
||||
search: String(search)
|
||||
});
|
||||
return useQuery({
|
||||
queryKey: organizationKeys.getOrgIdentityMembershipsWithParams({
|
||||
@@ -399,8 +401,8 @@ export const useGetIdentityMembershipOrgs = (
|
||||
offset,
|
||||
limit,
|
||||
orderBy,
|
||||
direction,
|
||||
textFilter
|
||||
orderDirection,
|
||||
search
|
||||
}),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get<TOrgIdentitiesList>(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { OrderByDirection } from "@app/hooks/api/generic/types";
|
||||
import { IdentityMembershipOrg } from "@app/hooks/api/identities/types";
|
||||
|
||||
export type Organization = {
|
||||
@@ -109,12 +110,17 @@ export type TListOrgIdentitiesDTO = {
|
||||
organizationId: string;
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
orderBy?: string;
|
||||
direction?: string;
|
||||
textFilter?: string;
|
||||
orderBy?: OrgIdentityOrderBy;
|
||||
orderDirection?: OrderByDirection;
|
||||
search?: string;
|
||||
};
|
||||
|
||||
export type TOrgIdentitiesList = {
|
||||
identityMemberships: IdentityMembershipOrg[];
|
||||
totalCount: number;
|
||||
};
|
||||
|
||||
export enum OrgIdentityOrderBy {
|
||||
Name = "name",
|
||||
Role = "role"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useMutation, useQuery, useQueryClient, UseQueryOptions } from "@tanstack/react-query";
|
||||
|
||||
import { apiRequest } from "@app/config/request";
|
||||
import { OrderByDirection } from "@app/hooks/api/generic/types";
|
||||
|
||||
import { CaStatus } from "../ca/enums";
|
||||
import { TCertificateAuthority } from "../ca/types";
|
||||
@@ -23,6 +24,7 @@ import {
|
||||
DeleteEnvironmentDTO,
|
||||
DeleteWorkspaceDTO,
|
||||
NameWorkspaceSecretsDTO,
|
||||
ProjectIdentityOrderBy,
|
||||
RenameWorkspaceDTO,
|
||||
TGetUpgradeProjectStatusDTO,
|
||||
TListProjectIdentitiesDTO,
|
||||
@@ -538,9 +540,9 @@ export const useGetWorkspaceIdentityMemberships = (
|
||||
workspaceId,
|
||||
offset = 0,
|
||||
limit = 100,
|
||||
orderBy = "name",
|
||||
direction = "asc",
|
||||
textFilter = ""
|
||||
orderBy = ProjectIdentityOrderBy.Name,
|
||||
orderDirection = OrderByDirection.ASC,
|
||||
search = ""
|
||||
}: TListProjectIdentitiesDTO,
|
||||
options?: Omit<
|
||||
UseQueryOptions<
|
||||
@@ -558,16 +560,16 @@ export const useGetWorkspaceIdentityMemberships = (
|
||||
offset,
|
||||
limit,
|
||||
orderBy,
|
||||
direction,
|
||||
textFilter
|
||||
orderDirection,
|
||||
search
|
||||
}),
|
||||
queryFn: async () => {
|
||||
const params = new URLSearchParams({
|
||||
offset: String(offset),
|
||||
limit: String(limit),
|
||||
orderBy: String(orderBy),
|
||||
direction: String(direction),
|
||||
textFilter: String(textFilter)
|
||||
orderDirection: String(orderDirection),
|
||||
search: String(search)
|
||||
});
|
||||
|
||||
const { data } = await apiRequest.get<TProjectIdentitiesList>(
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { OrderByDirection } from "@app/hooks/api/generic/types";
|
||||
|
||||
import { TProjectRole } from "../roles/types";
|
||||
|
||||
export enum ProjectVersion {
|
||||
@@ -146,7 +148,11 @@ export type TListProjectIdentitiesDTO = {
|
||||
workspaceId: string;
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
orderBy?: string;
|
||||
direction?: string;
|
||||
textFilter?: string;
|
||||
orderBy?: ProjectIdentityOrderBy;
|
||||
orderDirection?: OrderByDirection;
|
||||
search?: string;
|
||||
};
|
||||
|
||||
export enum ProjectIdentityOrderBy {
|
||||
Name = "name"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user