🚀CRUDIFY


JSON Schema

{
  "username": {
    "type": "string"
  },
  "userID": {
    "type": "string"
  },
  "dateJoined": {
    "type": "string"
  },
  "acceptedCookieAgreement": {
    "type": "boolean"
  },
  "preferences": {
    "type": "object",
    "properties": {
      "theme": {
        "type": "string"
      },
      "locale": {
        "type": "string"
      }
    }
  }
}

Zod Validator

⚠️ zod validator is a work in progress

const validator = z.object({
  "username": z.string(),
  "userID": z.string(),
  "dateJoined": z.string(),
  "acceptedCookieAgreement": z.boolean(),
  "preferences": z.object({
	  "theme": z.string(),
	  "locale": z.string()
	})
})

API Documentation

GET https://crudify.app/api/user/iTduz8WS9Cug4-cH/exampleUsers

- Gets all data for entity

Request Body

null

Response Body

type Response = (typeof validator._input & { id: string })[]

POST https://crudify.app/api/user/iTduz8WS9Cug4-cH/exampleUsers

- Creates a data entry for entity

Request Body

type Request = typeof validator._input

Response Body

type Response = (typeof validator._input & { id: string })

GET https://crudify.app/api/user/iTduz8WS9Cug4-cH/exampleUsers/:entityID

- Gets a data entry for entity by id

Request Body

null

Response Body

type Response = (typeof validator._input & { id: string })

POST https://crudify.app/api/user/iTduz8WS9Cug4-cH/exampleUsers/where

- Finds one entity matching the query

Request Body

type Request = { [dotpath: string]: any }

Response Body

type Response = (typeof validator._input & { id: string })

PUT https://crudify.app/api/user/iTduz8WS9Cug4-cH/exampleUsers/:entityID

- Updates a data entry for entity by id

Request Body

type Request = typeof validator._input

Response Body

type Response = (typeof validator._input & { id: string })

DELETE https://crudify.app/api/user/iTduz8WS9Cug4-cH/exampleUsers/:entityID

- Deletes a data entry for entity by id

Request Body

null

Response Body

type Response = (typeof validator._input & { id: string })