@zeyos/client 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +31 -1
  3. package/agents/README.md +2 -0
  4. package/agents/shared/zeyos-entity-map.md +5 -1
  5. package/agents/shared/zeyos-entity-reference.md +89 -33
  6. package/docs/03-cli/02-commands.md +28 -0
  7. package/docs/06-okf/01-overview.md +70 -0
  8. package/docs/06-okf/02-producing-and-consuming.md +46 -0
  9. package/docs/06-okf/03-keeping-fresh.md +53 -0
  10. package/docs/06-okf/04-loops.md +58 -0
  11. package/docs/06-okf/_category_.json +9 -0
  12. package/okf/concepts/counting-and-sums.md +10 -0
  13. package/okf/concepts/dates-unix-seconds.md +12 -0
  14. package/okf/concepts/enums.md +14 -0
  15. package/okf/concepts/filters-vs-filter.md +14 -0
  16. package/okf/concepts/index.md +8 -0
  17. package/okf/concepts/operationid-vocabulary.md +17 -0
  18. package/okf/concepts/visibility-column.md +13 -0
  19. package/okf/entities/accounts.md +82 -0
  20. package/okf/entities/actionsteps.md +84 -0
  21. package/okf/entities/addresses.md +50 -0
  22. package/okf/entities/applicationassets.md +43 -0
  23. package/okf/entities/applications.md +62 -0
  24. package/okf/entities/appointments.md +79 -0
  25. package/okf/entities/associations.md +41 -0
  26. package/okf/entities/binfiles.md +32 -0
  27. package/okf/entities/campaigns.md +66 -0
  28. package/okf/entities/categories.md +55 -0
  29. package/okf/entities/channels.md +54 -0
  30. package/okf/entities/comments.md +44 -0
  31. package/okf/entities/components.md +46 -0
  32. package/okf/entities/contacts.md +96 -0
  33. package/okf/entities/contacts2contacts.md +42 -0
  34. package/okf/entities/contracts.md +83 -0
  35. package/okf/entities/couponcodes.md +58 -0
  36. package/okf/entities/coupons.md +69 -0
  37. package/okf/entities/customfields.md +59 -0
  38. package/okf/entities/davservers.md +74 -0
  39. package/okf/entities/devices.md +65 -0
  40. package/okf/entities/documents.md +76 -0
  41. package/okf/entities/dunning.md +82 -0
  42. package/okf/entities/dunning2transactions.md +46 -0
  43. package/okf/entities/entities2channels.md +42 -0
  44. package/okf/entities/events.md +57 -0
  45. package/okf/entities/feedservers.md +67 -0
  46. package/okf/entities/files.md +50 -0
  47. package/okf/entities/follows.md +40 -0
  48. package/okf/entities/forks.md +54 -0
  49. package/okf/entities/groups.md +48 -0
  50. package/okf/entities/groups2users.md +44 -0
  51. package/okf/entities/index.md +93 -0
  52. package/okf/entities/invitations.md +53 -0
  53. package/okf/entities/items.md +95 -0
  54. package/okf/entities/ledgers.md +56 -0
  55. package/okf/entities/likes.md +40 -0
  56. package/okf/entities/links.md +70 -0
  57. package/okf/entities/mailinglists.md +67 -0
  58. package/okf/entities/mailingrecipients.md +45 -0
  59. package/okf/entities/mailservers.md +77 -0
  60. package/okf/entities/messagereads.md +40 -0
  61. package/okf/entities/messages.md +104 -0
  62. package/okf/entities/notes.md +73 -0
  63. package/okf/entities/objects.md +70 -0
  64. package/okf/entities/opportunities.md +87 -0
  65. package/okf/entities/participants.md +52 -0
  66. package/okf/entities/payments.md +76 -0
  67. package/okf/entities/permissions.md +46 -0
  68. package/okf/entities/pricelists.md +70 -0
  69. package/okf/entities/pricelists2accounts.md +46 -0
  70. package/okf/entities/prices.md +49 -0
  71. package/okf/entities/projects.md +72 -0
  72. package/okf/entities/records.md +75 -0
  73. package/okf/entities/relateditems.md +43 -0
  74. package/okf/entities/resources.md +55 -0
  75. package/okf/entities/services.md +64 -0
  76. package/okf/entities/stocktransactions.md +72 -0
  77. package/okf/entities/storages.md +56 -0
  78. package/okf/entities/suppliers.md +51 -0
  79. package/okf/entities/tasks.md +86 -0
  80. package/okf/entities/tickets.md +86 -0
  81. package/okf/entities/transactions.md +118 -0
  82. package/okf/entities/users.md +66 -0
  83. package/okf/entities/weblets.md +66 -0
  84. package/okf/index.md +11 -0
  85. package/okf/log.md +4 -0
  86. package/okf/metrics/cash-received.md +10 -0
  87. package/okf/metrics/index.md +6 -0
  88. package/okf/metrics/invoiced-net-revenue.md +16 -0
  89. package/okf/metrics/open-customers.md +14 -0
  90. package/okf/metrics/overdue-receivables.md +12 -0
  91. package/okf/playbooks/customer-360.md +12 -0
  92. package/okf/playbooks/index.md +5 -0
  93. package/okf/playbooks/revenue-this-year.md +19 -0
  94. package/okf/playbooks/ticket-work-packet.md +11 -0
  95. package/package.json +9 -2
  96. package/scripts/data/okf-curation.mjs +258 -0
  97. package/scripts/generate-client.mjs +4 -275
  98. package/scripts/generate-okf.mjs +241 -0
  99. package/scripts/lib/okf.mjs +272 -0
  100. package/scripts/lib/spec-model.mjs +325 -0
  101. package/src/index.js +4 -0
  102. package/src/runtime/okf.js +237 -0
