{"version":3,"sources":["../../../src/utilities/parseParams/index.spec.ts"],"sourcesContent":["import * as qs from 'qs-esm'\nimport { describe, it, expect } from 'vitest'\nimport { parseParams, booleanParams, numberParams } from './index.js'\n\ndescribe('parseParams', () => {\n  describe('boolean parameters', () => {\n    booleanParams.forEach((param) => {\n      describe(param, () => {\n        it('should parse string \"true\" to boolean true', () => {\n          const result = parseParams({ [param]: 'true' })\n          expect(result[param]).toBe(true)\n        })\n\n        it('should parse string \"false\" to boolean false', () => {\n          const result = parseParams({ [param]: 'false' })\n          expect(result[param]).toBe(false)\n        })\n\n        it('should parse boolean true to boolean true', () => {\n          const result = parseParams({ [param]: true })\n          expect(result[param]).toBe(true)\n        })\n\n        it('should parse boolean false to boolean false', () => {\n          const result = parseParams({ [param]: false })\n          expect(result[param]).toBe(false)\n        })\n\n        it('should return undefined for truthy strings (not exact \"true\")', () => {\n          const result = parseParams({ [param]: '1' })\n          expect(result[param]).toBeUndefined()\n        })\n\n        it('should return undefined for falsy strings (not exact \"false\")', () => {\n          const result = parseParams({ [param]: '0' })\n          expect(result[param]).toBeUndefined()\n        })\n\n        it('should return undefined for empty string', () => {\n          const result = parseParams({ [param]: '' })\n          expect(result[param]).toBeUndefined()\n        })\n      })\n    })\n  })\n\n  describe('number parameters', () => {\n    numberParams.forEach((param) => {\n      describe(param, () => {\n        it('should parse valid number string to number', () => {\n          const result = parseParams({ [param]: '42' })\n          expect(result[param]).toBe(42)\n        })\n\n        it('should parse zero string to zero', () => {\n          const result = parseParams({ [param]: '0' })\n          expect(result[param]).toBe(0)\n        })\n\n        it('should parse negative number string to negative number', () => {\n          const result = parseParams({ [param]: '-5' })\n          expect(result[param]).toBe(-5)\n        })\n\n        it('should parse decimal number string to decimal number', () => {\n          const result = parseParams({ [param]: '3.14' })\n          expect(result[param]).toBe(3.14)\n        })\n\n        it('should not parse invalid number strings', () => {\n          const result = parseParams({ [param]: 'not-a-number' })\n          expect(result[param]).toBe('not-a-number') // remains as string\n        })\n\n        it('should not parse empty string', () => {\n          const result = parseParams({ [param]: '' })\n          expect(result[param]).toBe('') // remains as string\n        })\n\n        it('should handle already numeric values', () => {\n          const result = parseParams({ [param]: 123 })\n          expect(result[param]).toBe(123)\n        })\n      })\n    })\n  })\n\n  describe('sort parameter', () => {\n    it('should parse comma-separated string to array', () => {\n      const result = parseParams({ sort: 'name,createdAt,-updatedAt' })\n      expect(result.sort).toEqual(['name', 'createdAt', '-updatedAt'])\n    })\n\n    it('should parse single value string to array with one element', () => {\n      const result = parseParams({ sort: 'name' })\n      expect(result.sort).toEqual(['name'])\n    })\n\n    it('should handle empty string', () => {\n      const result = parseParams({ sort: '' })\n      expect(result.sort).toEqual([''])\n    })\n\n    it('should handle comma-separated string with spaces', () => {\n      const result = parseParams({ sort: 'name, createdAt , -updatedAt' })\n      expect(result.sort).toEqual(['name', ' createdAt ', ' -updatedAt'])\n    })\n\n    it('should parse array of strings', () => {\n      const result = parseParams({ sort: ['name', '-createdAt'] })\n      expect(result.sort).toEqual(['name', '-createdAt'])\n    })\n\n    it('should return undefined for non-string sort values', () => {\n      const result = parseParams({ sort: 123 as any })\n      expect(result.sort).toBeUndefined()\n    })\n\n    it('should return undefined for array with non-string sort values', () => {\n      const result = parseParams({ sort: ['name', 123] as any })\n      expect(result.sort).toBeUndefined()\n    })\n\n    it('should handle qs-esm array sort parsing', () => {\n      const query = qs.stringify({ sort: ['title', '-createdAt'] })\n      const parsed = qs.parse(query)\n      const result = parseParams(parsed)\n      expect(result.sort).toEqual(['title', '-createdAt'])\n    })\n\n    it('should return undefined for null sort values', () => {\n      const result = parseParams({ sort: null as any })\n      expect(result.sort).toBeUndefined()\n    })\n  })\n\n  describe('data parameter', () => {\n    it('should parse valid JSON string', () => {\n      const data = { name: 'test', value: 42 }\n      const result = parseParams({ data: JSON.stringify(data) })\n      expect(result.data).toEqual(data)\n    })\n\n    it('should parse empty object JSON string', () => {\n      const result = parseParams({ data: '{}' })\n      expect(result.data).toEqual({})\n    })\n\n    it('should parse array JSON string', () => {\n      const data = [1, 2, 3]\n      const result = parseParams({ data: JSON.stringify(data) })\n      expect(result.data).toEqual(data)\n    })\n\n    it('should not process empty string', () => {\n      const result = parseParams({ data: '' })\n      expect(result.data).toBe('') // empty string is not processed, remains as string\n    })\n\n    it('should throw error for invalid JSON', () => {\n      expect(() => {\n        parseParams({ data: 'invalid-json' })\n      }).toThrow()\n    })\n\n    it('should not process non-string data values', () => {\n      const result = parseParams({ data: { already: 'parsed' } as any })\n      expect(result.data).toEqual({ already: 'parsed' })\n    })\n  })\n\n  describe('special parameters', () => {\n    it('should handle populate parameter', () => {\n      const result = parseParams({ populate: 'field1,field2' })\n      expect(result).toHaveProperty('populate')\n      // Note: actual sanitization logic is tested in sanitizePopulateParam tests\n    })\n\n    it('should handle select parameter', () => {\n      const result = parseParams({ select: 'field1,field2' })\n      expect(result).toHaveProperty('select')\n      // Note: actual sanitization logic is tested in sanitizeSelectParam tests\n    })\n\n    it('should handle joins parameter', () => {\n      const joins = { collection: 'posts' }\n      const result = parseParams({ joins })\n      expect(result).toHaveProperty('joins')\n      // Note: actual sanitization logic is tested in sanitizeJoinParams tests\n    })\n  })\n\n  describe('selectedLocales parameter', () => {\n    it('should pass through selectedLocales as-is', () => {\n      const selectedLocales = 'en,es,fr'\n      const result = parseParams({ selectedLocales })\n      expect(result.selectedLocales).toBe(selectedLocales)\n    })\n  })\n\n  describe('publishSpecificLocale parameter', () => {\n    it('should pass through publishSpecificLocale as-is', () => {\n      const publishSpecificLocale = 'en'\n      const result = parseParams({ publishSpecificLocale })\n      expect(result.publishSpecificLocale).toBe(publishSpecificLocale)\n    })\n  })\n\n  describe('field parameter', () => {\n    it('should pass through field as-is', () => {\n      const field = 'myField'\n      const result = parseParams({ field })\n      expect(result.field).toBe(field)\n    })\n  })\n\n  describe('where parameter', () => {\n    it('should pass through where as-is', () => {\n      const where = { name: { equals: 'test' } }\n      const result = parseParams({ where })\n      expect(result.where).toBe(where)\n    })\n\n    it('should parse where when it is a JSON string', () => {\n      const where = { read: { equals: false } }\n      const result = parseParams({ where: JSON.stringify(where) })\n      expect(result.where).toEqual(where)\n    })\n\n    it('should not process empty string where', () => {\n      const result = parseParams({ where: '' })\n      expect(result.where).toBe('')\n    })\n\n    it('should throw error for invalid JSON where', () => {\n      expect(() => {\n        parseParams({ where: 'invalid-json' })\n      }).toThrow()\n    })\n  })\n\n  describe('edge cases', () => {\n    it('should handle empty params object', () => {\n      const result = parseParams({})\n      expect(result).toEqual({})\n    })\n\n    it('should throw error for null params (current implementation bug)', () => {\n      expect(() => {\n        parseParams(null as any)\n      }).toThrow(TypeError)\n    })\n\n    it('should throw error for undefined params (current implementation bug)', () => {\n      expect(() => {\n        parseParams(undefined as any)\n      }).toThrow(TypeError)\n    })\n\n    it('should preserve unknown parameters', () => {\n      const result = parseParams({ customParam: 'customValue' })\n      expect(result.customParam).toBe('customValue')\n    })\n\n    it('should handle mixed parameter types', () => {\n      const result = parseParams({\n        draft: 'true',\n        depth: '5',\n        sort: 'name,createdAt',\n        data: '{\"test\": true}',\n        customParam: 'custom',\n      })\n\n      expect(result.draft).toBe(true)\n      expect(result.depth).toBe(5)\n      expect(result.sort).toEqual(['name', 'createdAt'])\n      expect(result.data).toEqual({ test: true })\n      expect(result.customParam).toBe('custom')\n    })\n  })\n\n  describe('parameter preservation', () => {\n    it('should not modify parameters that are not in known lists', () => {\n      const params = {\n        unknownBoolean: 'true',\n        unknownNumber: '42',\n        unknownString: 'test',\n      }\n      const result = parseParams(params)\n\n      expect(result.unknownBoolean).toBe('true') // should remain string\n      expect(result.unknownNumber).toBe('42') // should remain string\n      expect(result.unknownString).toBe('test')\n    })\n\n    it('should only process parameters that exist in the input', () => {\n      const result = parseParams({ draft: 'true' })\n\n      expect(result.draft).toBe(true)\n      expect(result).not.toHaveProperty('autosave')\n      expect(result).not.toHaveProperty('depth')\n      expect(result).not.toHaveProperty('sort')\n    })\n  })\n})\n"],"names":["qs","describe","it","expect","parseParams","booleanParams","numberParams","forEach","param","result","toBe","toBeUndefined","sort","toEqual","query","stringify","parsed","parse","data","name","value","JSON","toThrow","already","populate","toHaveProperty","select","joins","collection","selectedLocales","publishSpecificLocale","field","where","equals","read","TypeError","undefined","customParam","draft","depth","test","params","unknownBoolean","unknownNumber","unknownString","not"],"mappings":"AAAA,YAAYA,QAAQ,SAAQ;AAC5B,SAASC,QAAQ,EAAEC,EAAE,EAAEC,MAAM,QAAQ,SAAQ;AAC7C,SAASC,WAAW,EAAEC,aAAa,EAAEC,YAAY,QAAQ,aAAY;AAErEL,SAAS,eAAe;IACtBA,SAAS,sBAAsB;QAC7BI,cAAcE,OAAO,CAAC,CAACC;YACrBP,SAASO,OAAO;gBACdN,GAAG,8CAA8C;oBAC/C,MAAMO,SAASL,YAAY;wBAAE,CAACI,MAAM,EAAE;oBAAO;oBAC7CL,OAAOM,MAAM,CAACD,MAAM,EAAEE,IAAI,CAAC;gBAC7B;gBAEAR,GAAG,gDAAgD;oBACjD,MAAMO,SAASL,YAAY;wBAAE,CAACI,MAAM,EAAE;oBAAQ;oBAC9CL,OAAOM,MAAM,CAACD,MAAM,EAAEE,IAAI,CAAC;gBAC7B;gBAEAR,GAAG,6CAA6C;oBAC9C,MAAMO,SAASL,YAAY;wBAAE,CAACI,MAAM,EAAE;oBAAK;oBAC3CL,OAAOM,MAAM,CAACD,MAAM,EAAEE,IAAI,CAAC;gBAC7B;gBAEAR,GAAG,+CAA+C;oBAChD,MAAMO,SAASL,YAAY;wBAAE,CAACI,MAAM,EAAE;oBAAM;oBAC5CL,OAAOM,MAAM,CAACD,MAAM,EAAEE,IAAI,CAAC;gBAC7B;gBAEAR,GAAG,iEAAiE;oBAClE,MAAMO,SAASL,YAAY;wBAAE,CAACI,MAAM,EAAE;oBAAI;oBAC1CL,OAAOM,MAAM,CAACD,MAAM,EAAEG,aAAa;gBACrC;gBAEAT,GAAG,iEAAiE;oBAClE,MAAMO,SAASL,YAAY;wBAAE,CAACI,MAAM,EAAE;oBAAI;oBAC1CL,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