time-free.openapps.xyz

Source

This app’s code and revision history are public. Download a copy or explore the files below.

Public
The app’s code and revision history are public.
Owned app · rev 4857f8a940b5
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 703ed60f2cc5ad3d98a5bf4a
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
← All files
policy-tests/api.json
{
 "version": "1",
 "name": "the API joins a workspace only with a key its owner made, and only as role api",
 "actors": {
  "Ann": "ann_id",
  "Bob": "bob_id",
  "Api": "api_principal"
 },
 "constants": {
  "BOUNDED_PUBLIC_PRINCIPAL_API": "api_principal"
 },
 "steps": [
  {
   "op": "setTime",
   "epoch": 1800000000
  },
  {
   "op": "as",
   "who": "Ann"
  },
  {
   "op": "setMany",
   "writes": [
    {
     "path": "ws/wsApiAnnAAAAAAAAAAAA",
     "data": {
      "name": "Ann",
      "currency": "USD",
      "rate": 0,
      "weekStart": 1,
      "tz": "UTC",
      "createdBy": "$Ann",
      "createdAt": 1800000000
     }
    },
    {
     "path": "ws/wsApiAnnAAAAAAAAAAAA/members/ann_id",
     "data": {
      "role": "owner",
      "invite": "created",
      "at": 1800000000
     }
    },
    {
     "path": "users/ann_id",
     "data": {
      "ws": "wsApiAnnAAAAAAAAAAAA",
      "at": 1800000000
     }
    }
   ]
  },
  {
   "op": "as",
   "who": "Api"
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/members/api_principal",
   "data": {
    "role": "api",
    "invite": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "as",
   "who": "Ann"
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/apikeys/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
   "data": {
    "label": "Assistant",
    "hint": "abcd",
    "by": "$Ann",
    "createdAt": 1800000000
   }
  },
  {
   "op": "as",
   "who": "Bob"
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/members/bob_id",
   "data": {
    "role": "api",
    "invite": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "as",
   "who": "Api"
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/members/api_principal",
   "data": {
    "role": "owner",
    "invite": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/members/api_principal",
   "data": {
    "role": "api",
    "invite": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/members/api_principal",
   "data": {
    "role": "api",
    "invite": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "at": 1800000000
   }
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/entries/e1",
   "data": {
    "description": "Work",
    "project": "",
    "tags": "[]",
    "billable": true,
    "start": 1799996400,
    "end": 1800000000,
    "at": 1800000000
   }
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/timer/now",
   "data": {
    "description": "From the assistant",
    "project": "",
    "tags": "[]",
    "billable": false,
    "start": 1800000000,
    "entry": "e2",
    "at": 1800000000
   }
  },
  {
   "op": "set",
   "path": "users/api_principal",
   "data": {
    "ws": "wsApiAnnAAAAAAAAAAAA",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA",
   "data": {
    "name": "Changed by API",
    "currency": "USD",
    "rate": 0,
    "weekStart": 1,
    "tz": "UTC"
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/apikeys/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
   "data": {
    "label": "Another",
    "hint": "eeee",
    "by": "api_principal",
    "createdAt": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "setMany",
   "writes": [
    {
     "path": "shared/sharedProjectAAAAAA2",
     "data": {
      "name": "Acme website",
      "color": "#2e5ec4",
      "client": "Acme Inc.",
      "owner": "Olive",
      "ws": "wsApiAnnAAAAAAAAAAAA",
      "closed": false,
      "createdBy": "$Api",
      "createdAt": 1800000000,
      "billable": true
     }
    },
    {
     "path": "shared/sharedProjectAAAAAA2/owners/api_principal",
     "data": {
      "ws": "wsApiAnnAAAAAAAAAAAA",
      "at": 1800000000
     }
    }
   ],
   "shouldFail": true
  },
  {
   "op": "as",
   "who": "Ann"
  },
  {
   "op": "setMany",
   "writes": [
    {
     "path": "shared/sharedProjectAAAAAA2",
     "data": {
      "name": "Acme website",
      "color": "#2e5ec4",
      "client": "Acme Inc.",
      "owner": "Olive",
      "ws": "wsApiAnnAAAAAAAAAAAA",
      "closed": false,
      "createdBy": "$Ann",
      "createdAt": 1800000000,
      "billable": true
     }
    },
    {
     "path": "shared/sharedProjectAAAAAA2/owners/ann_id",
     "data": {
      "ws": "wsApiAnnAAAAAAAAAAAA",
      "at": 1800000000
     }
    }
   ]
  },
  {
   "op": "as",
   "who": "Api"
  },
  {
   "op": "set",
   "path": "shared/sharedProjectAAAAAA2/owners/api_principal",
   "data": {
    "ws": "wsApiAnnAAAAAAAAAAAA",
    "at": 1800000000
   }
  },
  {
   "op": "as",
   "who": "Bob"
  },
  {
   "op": "delete",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/apikeys/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
   "shouldFail": true
  },
  {
   "op": "as",
   "who": "Ann"
  },
  {
   "op": "delete",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/apikeys/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  },
  {
   "op": "delete",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/members/api_principal"
  },
  {
   "op": "as",
   "who": "Api"
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/members/api_principal",
   "data": {
    "role": "api",
    "invite": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsApiAnnAAAAAAAAAAAA/entries/e3",
   "data": {
    "description": "Work",
    "project": "",
    "tags": "[]",
    "billable": true,
    "start": 1799996400,
    "end": 1800000000,
    "at": 1800000000
   },
   "shouldFail": true
  }
 ]
}

Change history

Point OpenApps links to openapps.free
4857f8a940 · 1 day ago
Bind agent address constants in policy
62b1e6acb2 · 1 day ago
Use functions.openapps.xyz alias and add OpenApp contribution strip
61d972193a · 1 day ago
Bounded source sync
fc644b4327 · 2 days ago
Bounded source sync
22f511f3db · 2 days ago
Bounded source sync
351a8d754c · 2 days ago
Bounded source sync
0da238a77e · 2 days ago