mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-26 18:52:41 +00:00
Reformat generated OpenAPI response schemas for readability
Agent-Logs-Url: https://github.com/fosrl/pangolin/sessions/7b395a8e-7fae-4f4d-952e-4030fea08262 Co-authored-by: oschwartz10612 <4999704+oschwartz10612@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
15a9eb28d9
commit
f3bee70c23
@@ -149,7 +149,9 @@ const bodySchema = z
|
|||||||
export type UpdateAlertRuleResponse = {
|
export type UpdateAlertRuleResponse = {
|
||||||
alertRuleId: number;
|
alertRuleId: number;
|
||||||
};
|
};
|
||||||
const UpdateAlertRuleResponseDataSchema = z.object({alertRuleId: z.number()});
|
const UpdateAlertRuleResponseDataSchema = z.object({
|
||||||
|
alertRuleId: z.number()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ const bodySchema = z.strictObject({
|
|||||||
export type CreateEventStreamingDestinationResponse = {
|
export type CreateEventStreamingDestinationResponse = {
|
||||||
destinationId: number;
|
destinationId: number;
|
||||||
};
|
};
|
||||||
const CreateEventStreamingDestinationResponseDataSchema = z.object({destinationId: z.number()});
|
const CreateEventStreamingDestinationResponseDataSchema = z.object({
|
||||||
|
destinationId: z.number()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -46,7 +46,9 @@ const bodySchema = z.strictObject({
|
|||||||
export type UpdateEventStreamingDestinationResponse = {
|
export type UpdateEventStreamingDestinationResponse = {
|
||||||
destinationId: number;
|
destinationId: number;
|
||||||
};
|
};
|
||||||
const UpdateEventStreamingDestinationResponseDataSchema = z.object({destinationId: z.number()});
|
const UpdateEventStreamingDestinationResponseDataSchema = z.object({
|
||||||
|
destinationId: z.number()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -53,7 +53,9 @@ const bodySchema = z.strictObject({
|
|||||||
export type CreateHealthCheckResponse = {
|
export type CreateHealthCheckResponse = {
|
||||||
targetHealthCheckId: number;
|
targetHealthCheckId: number;
|
||||||
};
|
};
|
||||||
const CreateHealthCheckResponseDataSchema = z.object({targetHealthCheckId: z.number()});
|
const CreateHealthCheckResponseDataSchema = z.object({
|
||||||
|
targetHealthCheckId: z.number()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -82,7 +82,28 @@ export type UpdateHealthCheckResponse = {
|
|||||||
hcHealthyThreshold: number | null;
|
hcHealthyThreshold: number | null;
|
||||||
hcUnhealthyThreshold: number | null;
|
hcUnhealthyThreshold: number | null;
|
||||||
};
|
};
|
||||||
const UpdateHealthCheckResponseDataSchema = z.object({targetHealthCheckId: z.number(), name: z.string().nullable(), siteId: z.number().nullable(), hcEnabled: z.boolean(), hcHealth: z.string().nullable(), hcMode: z.string().nullable(), hcHostname: z.string().nullable(), hcPort: z.number().nullable(), hcPath: z.string().nullable(), hcScheme: z.string().nullable(), hcMethod: z.string().nullable(), hcInterval: z.number().nullable(), hcUnhealthyInterval: z.number().nullable(), hcTimeout: z.number().nullable(), hcHeaders: z.string().nullable(), hcFollowRedirects: z.boolean().nullable(), hcStatus: z.number().nullable(), hcTlsServerName: z.string().nullable(), hcHealthyThreshold: z.number().nullable(), hcUnhealthyThreshold: z.number().nullable()});
|
const UpdateHealthCheckResponseDataSchema = z.object({
|
||||||
|
targetHealthCheckId: z.number(),
|
||||||
|
name: z.string().nullable(),
|
||||||
|
siteId: z.number().nullable(),
|
||||||
|
hcEnabled: z.boolean(),
|
||||||
|
hcHealth: z.string().nullable(),
|
||||||
|
hcMode: z.string().nullable(),
|
||||||
|
hcHostname: z.string().nullable(),
|
||||||
|
hcPort: z.number().nullable(),
|
||||||
|
hcPath: z.string().nullable(),
|
||||||
|
hcScheme: z.string().nullable(),
|
||||||
|
hcMethod: z.string().nullable(),
|
||||||
|
hcInterval: z.number().nullable(),
|
||||||
|
hcUnhealthyInterval: z.number().nullable(),
|
||||||
|
hcTimeout: z.number().nullable(),
|
||||||
|
hcHeaders: z.string().nullable(),
|
||||||
|
hcFollowRedirects: z.boolean().nullable(),
|
||||||
|
hcStatus: z.number().nullable(),
|
||||||
|
hcTlsServerName: z.string().nullable(),
|
||||||
|
hcHealthyThreshold: z.number().nullable(),
|
||||||
|
hcUnhealthyThreshold: z.number().nullable()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ const bodySchema = z.strictObject({
|
|||||||
export type UpdateOrgIdpResponse = {
|
export type UpdateOrgIdpResponse = {
|
||||||
idpId: number;
|
idpId: number;
|
||||||
};
|
};
|
||||||
const UpdateOrgIdpResponseDataSchema = z.object({idpId: z.number()});
|
const UpdateOrgIdpResponseDataSchema = z.object({
|
||||||
|
idpId: z.number()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -33,7 +33,13 @@ export type CreateOrgApiKeyResponse = {
|
|||||||
lastChars: string;
|
lastChars: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
};
|
};
|
||||||
const CreateOrgApiKeyResponseDataSchema = z.object({apiKeyId: z.string(), name: z.string(), apiKey: z.string(), lastChars: z.string(), createdAt: z.string()});
|
const CreateOrgApiKeyResponseDataSchema = z.object({
|
||||||
|
apiKeyId: z.string(),
|
||||||
|
name: z.string(),
|
||||||
|
apiKey: z.string(),
|
||||||
|
lastChars: z.string(),
|
||||||
|
createdAt: z.string()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -15,7 +15,11 @@ export type PickClientDefaultsResponse = {
|
|||||||
olmSecret: string;
|
olmSecret: string;
|
||||||
subnet: string;
|
subnet: string;
|
||||||
};
|
};
|
||||||
const PickClientDefaultsResponseDataSchema = z.object({olmId: z.string(), olmSecret: z.string(), subnet: z.string()});
|
const PickClientDefaultsResponseDataSchema = z.object({
|
||||||
|
olmId: z.string(),
|
||||||
|
olmSecret: z.string(),
|
||||||
|
subnet: z.string()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
const pickClientDefaultsSchema = z.strictObject({
|
const pickClientDefaultsSchema = z.strictObject({
|
||||||
|
|||||||
@@ -25,7 +25,11 @@ export type UpdateDomainResponse = {
|
|||||||
certResolver: string | null;
|
certResolver: string | null;
|
||||||
preferWildcardCert: boolean | null;
|
preferWildcardCert: boolean | null;
|
||||||
};
|
};
|
||||||
const UpdateDomainResponseDataSchema = z.object({domainId: z.string(), certResolver: z.string().nullable(), preferWildcardCert: z.boolean().nullable()});
|
const UpdateDomainResponseDataSchema = z.object({
|
||||||
|
domainId: z.string(),
|
||||||
|
certResolver: z.string().nullable(),
|
||||||
|
preferWildcardCert: z.boolean().nullable()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -34,7 +34,10 @@ export type CreateIdpResponse = {
|
|||||||
idpId: number;
|
idpId: number;
|
||||||
redirectUrl: string;
|
redirectUrl: string;
|
||||||
};
|
};
|
||||||
const CreateIdpResponseDataSchema = z.object({idpId: z.number(), redirectUrl: z.string()});
|
const CreateIdpResponseDataSchema = z.object({
|
||||||
|
idpId: z.number(),
|
||||||
|
redirectUrl: z.string()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ const bodySchema = z.strictObject({
|
|||||||
export type UpdateIdpResponse = {
|
export type UpdateIdpResponse = {
|
||||||
idpId: number;
|
idpId: number;
|
||||||
};
|
};
|
||||||
const UpdateIdpResponseDataSchema = z.object({idpId: z.number()});
|
const UpdateIdpResponseDataSchema = z.object({
|
||||||
|
idpId: z.number()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ const getOrgSchema = z.strictObject({
|
|||||||
export type GetOrgResponse = {
|
export type GetOrgResponse = {
|
||||||
org: Org;
|
org: Org;
|
||||||
};
|
};
|
||||||
const GetOrgResponseDataSchema = z.object({org: z.object({}).passthrough()});
|
const GetOrgResponseDataSchema = z.object({
|
||||||
|
org: z.object({}).passthrough()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -30,7 +30,18 @@ export type PickSiteDefaultsResponse = {
|
|||||||
newtSecret: string;
|
newtSecret: string;
|
||||||
clientAddress?: string;
|
clientAddress?: string;
|
||||||
};
|
};
|
||||||
const PickSiteDefaultsResponseDataSchema = z.object({exitNodeId: z.number(), address: z.string(), publicKey: z.string(), name: z.string(), listenPort: z.number(), endpoint: z.string(), subnet: z.string(), newtId: z.string(), newtSecret: z.string(), clientAddress: z.string().optional()});
|
const PickSiteDefaultsResponseDataSchema = z.object({
|
||||||
|
exitNodeId: z.number(),
|
||||||
|
address: z.string(),
|
||||||
|
publicKey: z.string(),
|
||||||
|
name: z.string(),
|
||||||
|
listenPort: z.number(),
|
||||||
|
endpoint: z.string(),
|
||||||
|
subnet: z.string(),
|
||||||
|
newtId: z.string(),
|
||||||
|
newtSecret: z.string(),
|
||||||
|
clientAddress: z.string().optional()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -23,7 +23,10 @@ export type UpdateUser2FAResponse = {
|
|||||||
userId: string;
|
userId: string;
|
||||||
twoFactorRequested: boolean;
|
twoFactorRequested: boolean;
|
||||||
};
|
};
|
||||||
const UpdateUser2FAResponseDataSchema = z.object({userId: z.string(), twoFactorRequested: z.boolean()});
|
const UpdateUser2FAResponseDataSchema = z.object({
|
||||||
|
userId: z.string(),
|
||||||
|
twoFactorRequested: z.boolean()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
@@ -68,7 +68,10 @@ export type InviteUserResponse = {
|
|||||||
inviteLink: string;
|
inviteLink: string;
|
||||||
expiresAt: number;
|
expiresAt: number;
|
||||||
};
|
};
|
||||||
const InviteUserResponseDataSchema = z.object({inviteLink: z.string(), expiresAt: z.number()});
|
const InviteUserResponseDataSchema = z.object({
|
||||||
|
inviteLink: z.string(),
|
||||||
|
expiresAt: z.number()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
registry.registerPath({
|
registry.registerPath({
|
||||||
|
|||||||
Reference in New Issue
Block a user