mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 04:51:51 +00:00
fix: resolve breaking changes caused by updated API specs
This commit is contained in:
@@ -62,7 +62,7 @@ export const createNewUser = async (
|
||||
|
||||
const bodyData = {
|
||||
data: {
|
||||
type: "User",
|
||||
type: "users",
|
||||
attributes: {
|
||||
name: formData.name,
|
||||
email: formData.email,
|
||||
@@ -99,7 +99,7 @@ export const getToken = async (formData: z.infer<typeof formSchemaSignIn>) => {
|
||||
|
||||
const bodyData = {
|
||||
data: {
|
||||
type: "Token",
|
||||
type: "tokens",
|
||||
attributes: {
|
||||
email: formData.email,
|
||||
password: formData.password,
|
||||
|
||||
@@ -56,7 +56,7 @@ export const sendInvite = async (formData: FormData) => {
|
||||
|
||||
const body = JSON.stringify({
|
||||
data: {
|
||||
type: "Invitation",
|
||||
type: "invitations",
|
||||
attributes: {
|
||||
email,
|
||||
},
|
||||
@@ -104,7 +104,7 @@ export const updateInvite = async (formData: FormData) => {
|
||||
},
|
||||
body: JSON.stringify({
|
||||
data: {
|
||||
type: "Invitation",
|
||||
type: "invitations",
|
||||
id: invitationId,
|
||||
attributes: {
|
||||
email: invitationEmail,
|
||||
|
||||
@@ -90,7 +90,7 @@ export const updateProvider = async (formData: FormData) => {
|
||||
},
|
||||
body: JSON.stringify({
|
||||
data: {
|
||||
type: "Provider",
|
||||
type: "providers",
|
||||
id: providerId,
|
||||
attributes: {
|
||||
alias: providerAlias,
|
||||
@@ -129,7 +129,7 @@ export const addProvider = async (formData: FormData) => {
|
||||
},
|
||||
body: JSON.stringify({
|
||||
data: {
|
||||
type: "Provider",
|
||||
type: "providers",
|
||||
attributes: {
|
||||
provider: providerType,
|
||||
uid: providerUid,
|
||||
@@ -209,7 +209,7 @@ export const addCredentialsProvider = async (formData: FormData) => {
|
||||
|
||||
const bodyData = {
|
||||
data: {
|
||||
type: "ProviderSecret",
|
||||
type: "provider-secrets",
|
||||
attributes: {
|
||||
secret_type: secretType,
|
||||
secret,
|
||||
@@ -219,7 +219,7 @@ export const addCredentialsProvider = async (formData: FormData) => {
|
||||
provider: {
|
||||
data: {
|
||||
id: providerId,
|
||||
type: "Provider",
|
||||
type: "providers",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -91,14 +91,14 @@ export const scanOnDemand = async (formData: FormData) => {
|
||||
},
|
||||
body: JSON.stringify({
|
||||
data: {
|
||||
type: "Scan",
|
||||
type: "scans",
|
||||
attributes: {
|
||||
name: scanName,
|
||||
},
|
||||
relationships: {
|
||||
provider: {
|
||||
data: {
|
||||
type: "Provider",
|
||||
type: "providers",
|
||||
id: providerId,
|
||||
},
|
||||
},
|
||||
@@ -136,7 +136,7 @@ export const updateScan = async (formData: FormData) => {
|
||||
},
|
||||
body: JSON.stringify({
|
||||
data: {
|
||||
type: "Scan",
|
||||
type: "scans",
|
||||
id: scanId,
|
||||
attributes: {
|
||||
name: scanName,
|
||||
|
||||
@@ -69,7 +69,7 @@ export const updateUser = async (formData: FormData) => {
|
||||
},
|
||||
body: JSON.stringify({
|
||||
data: {
|
||||
type: "User",
|
||||
type: "users",
|
||||
id: userId,
|
||||
attributes: {
|
||||
name: userName,
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ const refreshAccessToken = async (token: JwtPayload) => {
|
||||
|
||||
const bodyData = {
|
||||
data: {
|
||||
type: "TokenRefresh",
|
||||
type: "tokens-refresh",
|
||||
attributes: {
|
||||
refresh: (token as any).refreshToken,
|
||||
},
|
||||
|
||||
+15
-15
@@ -102,7 +102,7 @@ export interface ApiError {
|
||||
}
|
||||
|
||||
export interface InvitationProps {
|
||||
type: "Invitation";
|
||||
type: "invitations";
|
||||
id: string;
|
||||
attributes: {
|
||||
inserted_at: string;
|
||||
@@ -115,7 +115,7 @@ export interface InvitationProps {
|
||||
relationships: {
|
||||
inviter: {
|
||||
data: {
|
||||
type: "User";
|
||||
type: "users";
|
||||
id: string;
|
||||
};
|
||||
};
|
||||
@@ -126,7 +126,7 @@ export interface InvitationProps {
|
||||
}
|
||||
|
||||
export interface UserProps {
|
||||
type: "User";
|
||||
type: "users";
|
||||
id: string;
|
||||
attributes: {
|
||||
name: string;
|
||||
@@ -140,7 +140,7 @@ export interface UserProps {
|
||||
count: number;
|
||||
};
|
||||
data: Array<{
|
||||
type: "Membership";
|
||||
type: "memberships";
|
||||
id: string;
|
||||
}>;
|
||||
};
|
||||
@@ -175,7 +175,7 @@ export interface ProviderProps {
|
||||
}
|
||||
|
||||
export interface ScanProps {
|
||||
type: "Scan";
|
||||
type: "scans";
|
||||
id: string;
|
||||
attributes: {
|
||||
name: string;
|
||||
@@ -203,20 +203,20 @@ export interface ScanProps {
|
||||
provider: {
|
||||
data: {
|
||||
id: string;
|
||||
type: "Provider";
|
||||
type: "providers";
|
||||
};
|
||||
};
|
||||
task: {
|
||||
data: {
|
||||
id: string;
|
||||
type: "Task";
|
||||
type: "tasks";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface FindingProps {
|
||||
type: "Finding";
|
||||
type: "findings";
|
||||
id: string;
|
||||
attributes: {
|
||||
uid: string;
|
||||
@@ -264,13 +264,13 @@ export interface FindingProps {
|
||||
relationships: {
|
||||
resources: {
|
||||
data: {
|
||||
type: "Resource";
|
||||
type: "resources";
|
||||
id: string;
|
||||
}[];
|
||||
};
|
||||
scan: {
|
||||
data: {
|
||||
type: "Scan";
|
||||
type: "scans";
|
||||
id: string;
|
||||
};
|
||||
attributes: {
|
||||
@@ -290,7 +290,7 @@ export interface FindingProps {
|
||||
};
|
||||
resource: {
|
||||
data: {
|
||||
type: "Resource";
|
||||
type: "resources";
|
||||
id: string;
|
||||
}[];
|
||||
id: string;
|
||||
@@ -307,7 +307,7 @@ export interface FindingProps {
|
||||
relationships: {
|
||||
provider: {
|
||||
data: {
|
||||
type: "Provider";
|
||||
type: "providers";
|
||||
id: string;
|
||||
};
|
||||
};
|
||||
@@ -316,7 +316,7 @@ export interface FindingProps {
|
||||
count: number;
|
||||
};
|
||||
data: {
|
||||
type: "Finding";
|
||||
type: "findings";
|
||||
id: string;
|
||||
}[];
|
||||
};
|
||||
@@ -327,7 +327,7 @@ export interface FindingProps {
|
||||
};
|
||||
provider: {
|
||||
data: {
|
||||
type: "Provider";
|
||||
type: "providers";
|
||||
id: string;
|
||||
};
|
||||
attributes: {
|
||||
@@ -344,7 +344,7 @@ export interface FindingProps {
|
||||
relationships: {
|
||||
secret: {
|
||||
data: {
|
||||
type: "ProviderSecret";
|
||||
type: "provider-secrets";
|
||||
id: string;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user