0.19.0 • Published 11 days ago

@collect.so/javascript-sdk v0.19.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 days ago

Collect SDK

// lib/db.js
import Collect, { CollectModel } from '@collect.so/sdk'

const collect = new Collect(YOUR_API_TOKEN)

// Define your model schema
const TaskModel = new CollectModel({
    title: { type: 'string' },
    completed: { type: 'boolean', default: false }
})

// Register the model with the SDK
const TaskRepo = collect.registerModel('Task', TaskSchema)

// Create a new task
const newTask = await Task.create({title: 'Finish the report'})

// Find all completed tasks
const completedTasks = await Task.find({where: {completed: true}})
0.19.0

11 days ago

0.18.0

13 days ago

0.16.0

20 days ago

0.17.0

20 days ago

0.13.0

24 days ago

0.14.0

24 days ago

0.15.0

24 days ago

0.12.0

27 days ago

0.11.0

1 month ago

0.10.0

1 month ago

0.9.0

1 month ago

0.8.0

2 months ago

0.7.0

2 months ago

0.6.0

2 months ago

0.5.0

2 months ago

0.4.0

2 months ago

0.3.0

2 months ago

0.2.0

3 months ago

0.1.0

3 months ago

0.0.2

10 months ago

0.0.1

10 months ago

0.0.0

10 months ago