@@ -0,0 +1,65 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Devices
4
+ description: Inventory device records.
5
+ resource: zeyos://api/devices
6
+ tags: [platform, generated]
7
+ api_backed: true
8
+ list_operation: listDevices
9
+ visibility_column: true
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | integer | no | — | yes | — |
18
+ | `fork` | integer | yes | — | yes | [forks](/entities/forks.md) |
19
+ | `ownergroup` | integer | yes | — | yes | [groups](/entities/groups.md) |
20
+ | `creator` | integer | yes | — | — | — |
21
+ | `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
22
+ | `lastmodified` | bigint | no | `date_part('epoch', now())` | — | — |
23
+ | `item` | integer | no | — | yes | [items](/entities/items.md) |
24
+ | `contract` | integer | yes | — | yes | [contracts](/entities/contracts.md) |
25
+ | `visibility` | smallint | no | `0` | — | — |
26
+ | `serialnum` | text | no | `''` | yes | — |
27
+ | `chargenum` | text | no | `''` | yes | — |
28
+ | `expdate` | bigint | yes | — | — | — |
29
+ | `description` | text | no | `''` | — | — |
30
+
31
+ # Foreign Keys
32
+
33
+ - `fork` → [forks](/entities/forks.md) (`forks.ID`)
34
+ - `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
35
+ - `item` → [items](/entities/items.md) (`items.ID`)
36
+ - `contract` → [contracts](/entities/contracts.md) (`contracts.ID`)
37
+
38
+ # Enums
39
+
40
+ ### `visibility`
41
+
42
+ `0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
43
+
44
+ # Indexes
45
+
46
+ - `fk_devices_contract` — btree, partial on `contract`
47
+ - `fk_devices_fork` — gin, partial on `fork`
48
+ - `fk_devices_ownergroup` — gin on `ownergroup`
49
+ - `i_devices_nofork` — gin, partial on `fork`
50
+ - `i_devices_noowner` — gin, partial on `ownergroup`
51
+ - `s_devices_chargenum` — gin, partial on `chargenum`
52
+ - `s_devices_serialnum` — gin, partial on `serialnum`
53
+ - `u_devices_item_serialnum_chargenum` — btree, unique on `item, serialnum, chargenum`
54
+
55
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
56
+
57
+ # Operations
58
+
59
+ - list: `listDevices`
60
+ - get: `getDevice`
61
+ - create: `createDevice`
62
+ - update: `updateDevice`
63
+ - delete: `deleteDevice`
64
+ - exists: `existsDevice`
65
+ <!-- okf:generated:end -->
@@ -0,0 +1,76 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Documents
4
+ description: Formal file-like business documents.
5
+ resource: zeyos://api/documents
6
+ tags: [knowledge, generated]
7
+ api_backed: true
8
+ list_operation: listDocuments
9
+ visibility_column: true
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | integer | no | — | yes | — |
18
+ | `fork` | integer | yes | — | yes | [forks](/entities/forks.md) |
19
+ | `owneruser` | integer | yes | — | yes | [users](/entities/users.md) |
20
+ | `ownergroup` | integer | yes | — | yes | [groups](/entities/groups.md) |
21
+ | `creator` | integer | yes | — | — | — |
22
+ | `assigneduser` | integer | yes | — | yes | [users](/entities/users.md) |
23
+ | `creationdate` | bigint | no | `EXTRACT(epoch FROM now())` | — | — |
24
+ | `lastmodified` | bigint | no | `EXTRACT(epoch FROM now())` | — | — |
25
+ | `binfile` | integer | yes | — | yes | [binfiles](/entities/binfiles.md) |
26
+ | `visibility` | smallint | no | `0` | — | — |
27
+ | `name` | text | no | — | yes | — |
28
+ | `documentnum` | text | no | `''` | yes | — |
29
+ | `status` | smallint | no | `0` | — | — |
30
+ | `filename` | text | no | `''` | yes | — |
31
+ | `mimetype` | text | no | `'application/octet-stream'` | — | — |
32
+ | `public` | smallint | no | `0` | — | — |
33
+ | `description` | text | no | `''` | — | — |
34
+
35
+ # Foreign Keys
36
+
37
+ - `fork` → [forks](/entities/forks.md) (`forks.ID`)
38
+ - `owneruser` → [users](/entities/users.md) (`users.ID`)
39
+ - `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
40
+ - `assigneduser` → [users](/entities/users.md) (`users.ID`)
41
+ - `binfile` → [binfiles](/entities/binfiles.md) (`binfiles.ID`)
42
+
43
+ # Enums
44
+
45
+ ### `visibility`
46
+
47
+ `0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
48
+
49
+ ### `status`
50
+
51
+ `0` = DRAFT · `1` = FEEDBACKREQUIRED · `2` = INREVISION · `3` = AWAITINGAPPROVAL · `4` = FINAL · `5` = OBSOLETE
52
+
53
+ # Indexes
54
+
55
+ - `fk_documents_assigneduser` — gin, partial on `assigneduser`
56
+ - `fk_documents_binfile` — btree, partial on `binfile`
57
+ - `fk_documents_fork` — gin, partial on `fork`
58
+ - `fk_documents_ownergroup` — gin, partial on `ownergroup`
59
+ - `fk_documents_owneruser` — gin, partial on `owneruser`
60
+ - `i_documents_nofork` — gin, partial on `fork`
61
+ - `i_documents_noowner` — gin, partial on `ownergroup`
62
+ - `s_documents_documentnum` — gin, partial on `documentnum`
63
+ - `s_documents_filename` — gin, partial on `filename`
64
+ - `s_documents_name` — gin on `name`
65
+
66
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
67
+
68
+ # Operations
69
+
70
+ - list: `listDocuments`
71
+ - get: `getDocument`
72
+ - create: `createDocument`
73
+ - update: `updateDocument`
74
+ - delete: `deleteDocument`
75
+ - exists: `existsDocument`
76
+ <!-- okf:generated:end -->
@@ -0,0 +1,82 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Dunning Notices
4
+ description: Collection or dunning notices.
5
+ resource: zeyos://api/dunning
6
+ tags: [collections, generated]
7
+ api_backed: true
8
+ list_operation: listDunningNotices
9
+ visibility_column: false
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | integer | no | — | yes | — |
18
+ | `fork` | integer | yes | — | yes | [forks](/entities/forks.md) |
19
+ | `ownergroup` | integer | yes | — | yes | [groups](/entities/groups.md) |
20
+ | `creator` | integer | yes | — | — | — |
21
+ | `assigneduser` | integer | yes | — | yes | [users](/entities/users.md) |
22
+ | `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
23
+ | `lastmodified` | bigint | no | `date_part('epoch', now())` | — | — |
24
+ | `account` | integer | yes | — | yes | [accounts](/entities/accounts.md) |
25
+ | `dunningnum` | text | no | — | yes | — |
26
+ | `type` | smallint | no | `0` | yes | — |
27
+ | `date` | bigint | no | `date_part('epoch', now())` | yes | — |
28
+ | `duedate` | bigint | yes | — | — | — |
29
+ | `status` | smallint | no | `0` | — | — |
30
+ | `fee` | double precision | no | `0` | — | — |
31
+ | `recipient` | text | no | `''` | — | — |
32
+ | `address` | text | no | `''` | — | — |
33
+ | `postalcode` | text | no | `''` | — | — |
34
+ | `city` | text | no | `''` | — | — |
35
+ | `region` | text | no | `''` | — | — |
36
+ | `country` | character varying(2) | no | `''` | — | — |
37
+
38
+ # Foreign Keys
39
+
40
+ - `fork` → [forks](/entities/forks.md) (`forks.ID`)
41
+ - `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
42
+ - `assigneduser` → [users](/entities/users.md) (`users.ID`)
43
+ - `account` → [accounts](/entities/accounts.md) (`accounts.ID`)
44
+
45
+ # Enums
46
+
47
+ ### `type`
48
+
49
+ `0` = LISTING · `1` = REMINDER · `2` = NOTICE
50
+
51
+ ### `status`
52
+
53
+ `0` = DRAFT · `1` = BOOKED · `2` = CANCELLED · `3` = CLOSED
54
+
55
+ # Indexes
56
+
57
+ - `fk_dunning_account` — btree, partial on `account`
58
+ - `fk_dunning_assigneduser` — gin, partial on `assigneduser`
59
+ - `fk_dunning_fork` — gin, partial on `fork`
60
+ - `fk_dunning_ownergroup` — gin on `ownergroup`
61
+ - `i_dunning_date` — btree on `date`
62
+ - `i_dunning_dunningnum` — btree on `dunningnum`
63
+ - `i_dunning_nofork` — gin, partial on `fork`
64
+ - `i_dunning_noowner` — gin, partial on `ownergroup`
65
+ - `s_dunning_dunningnum` — gin on `dunningnum`
66
+ - `u_dunning_dunningnum_type` — btree, unique, partial on `dunningnum, type`
67
+
68
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
69
+
70
+ # Operations
71
+
72
+ - list: `listDunningNotices`
73
+ - get: `getDunningNotice`
74
+ - create: `createDunningNotice`
75
+ - update: `updateDunningNotice`
76
+ - delete: `deleteDunningNotice`
77
+ - exists: `existsDunningNotice`
78
+ <!-- okf:generated:end -->
79
+
80
+ # Notes
81
+
82
+ operationId trap: list via `listDunningNotices` / get via `getDunningNotice` (NOT `listDunning`). A collection-stage object, not the receivable itself.
@@ -0,0 +1,46 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Dunning To Transactions
4
+ description: Dunning-to-transaction junction.
5
+ resource: zeyos://api/dunning2transactions
6
+ tags: [collections, generated]
7
+ api_backed: true
8
+ list_operation: listDunningToTransactions
9
+ visibility_column: false
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | bigint | no | — | yes | — |
18
+ | `creator` | integer | yes | — | — | — |
19
+ | `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
20
+ | `lastmodified` | bigint | no | `EXTRACT(epoch FROM now())` | — | — |
21
+ | `dunning` | integer | no | — | yes | [dunning](/entities/dunning.md) |
22
+ | `transaction` | integer | no | — | yes | [transactions](/entities/transactions.md) |
23
+
24
+ # Foreign Keys
25
+
26
+ - `dunning` → [dunning](/entities/dunning.md) (`dunning.ID`)
27
+ - `transaction` → [transactions](/entities/transactions.md) (`transactions.ID`)
28
+
29
+ # Indexes
30
+
31
+ - `fk_dunning2transactions_transaction` — btree on `transaction`
32
+ - `u_dunning2transactions_dunning_transaction` — btree, unique on `dunning, transaction`
33
+
34
+ # Operations
35
+
36
+ - list: `listDunningToTransactions`
37
+ - get: `getDunningToTransaction`
38
+ - create: `createDunningToTransaction`
39
+ - update: `updateDunningToTransaction`
40
+ - delete: `deleteDunningToTransaction`
41
+ - exists: `existsDunningToTransaction`
42
+ <!-- okf:generated:end -->
43
+
44
+ # Notes
45
+
46
+ operationId: `listDunningToTransactions`.
@@ -0,0 +1,42 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Entities To Channels
4
+ description: Junction between records and channels.
5
+ resource: zeyos://api/entities2channels
6
+ tags: [collaboration, generated]
7
+ api_backed: true
8
+ list_operation: listEntitiesToChannels
9
+ visibility_column: false
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | bigint | no | — | yes | — |
18
+ | `creator` | integer | yes | — | — | — |
19
+ | `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
20
+ | `lastmodified` | bigint | no | `EXTRACT(epoch FROM now())` | — | — |
21
+ | `entity` | t_entity | no | — | yes | — |
22
+ | `index` | integer | no | — | yes | — |
23
+ | `channel` | integer | no | — | yes | [channels](/entities/channels.md) |
24
+
25
+ # Foreign Keys
26
+
27
+ - `channel` → [channels](/entities/channels.md) (`channels.ID`)
28
+
29
+ # Indexes
30
+
31
+ - `fk_entities2channels_channel` — btree on `channel`
32
+ - `u_entities2channels_entity_index` — btree, unique on `entity, index, +channel`
33
+
34
+ # Operations
35
+
36
+ - list: `listEntitiesToChannels`
37
+ - get: `getEntityToChannel`
38
+ - create: `createEntityToChannel`
39
+ - update: `updateEntityToChannel`
40
+ - delete: `deleteEntityToChannel`
41
+ - exists: `existsEntityToChannel`
42
+ <!-- okf:generated:end -->
@@ -0,0 +1,57 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Events
4
+ description: Generic event records attached to entities.
5
+ resource: zeyos://api/events
6
+ tags: [collaboration, generated]
7
+ api_backed: true
8
+ list_operation: listEvents
9
+ visibility_column: false
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | integer | no | — | yes | — |
18
+ | `fork` | integer | yes | — | yes | [forks](/entities/forks.md) |
19
+ | `owneruser` | integer | yes | — | yes | [users](/entities/users.md) |
20
+ | `ownergroup` | integer | yes | — | yes | [groups](/entities/groups.md) |
21
+ | `creator` | integer | yes | — | — | — |
22
+ | `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
23
+ | `lastmodified` | bigint | no | `date_part('epoch', now())` | — | — |
24
+ | `entity` | t_entity | no | — | yes | — |
25
+ | `index` | integer | no | — | yes | — |
26
+ | `name` | text | no | — | — | — |
27
+ | `color` | character varying(6) | no | `''` | — | — |
28
+ | `datefrom` | bigint | no | — | yes | — |
29
+ | `dateto` | bigint | no | — | yes | — |
30
+ | `meta` | json | yes | — | — | — |
31
+
32
+ # Foreign Keys
33
+
34
+ - `fork` → [forks](/entities/forks.md) (`forks.ID`)
35
+ - `owneruser` → [users](/entities/users.md) (`users.ID`)
36
+ - `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
37
+
38
+ # Indexes
39
+
40
+ - `fk_events_fork` — gin, partial on `fork`
41
+ - `fk_events_ownergroup` — gin, partial on `ownergroup`
42
+ - `fk_events_owneruser` — gin, partial on `owneruser`
43
+ - `i_events_datefrom_dateto` — btree on `datefrom, dateto`
44
+ - `i_events_entity_index` — btree, partial on `entity, index`
45
+ - `i_events_noowner` — gin, partial on `ownergroup`
46
+
47
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
48
+
49
+ # Operations
50
+
51
+ - list: `listEvents`
52
+ - get: `getEvent`
53
+ - create: `createEvent`
54
+ - update: `updateEvent`
55
+ - delete: `deleteEvent`
56
+ - exists: `existsEvent`
57
+ <!-- okf:generated:end -->
@@ -0,0 +1,67 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Feed Servers
4
+ description: Feed server definitions.
5
+ resource: zeyos://api/feedservers
6
+ tags: [platform, generated]
7
+ api_backed: true
8
+ list_operation: listFeedServers
9
+ visibility_column: false
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | integer | no | — | yes | — |
18
+ | `owneruser` | integer | yes | — | yes | [users](/entities/users.md) |
19
+ | `ownergroup` | integer | yes | — | yes | [groups](/entities/groups.md) |
20
+ | `creator` | integer | yes | — | — | — |
21
+ | `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
22
+ | `lastmodified` | bigint | no | `date_part('epoch', now())` | — | — |
23
+ | `recipientuser` | integer | yes | — | — | [users](/entities/users.md) |
24
+ | `recipientgroup` | integer | yes | — | — | [groups](/entities/groups.md) |
25
+ | `channel` | integer | yes | — | — | [channels](/entities/channels.md) |
26
+ | `activity` | smallint | no | `0` | — | — |
27
+ | `name` | text | no | — | yes | — |
28
+ | `url` | text | no | — | yes | — |
29
+ | `username` | text | no | `''` | — | — |
30
+ | `notify` | smallint | no | `0` | — | — |
31
+ | `etag` | text | no | `''` | — | — |
32
+ | `description` | text | no | `''` | — | — |
33
+ | `password` | bytea | yes | — | — | — |
34
+
35
+ # Foreign Keys
36
+
37
+ - `owneruser` → [users](/entities/users.md) (`users.ID`)
38
+ - `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
39
+ - `recipientuser` → [users](/entities/users.md) (`users.ID`)
40
+ - `recipientgroup` → [groups](/entities/groups.md) (`groups.ID`)
41
+ - `channel` → [channels](/entities/channels.md) (`channels.ID`)
42
+
43
+ # Enums
44
+
45
+ ### `activity`
46
+
47
+ `0` = ACTIVE · `1` = DEACTIVATED · `2` = DELETED
48
+
49
+ # Indexes
50
+
51
+ - `fk_feedservers_ownergroup` — gin, partial on `ownergroup`
52
+ - `fk_feedservers_owneruser` — gin, partial on `owneruser`
53
+ - `i_feedservers_noowner` — gin, partial on `ownergroup`
54
+ - `s_feedservers_name` — gin on `name`
55
+ - `s_feedservers_url` — gin on `url`
56
+
57
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
58
+
59
+ # Operations
60
+
61
+ - list: `listFeedServers`
62
+ - get: `getFeedServer`
63
+ - create: `createFeedServer`
64
+ - update: `updateFeedServer`
65
+ - delete: `deleteFeedServer`
66
+ - exists: `existsFeedServer`
67
+ <!-- okf:generated:end -->
@@ -0,0 +1,50 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Files
4
+ description: Attachments linked to a record or comment.
5
+ resource: zeyos://api/files
6
+ tags: [knowledge, generated]
7
+ api_backed: true
8
+ list_operation: listFiles
9
+ visibility_column: false
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | bigint | no | — | yes | — |
18
+ | `creator` | integer | yes | — | — | — |
19
+ | `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
20
+ | `lastmodified` | bigint | no | `EXTRACT(epoch FROM now())` | — | — |
21
+ | `record` | bigint | yes | — | yes | [records](/entities/records.md) |
22
+ | `comment` | bigint | yes | — | yes | [comments](/entities/comments.md) |
23
+ | `binfile` | integer | yes | — | yes | [binfiles](/entities/binfiles.md) |
24
+ | `filename` | text | no | `''` | yes | — |
25
+ | `mimetype` | text | no | `'application/octet-stream'` | — | — |
26
+
27
+ # Foreign Keys
28
+
29
+ - `record` → [records](/entities/records.md) (`records.ID`)
30
+ - `comment` → [comments](/entities/comments.md) (`comments.ID`)
31
+ - `binfile` → [binfiles](/entities/binfiles.md) (`binfiles.ID`)
32
+
33
+ # Indexes
34
+
35
+ - `fk_files_binfile` — btree, partial on `binfile`
36
+ - `fk_files_comment` — btree, partial on `comment`
37
+ - `fk_files_record` — btree, partial on `record`
38
+ - `s_files_filename` — gin, partial on `filename`
39
+
40
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
41
+
42
+ # Operations
43
+
44
+ - list: `listFiles`
45
+ - get: `getFile`
46
+ - create: `createFile`
47
+ - update: `updateFile`
48
+ - delete: `deleteFile`
49
+ - exists: `existsFile`
50
+ <!-- okf:generated:end -->
@@ -0,0 +1,40 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Follows
4
+ description: Follow/watch subscriptions on entities.
5
+ resource: zeyos://api/follows
6
+ tags: [collaboration, generated]
7
+ api_backed: true
8
+ list_operation: listFollows
9
+ visibility_column: false
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | bigint | no | — | yes | — |
18
+ | `creator` | integer | no | — | yes | [users](/entities/users.md) |
19
+ | `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
20
+ | `lastmodified` | bigint | no | `EXTRACT(epoch FROM now())` | — | — |
21
+ | `entity` | t_entity | no | — | yes | — |
22
+ | `index` | bigint | no | — | yes | — |
23
+
24
+ # Foreign Keys
25
+
26
+ - `creator` → [users](/entities/users.md) (`users.ID`)
27
+
28
+ # Indexes
29
+
30
+ - `u_follows_entity_creator_index` — btree, unique on `entity, creator, index`
31
+
32
+ # Operations
33
+
34
+ - list: `listFollows`
35
+ - get: `getFollow`
36
+ - create: `createFollow`
37
+ - update: `updateFollow`
38
+ - delete: `deleteFollow`
39
+ - exists: `existsFollow`
40
+ <!-- okf:generated:end -->
@@ -0,0 +1,54 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Forks
4
+ description: Module/fork definitions with identifiers and module names.
5
+ resource: zeyos://api/forks
6
+ tags: [platform, generated]
7
+ api_backed: true
8
+ list_operation: listForks
9
+ visibility_column: false
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | integer | no | — | yes | — |
18
+ | `creator` | integer | yes | — | — | — |
19
+ | `creationdate` | bigint | no | `EXTRACT(epoch FROM now())` | — | — |
20
+ | `lastmodified` | bigint | no | `EXTRACT(epoch FROM now())` | — | — |
21
+ | `group` | integer | yes | — | — | [groups](/entities/groups.md) |
22
+ | `activity` | smallint | no | `0` | — | — |
23
+ | `name` | text | no | — | yes | — |
24
+ | `identifier` | character varying(200) | no | — | yes | — |
25
+ | `module` | text | no | — | — | — |
26
+ | `color` | character varying(6) | no | `''` | — | — |
27
+ | `langaliases` | json | yes | — | — | — |
28
+ | `description` | text | no | `''` | — | — |
29
+ | `settings` | json | yes | — | — | — |
30
+
31
+ # Foreign Keys
32
+
33
+ - `group` → [groups](/entities/groups.md) (`groups.ID`)
34
+
35
+ # Enums
36
+
37
+ ### `activity`
38
+
39
+ `0` = ACTIVE · `1` = DEACTIVATED · `2` = DELETED
40
+
41
+ # Indexes
42
+
43
+ - `s_forks_identifier` — gin on `identifier`
44
+ - `s_forks_name` — gin on `name`
45
+ - `u_forks_identifier` — btree, unique on `identifier`
46
+
47
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
48
+
49
+ # Operations
50
+
51
+ - list: `listForks`
52
+ - get: `getFork`
53
+ - exists: `existsFork`
54
+ <!-- okf:generated:end -->
@@ -0,0 +1,48 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Groups
4
+ description: User groups.
5
+ resource: zeyos://api/groups
6
+ tags: [platform, generated]
7
+ api_backed: true
8
+ list_operation: listGroups
9
+ visibility_column: false
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | integer | no | — | yes | — |
18
+ | `creator` | integer | yes | — | — | — |
19
+ | `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
20
+ | `lastmodified` | bigint | no | `date_part('epoch', now())` | — | — |
21
+ | `leader` | integer | yes | — | — | [users](/entities/users.md) |
22
+ | `activity` | smallint | no | `0` | — | — |
23
+ | `name` | text | no | — | yes | — |
24
+ | `description` | text | no | `''` | — | — |
25
+
26
+ # Foreign Keys
27
+
28
+ - `leader` → [users](/entities/users.md) (`users.ID`)
29
+
30
+ # Enums
31
+
32
+ ### `activity`
33
+
34
+ `0` = ACTIVE · `1` = DEACTIVATED · `2` = DELETED
35
+
36
+ # Indexes
37
+
38
+ - `s_groups_name` — gin on `name`
39
+ - `u_groups_name` — btree, unique on `lower(name)`
40
+
41
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
42
+
43
+ # Operations
44
+
45
+ - list: `listGroups`
46
+ - get: `getGroup`
47
+ - exists: `existsGroup`
48
+ <!-- okf:generated:end -->
@@ -0,0 +1,44 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Groups To Users
4
+ description: Group membership junction.
5
+ resource: zeyos://api/groups2users
6
+ tags: [platform, generated]
7
+ api_backed: true
8
+ list_operation: listGroupsToUsers
9
+ visibility_column: false
10
+ ---
11
+
12
+ <!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
13
+ # Schema
14
+
15
+ | Column | Type | Nullable | Default | Indexed | FK |
16
+ |---|---|---|---|---|---|
17
+ | `ID` | bigint | no | — | yes | — |
18
+ | `creator` | integer | yes | — | — | — |
19
+ | `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
20
+ | `lastmodified` | bigint | no | `date_part('epoch', now())` | — | — |
21
+ | `group` | integer | no | — | yes | [groups](/entities/groups.md) |
22
+ | `user` | integer | no | — | yes | [users](/entities/users.md) |
23
+ | `writable` | smallint | no | `0` | — | — |
24
+
25
+ # Foreign Keys
26
+
27
+ - `group` → [groups](/entities/groups.md) (`groups.ID`)
28
+ - `user` → [users](/entities/users.md) (`users.ID`)
29
+
30
+ # Indexes
31
+
32
+ - `fk_groups2users_user` — btree on `user`
33
+ - `u_groups2users_group_user` — btree, unique on `group, user`
34
+
35
+ # Operations
36
+
37
+ - list: `listGroupsToUsers`
38
+ - get: `getGroupToUser`
39
+ - exists: `existsGroupToUser`
40
+ <!-- okf:generated:end -->
41
+
42
+ # Notes
43
+
44
+ Read-only; operationId `listGroupsToUsers`.