mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 16:26:16 +00:00
feat: added description and security over api written in docs
This commit is contained in:
@@ -11,6 +11,13 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
url: "/:workspaceId/secret-snapshots",
|
url: "/:workspaceId/secret-snapshots",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Return project secret snapshots ids",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
apiKeyAuth: [],
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
workspaceId: z.string().trim()
|
workspaceId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
@@ -72,6 +79,13 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
url: "/:workspaceId/audit-logs",
|
url: "/:workspaceId/audit-logs",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Return audit logs",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
workspaceId: z.string().trim()
|
workspaceId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -56,6 +56,13 @@ export const registerSnapshotRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
url: "/:secretSnapshotId/rollback",
|
url: "/:secretSnapshotId/rollback",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Roll back project secrets to those captured in a secret snapshot version.",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
apiKeyAuth: [],
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
secretSnapshotId: z.string().trim()
|
secretSnapshotId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ export const fastifySwagger = fp(async (fastify) => {
|
|||||||
],
|
],
|
||||||
components: {
|
components: {
|
||||||
securitySchemes: {
|
securitySchemes: {
|
||||||
bearer: {
|
bearerAuth: {
|
||||||
type: "http",
|
type: "http",
|
||||||
scheme: "bearer",
|
scheme: "bearer",
|
||||||
bearerFormat: "JWT",
|
bearerFormat: "JWT",
|
||||||
description: "A service token in Infisical"
|
description: "An access token in Infisical"
|
||||||
},
|
},
|
||||||
apiKey: {
|
apiKeyAuth: {
|
||||||
type: "apiKey",
|
type: "apiKey",
|
||||||
in: "header",
|
in: "header",
|
||||||
name: "X-API-Key",
|
name: "X-API-Key",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export const registerIdentityAccessTokenRouter = async (server: FastifyZodProvid
|
|||||||
url: "/token/renew",
|
url: "/token/renew",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Renew access token",
|
||||||
body: z.object({
|
body: z.object({
|
||||||
accessToken: z.string().trim()
|
accessToken: z.string().trim()
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/",
|
url: "/",
|
||||||
onRequest: verifyAuth([AuthMode.JWT]),
|
onRequest: verifyAuth([AuthMode.JWT]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Create identity",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
body: z.object({
|
body: z.object({
|
||||||
name: z.string().trim(),
|
name: z.string().trim(),
|
||||||
organizationId: z.string().trim(),
|
organizationId: z.string().trim(),
|
||||||
@@ -51,6 +57,12 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/:identityId",
|
url: "/:identityId",
|
||||||
onRequest: verifyAuth([AuthMode.JWT]),
|
onRequest: verifyAuth([AuthMode.JWT]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Update identity",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
identityId: z.string()
|
identityId: z.string()
|
||||||
}),
|
}),
|
||||||
@@ -93,6 +105,12 @@ export const registerIdentityRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/:identityId",
|
url: "/:identityId",
|
||||||
onRequest: verifyAuth([AuthMode.JWT]),
|
onRequest: verifyAuth([AuthMode.JWT]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Delete identity",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
identityId: z.string()
|
identityId: z.string()
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/universal-auth/login",
|
url: "/universal-auth/login",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Login with Universal Auth",
|
||||||
body: z.object({
|
body: z.object({
|
||||||
clientId: z.string().trim(),
|
clientId: z.string().trim(),
|
||||||
clientSecret: z.string().trim()
|
clientSecret: z.string().trim()
|
||||||
@@ -67,6 +68,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Attach Universal Auth configuration onto identity",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
identityId: z.string().trim()
|
identityId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
@@ -140,6 +147,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Update Universal Auth configuration on identity",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
identityId: z.string()
|
identityId: z.string()
|
||||||
}),
|
}),
|
||||||
@@ -207,6 +220,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Retrieve Universal Auth configuration on identity",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
identityId: z.string()
|
identityId: z.string()
|
||||||
}),
|
}),
|
||||||
@@ -243,6 +262,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Create Universal Auth Client Secret for identity",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
identityId: z.string()
|
identityId: z.string()
|
||||||
}),
|
}),
|
||||||
@@ -287,6 +312,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "List Universal Auth Client Secrets for identity",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
identityId: z.string()
|
identityId: z.string()
|
||||||
}),
|
}),
|
||||||
@@ -322,6 +353,12 @@ export const registerIdentityUaRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Revoke Universal Auth Client Secrets for identity",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
identityId: z.string(),
|
identityId: z.string(),
|
||||||
clientSecretId: z.string()
|
clientSecretId: z.string()
|
||||||
|
|||||||
@@ -10,6 +10,13 @@ export const registerProjectEnvRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/:workspaceId/environments",
|
url: "/:workspaceId/environments",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Create environment",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
workspaceId: z.string().trim()
|
workspaceId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
@@ -57,6 +64,13 @@ export const registerProjectEnvRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/:workspaceId/environments/:id",
|
url: "/:workspaceId/environments/:id",
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Update environment",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
workspaceId: z.string().trim(),
|
workspaceId: z.string().trim(),
|
||||||
id: z.string().trim()
|
id: z.string().trim()
|
||||||
@@ -112,6 +126,13 @@ export const registerProjectEnvRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/:workspaceId/environments/:id",
|
url: "/:workspaceId/environments/:id",
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Delete environment",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
workspaceId: z.string().trim(),
|
workspaceId: z.string().trim(),
|
||||||
id: z.string().trim()
|
id: z.string().trim()
|
||||||
|
|||||||
@@ -10,6 +10,13 @@ export const registerProjectMembershipRouter = async (server: FastifyZodProvider
|
|||||||
url: "/:workspaceId/memberships",
|
url: "/:workspaceId/memberships",
|
||||||
method: "GET",
|
method: "GET",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Return project user memberships",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
workspaceId: z.string().trim()
|
workspaceId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
@@ -94,6 +101,13 @@ export const registerProjectMembershipRouter = async (server: FastifyZodProvider
|
|||||||
url: "/:workspaceId/memberships/:membershipId",
|
url: "/:workspaceId/memberships/:membershipId",
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Update project user membership",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
workspaceId: z.string().trim(),
|
workspaceId: z.string().trim(),
|
||||||
membershipId: z.string().trim()
|
membershipId: z.string().trim()
|
||||||
@@ -138,6 +152,13 @@ export const registerProjectMembershipRouter = async (server: FastifyZodProvider
|
|||||||
url: "/:workspaceId/memberships/:membershipId",
|
url: "/:workspaceId/memberships/:membershipId",
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Delete project user membership",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
workspaceId: z.string().trim(),
|
workspaceId: z.string().trim(),
|
||||||
membershipId: z.string().trim()
|
membershipId: z.string().trim()
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) =>
|
|||||||
url: "/",
|
url: "/",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Create folders",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
body: z.object({
|
body: z.object({
|
||||||
workspaceId: z.string().trim(),
|
workspaceId: z.string().trim(),
|
||||||
environment: z.string().trim(),
|
environment: z.string().trim(),
|
||||||
@@ -56,6 +63,13 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) =>
|
|||||||
url: "/:folderId",
|
url: "/:folderId",
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Update folder",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
// old way this was name
|
// old way this was name
|
||||||
folderId: z.string()
|
folderId: z.string()
|
||||||
@@ -107,6 +121,13 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) =>
|
|||||||
url: "/:folderId",
|
url: "/:folderId",
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Delete a folder",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
folderId: z.string()
|
folderId: z.string()
|
||||||
}),
|
}),
|
||||||
@@ -155,6 +176,13 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) =>
|
|||||||
url: "/",
|
url: "/",
|
||||||
method: "GET",
|
method: "GET",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Get folders",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
querystring: z.object({
|
querystring: z.object({
|
||||||
workspaceId: z.string().trim(),
|
workspaceId: z.string().trim(),
|
||||||
environment: z.string().trim(),
|
environment: z.string().trim(),
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) =>
|
|||||||
url: "/",
|
url: "/",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Create secret imports",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
body: z.object({
|
body: z.object({
|
||||||
workspaceId: z.string().trim(),
|
workspaceId: z.string().trim(),
|
||||||
environment: z.string().trim(),
|
environment: z.string().trim(),
|
||||||
@@ -64,6 +71,13 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) =>
|
|||||||
url: "/:secretImportId",
|
url: "/:secretImportId",
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Update secret imports",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
secretImportId: z.string().trim()
|
secretImportId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
@@ -126,6 +140,13 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) =>
|
|||||||
url: "/:secretImportId",
|
url: "/:secretImportId",
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Delete secret imports",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
secretImportId: z.string().trim()
|
secretImportId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
@@ -178,6 +199,13 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) =>
|
|||||||
url: "/",
|
url: "/",
|
||||||
method: "GET",
|
method: "GET",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Get secret imports",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
querystring: z.object({
|
querystring: z.object({
|
||||||
workspaceId: z.string().trim(),
|
workspaceId: z.string().trim(),
|
||||||
environment: z.string().trim(),
|
environment: z.string().trim(),
|
||||||
|
|||||||
@@ -10,6 +10,13 @@ export const registerIdentityOrgRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/:orgId/identity-memberships",
|
url: "/:orgId/identity-memberships",
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Return organization identity memberships",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
orgId: z.string().trim()
|
orgId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -45,6 +45,12 @@ export const registerIdentityProjectRouter = async (server: FastifyZodProvider)
|
|||||||
url: "/:projectId/identity-memberships/:identityId",
|
url: "/:projectId/identity-memberships/:identityId",
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Update project identity memberships",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
projectId: z.string().trim(),
|
projectId: z.string().trim(),
|
||||||
identityId: z.string().trim()
|
identityId: z.string().trim()
|
||||||
@@ -75,6 +81,12 @@ export const registerIdentityProjectRouter = async (server: FastifyZodProvider)
|
|||||||
url: "/:projectId/identity-memberships/:identityId",
|
url: "/:projectId/identity-memberships/:identityId",
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Delete project identity memberships",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
projectId: z.string().trim(),
|
projectId: z.string().trim(),
|
||||||
identityId: z.string().trim()
|
identityId: z.string().trim()
|
||||||
@@ -101,6 +113,12 @@ export const registerIdentityProjectRouter = async (server: FastifyZodProvider)
|
|||||||
url: "/:projectId/identity-memberships",
|
url: "/:projectId/identity-memberships",
|
||||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Return project identity memberships",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
projectId: z.string().trim()
|
projectId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -9,6 +9,13 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
url: "/:organizationId/memberships",
|
url: "/:organizationId/memberships",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Return organization user memberships",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
organizationId: z.string().trim()
|
organizationId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
@@ -42,6 +49,13 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
url: "/:organizationId/workspaces",
|
url: "/:organizationId/workspaces",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Return projects in organization that user is part of",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
organizationId: z.string().trim()
|
organizationId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
@@ -79,6 +93,13 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
url: "/:organizationId/memberships/:membershipId",
|
url: "/:organizationId/memberships/:membershipId",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Update organization user memberships",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({ organizationId: z.string().trim(), membershipId: z.string().trim() }),
|
params: z.object({ organizationId: z.string().trim(), membershipId: z.string().trim() }),
|
||||||
body: z.object({
|
body: z.object({
|
||||||
role: z.string().trim()
|
role: z.string().trim()
|
||||||
@@ -107,6 +128,13 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
url: "/:organizationId/memberships/:membershipId",
|
url: "/:organizationId/memberships/:membershipId",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Delete organization user memberships",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({ organizationId: z.string().trim(), membershipId: z.string().trim() }),
|
params: z.object({ organizationId: z.string().trim(), membershipId: z.string().trim() }),
|
||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
|
|||||||
@@ -10,6 +10,12 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/:workspaceId/encrypted-key",
|
url: "/:workspaceId/encrypted-key",
|
||||||
method: "GET",
|
method: "GET",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Return encrypted project key",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
workspaceId: z.string().trim()
|
workspaceId: z.string().trim()
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -21,6 +21,12 @@ export const registerServiceTokenRouter = async (server: FastifyZodProvider) =>
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
onRequest: verifyAuth([AuthMode.SERVICE_TOKEN]),
|
onRequest: verifyAuth([AuthMode.SERVICE_TOKEN]),
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Return Infisical Token data",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
response: {
|
response: {
|
||||||
200: ServiceTokensSchema.merge(
|
200: ServiceTokensSchema.merge(
|
||||||
z.object({
|
z.object({
|
||||||
|
|||||||
@@ -71,6 +71,12 @@ export const registerUserRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
url: "/me/organizations",
|
url: "/me/organizations",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Return organizations that current user is part of",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
organizations: OrganizationsSchema.array()
|
organizations: OrganizationsSchema.array()
|
||||||
@@ -179,6 +185,12 @@ export const registerUserRouter = async (server: FastifyZodProvider) => {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
url: "/me",
|
url: "/me",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Retrieve the current user on the request",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
response: {
|
response: {
|
||||||
200: z.object({
|
200: z.object({
|
||||||
user: UsersSchema.merge(UserEncryptionKeysSchema.omit({ verifier: true }))
|
user: UsersSchema.merge(UserEncryptionKeysSchema.omit({ verifier: true }))
|
||||||
|
|||||||
@@ -38,6 +38,13 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/raw",
|
url: "/raw",
|
||||||
method: "GET",
|
method: "GET",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "List secrets",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
querystring: z.object({
|
querystring: z.object({
|
||||||
workspaceId: z.string().trim().optional(),
|
workspaceId: z.string().trim().optional(),
|
||||||
environment: z.string().trim().optional(),
|
environment: z.string().trim().optional(),
|
||||||
@@ -120,6 +127,13 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/raw/:secretName",
|
url: "/raw/:secretName",
|
||||||
method: "GET",
|
method: "GET",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Get a secret by name",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
secretName: z.string().trim()
|
secretName: z.string().trim()
|
||||||
}),
|
}),
|
||||||
@@ -202,6 +216,13 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/raw/:secretName",
|
url: "/raw/:secretName",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Create secret",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
secretName: z.string().trim()
|
secretName: z.string().trim()
|
||||||
}),
|
}),
|
||||||
@@ -271,6 +292,13 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/raw/:secretName",
|
url: "/raw/:secretName",
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Update secret",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
secretName: z.string().trim()
|
secretName: z.string().trim()
|
||||||
}),
|
}),
|
||||||
@@ -337,6 +365,13 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
url: "/raw/:secretName",
|
url: "/raw/:secretName",
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
schema: {
|
schema: {
|
||||||
|
description: "Delete secret",
|
||||||
|
security: [
|
||||||
|
{
|
||||||
|
bearerAuth: [],
|
||||||
|
apiKeyAuth: []
|
||||||
|
}
|
||||||
|
],
|
||||||
params: z.object({
|
params: z.object({
|
||||||
secretName: z.string().trim()
|
secretName: z.string().trim()
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Create"
|
title: "Create"
|
||||||
openapi: "POST /api/v2/workspace/{workspaceId}/environments"
|
openapi: "POST /api/v1/workspace/{workspaceId}/environments"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Delete"
|
title: "Delete"
|
||||||
openapi: "DELETE /api/v2/workspace/{workspaceId}/environments"
|
openapi: "DELETE /api/v1/workspace/{workspaceId}/environments/{id}"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Update"
|
title: "Update"
|
||||||
openapi: "PUT /api/v2/workspace/{workspaceId}/environments"
|
openapi: "PATCH /api/v1/workspace/{workspaceId}/environments/{id}"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Create"
|
title: "Create"
|
||||||
openapi: "POST /api/v1/folders/"
|
openapi: "POST /api/v1/folders"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Delete"
|
title: "Delete"
|
||||||
openapi: "DELETE /api/v1/folders/{folderName}"
|
openapi: "DELETE /api/v1/folders/{folderId}"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "List"
|
title: "List"
|
||||||
openapi: "GET /api/v1/folders/"
|
openapi: "GET /api/v1/folders"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Update"
|
title: "Update"
|
||||||
openapi: "PATCH /api/v1/folders/{folderName}"
|
openapi: "PATCH /api/v1/folders/{folderId}"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Create"
|
title: "Create"
|
||||||
openapi: "POST /api/v1/identities/"
|
openapi: "POST /api/v1/identities"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Delete"
|
title: "Delete"
|
||||||
openapi: "DELETE /api/v1/identities/{identityId}"
|
openapi: "DELETE /api/v1/identities/{identityId}"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Update"
|
title: "Update"
|
||||||
openapi: "PATCH /api/v1/identities/{identityId}"
|
openapi: "PATCH /api/v1/identities/{identityId}"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "List Identity Memberships"
|
title: "List Identity Memberships"
|
||||||
openapi: "GET /api/v2/organizations/{organizationId}/identity-memberships"
|
openapi: "GET /api/v2/organizations/{orgId}/identity-memberships"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Create"
|
title: "Create"
|
||||||
openapi: "POST /api/v1/secret-imports/"
|
openapi: "POST /api/v1/secret-imports"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Delete"
|
title: "Delete"
|
||||||
openapi: "DELETE /api/v1/secret-imports/{id}"
|
openapi: "DELETE /api/v1/secret-imports/{secretImportId}"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "List"
|
title: "List"
|
||||||
openapi: "GET /api/v1/secret-imports/"
|
openapi: "GET /api/v1/secret-imports"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Update"
|
title: "Update"
|
||||||
openapi: "PUT /api/v1/secret-imports/{id}"
|
openapi: "PATCH /api/v1/secret-imports/{secretImportId}"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: "Get"
|
title: "Get"
|
||||||
openapi: "GET /api/v2/service-token/"
|
openapi: "GET /api/v2/service-token"
|
||||||
---
|
---
|
||||||
|
|
||||||
<Warning>
|
<Warning>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Delete Identity Membership"
|
title: "Delete Identity Membership"
|
||||||
openapi: "DELETE /api/v2/workspace/{workspaceId}/identity-memberships/{identityId}"
|
openapi: "DELETE /api/v2/workspace/{projectId}/identity-memberships/{identityId}"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Delete User Membership"
|
title: "Delete User Membership"
|
||||||
openapi: "DELETE /api/v2/workspace/{workspaceId}/memberships/{membershipId}"
|
openapi: "DELETE /api/v1/workspace/{workspaceId}/memberships/{membershipId}"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "List Identity Memberships"
|
title: "List Identity Memberships"
|
||||||
openapi: "GET /api/v2/workspace/{workspaceId}/identity-memberships"
|
openapi: "GET /api/v2/workspace/{projectId}/identity-memberships"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Get User Memberships"
|
title: "Get User Memberships"
|
||||||
openapi: "GET /api/v2/workspace/{workspaceId}/memberships"
|
openapi: "GET /api/v1/workspace/{workspaceId}/memberships"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Roll Back to Snapshot"
|
title: "Roll Back to Snapshot"
|
||||||
openapi: "POST /api/v1/workspace/{workspaceId}/secret-snapshots/rollback"
|
openapi: "POST /api/v1/secret-snapshot/{secretSnapshotId}/rollback"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Update Identity Membership"
|
title: "Update Identity Membership"
|
||||||
openapi: "PATCH /api/v2/workspace/{workspaceId}/identity-memberships/{identityId}"
|
openapi: "PATCH /api/v2/workspace/{projectId}/identity-memberships/{identityId}"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Update User Membership"
|
title: "Update User Membership"
|
||||||
openapi: "PATCH /api/v2/workspace/{workspaceId}/memberships/{membershipId}"
|
openapi: "PATCH /api/v1/workspace/{workspaceId}/memberships/{membershipId}"
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user