diff --git a/packages/schema/src/secret/index.ts b/packages/schema/src/secret/index.ts index 845f5fff..ff5b499e 100644 --- a/packages/schema/src/secret/index.ts +++ b/packages/schema/src/secret/index.ts @@ -84,7 +84,7 @@ export const RollBackSecretRequestSchema = z.object({ }) export const RollBackSecretResponseSchema = z.object({ - count: z.string() + count: z.number() }) export const GetAllSecretsOfProjectRequestSchema = PageRequestSchema.extend({ diff --git a/packages/schema/src/variable/index.ts b/packages/schema/src/variable/index.ts index 259b6ce9..ee2a2ee5 100644 --- a/packages/schema/src/variable/index.ts +++ b/packages/schema/src/variable/index.ts @@ -84,7 +84,7 @@ export const RollBackVariableRequestSchema = z.object({ }) export const RollBackVariableResponseSchema = z.object({ - count: z.string() + count: z.number() }) export const DeleteVariableRequestSchema = z.object({ diff --git a/packages/schema/tests/secret.spec.ts b/packages/schema/tests/secret.spec.ts index e3b8caee..0a3dc096 100644 --- a/packages/schema/tests/secret.spec.ts +++ b/packages/schema/tests/secret.spec.ts @@ -292,14 +292,14 @@ describe('Secret Schema Tests', () => { describe('RollBackSecretResponseSchema Tests', () => { it('should validate a valid RollBackSecretResponseSchema', () => { const result = RollBackSecretResponseSchema.safeParse({ - count: '1' + count: 1 }) expect(result.success).toBe(true) }) it('should not validate an invalid RollBackSecretResponseSchema', () => { const result = RollBackSecretResponseSchema.safeParse({ - count: 1 // Should be a string + count: '1' // Should be a number }) expect(result.success).toBe(false) expect(result.error?.issues).toHaveLength(1) diff --git a/packages/schema/tests/variable.spec.ts b/packages/schema/tests/variable.spec.ts index ade2a89e..43d6e5f6 100644 --- a/packages/schema/tests/variable.spec.ts +++ b/packages/schema/tests/variable.spec.ts @@ -318,14 +318,14 @@ describe('Variable Schema Tests', () => { describe('RollBackVariableResponseSchema Tests', () => { it('should validate a valid RollBackVariableResponseSchema', () => { const result = RollBackVariableResponseSchema.safeParse({ - count: '1' + count: 1 }) expect(result.success).toBe(true) }) it('should not validate an invalid RollBackVariableResponseSchema', () => { const result = RollBackVariableResponseSchema.safeParse({ - count: 1 // Should be a string + count: '1' // Should be a number }) expect(result.success).toBe(false) expect(result.error?.issues).toHaveLength(1)