TodayReminderRequest today.reminder-request@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- today
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/today/reminder-request.v1.json
today.reminder-request@1: the body of POST /api/v1/reminders and POST /api/v1/reminders/parse on OpenVibe.Today (today.reminder.write; the acting person). The reminder is plain words, parsed by Today into a rule in the person's time zone ("stretch every 2 hours from 9 to 5", "take my meds every day at 9 am and 9 pm", "pay rent on the 1st of every month"). POST /api/v1/reminders/:id/snooze takes { minutes } alone.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
text | string | What to remind the person of, and when, in their own words. |
| |
tz | string | The person's IANA time zone (America/Chicago); an unknown zone is read as UTC. |
| |
url | string | null | Where the reminder came from: an https link kept on it and opened from the notification. Anything else is dropped. |
| |
source | string | The site that set it (vibe, live, work…), shown to the person. |
| |
minutes | integer | Snooze only: how long, from now. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: from-vibe
{
"text": "remind me to call mom on Sunday at 6pm",
"tz": "Europe/Berlin",
"url": "https://openvibe.chat/vibe",
"source": "vibe"
}Valid: plain-words
{
"text": "stretch every 2 hours from 9 to 5",
"tz": "America/Chicago"
}Valid: snooze
{
"minutes": 60
}Rejected: snooze-too-short
{
"minutes": 1
}Rejected: unknown-field
{
"text": "water the plants every evening",
"subject": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2N1"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('today.reminder-request@1', value); // { valid, errors: [{ path, message }] }