types.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /* eslint-disable */
  2. // @ts-ignore
  3. export type ApiResponse = {
  4. code?: number;
  5. type?: string;
  6. message?: string;
  7. };
  8. export type Category = {
  9. id?: number;
  10. name?: string;
  11. };
  12. export type deleteOrderParams = {
  13. /** ID of the order that needs to be deleted */
  14. orderId: number;
  15. };
  16. export type deletePetParams = {
  17. /** Pet id to delete */
  18. petId: number;
  19. };
  20. export type deleteUserParams = {
  21. /** The name that needs to be deleted */
  22. username: string;
  23. };
  24. export type findPetsByStatusParams = {
  25. /** Status values that need to be considered for filter */
  26. status: ('available' | 'pending' | 'sold')[];
  27. };
  28. export type findPetsByTagsParams = {
  29. /** Tags to filter by */
  30. tags: string[];
  31. };
  32. export type getOrderByIdParams = {
  33. /** ID of pet that needs to be fetched */
  34. orderId: number;
  35. };
  36. export type getPetByIdParams = {
  37. /** ID of pet to return */
  38. petId: number;
  39. };
  40. export type getUserByNameParams = {
  41. /** The name that needs to be fetched. Use user1 for testing. */
  42. username: string;
  43. };
  44. export type loginUserParams = {
  45. /** The user name for login */
  46. username: string;
  47. /** The password for login in clear text */
  48. password: string;
  49. };
  50. export type Order = {
  51. id?: number;
  52. petId?: number;
  53. quantity?: number;
  54. shipDate?: string;
  55. /** Order Status */
  56. status?: 'placed' | 'approved' | 'delivered';
  57. complete?: boolean;
  58. };
  59. export type Pet = {
  60. id?: number;
  61. category?: Category;
  62. name: string;
  63. photoUrls: string[];
  64. tags?: Tag[];
  65. /** pet status in the store */
  66. status?: 'available' | 'pending' | 'sold';
  67. };
  68. export enum StatusEnum {
  69. available = 'available',
  70. pending = 'pending',
  71. sold = 'sold',
  72. }
  73. export type IStatusEnum = keyof typeof StatusEnum;
  74. export enum StatusEnum2 {
  75. placed = 'placed',
  76. approved = 'approved',
  77. delivered = 'delivered',
  78. }
  79. export type IStatusEnum2 = keyof typeof StatusEnum2;
  80. export type Tag = {
  81. id?: number;
  82. name?: string;
  83. };
  84. export type updatePetWithFormParams = {
  85. /** ID of pet that needs to be updated */
  86. petId: number;
  87. };
  88. export type updateUserParams = {
  89. /** name that need to be updated */
  90. username: string;
  91. };
  92. export type uploadFileParams = {
  93. /** ID of pet to update */
  94. petId: number;
  95. };
  96. export type User = {
  97. id?: number;
  98. username?: string;
  99. firstName?: string;
  100. lastName?: string;
  101. email?: string;
  102. password?: string;
  103. phone?: string;
  104. /** User Status */
  105. userStatus?: number;
  106. };