@zeyos/client 0.3.0 → 0.5.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 (137) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +41 -2
  3. package/agents/README.md +10 -0
  4. package/agents/shared/zeyos-agent-operating-guide.md +42 -0
  5. package/agents/shared/zeyos-entity-map.md +5 -1
  6. package/agents/shared/zeyos-entity-reference.md +89 -33
  7. package/agents/shared/zeyos-query-patterns.md +26 -0
  8. package/agents/zeyos-calendar-and-scheduling/SKILL.md +45 -0
  9. package/agents/zeyos-calendar-and-scheduling/references/workflows.md +49 -0
  10. package/agents/zeyos-data-quality-and-governance/SKILL.md +43 -0
  11. package/agents/zeyos-data-quality-and-governance/references/workflows.md +51 -0
  12. package/agents/zeyos-document-and-approval/SKILL.md +41 -0
  13. package/agents/zeyos-document-and-approval/references/workflows.md +43 -0
  14. package/agents/zeyos-procurement-and-supplier-performance/SKILL.md +36 -0
  15. package/agents/zeyos-procurement-and-supplier-performance/references/workflows.md +46 -0
  16. package/agents/zeyos-time-tracking/SKILL.md +2 -0
  17. package/agents/zeyos-time-tracking/references/workflows.md +68 -0
  18. package/agents/zeyos-work-management/SKILL.md +4 -3
  19. package/agents/zeyos-work-management/references/workflows.md +39 -1
  20. package/docs/03-cli/02-commands.md +36 -2
  21. package/docs/03-cli/03-configuration.md +1 -0
  22. package/docs/06-okf/01-overview.md +70 -0
  23. package/docs/06-okf/02-producing-and-consuming.md +46 -0
  24. package/docs/06-okf/03-keeping-fresh.md +53 -0
  25. package/docs/06-okf/04-loops.md +58 -0
  26. package/docs/06-okf/_category_.json +9 -0
  27. package/okf/concepts/calendar-timezones.md +10 -0
  28. package/okf/concepts/confirmation-and-side-effects.md +14 -0
  29. package/okf/concepts/counting-and-sums.md +10 -0
  30. package/okf/concepts/currency-and-rounding.md +10 -0
  31. package/okf/concepts/dates-unix-seconds.md +12 -0
  32. package/okf/concepts/enums.md +14 -0
  33. package/okf/concepts/filters-vs-filter.md +14 -0
  34. package/okf/concepts/idempotency-and-deduplication.md +10 -0
  35. package/okf/concepts/index.md +16 -0
  36. package/okf/concepts/null-empty-missing.md +10 -0
  37. package/okf/concepts/official-versus-latest.md +10 -0
  38. package/okf/concepts/operationid-vocabulary.md +17 -0
  39. package/okf/concepts/ownership-versus-attention.md +15 -0
  40. package/okf/concepts/untrusted-business-content.md +10 -0
  41. package/okf/concepts/visibility-column.md +13 -0
  42. package/okf/entities/accounts.md +82 -0
  43. package/okf/entities/actionsteps.md +84 -0
  44. package/okf/entities/addresses.md +50 -0
  45. package/okf/entities/applicationassets.md +43 -0
  46. package/okf/entities/applications.md +62 -0
  47. package/okf/entities/appointments.md +79 -0
  48. package/okf/entities/associations.md +41 -0
  49. package/okf/entities/binfiles.md +32 -0
  50. package/okf/entities/campaigns.md +66 -0
  51. package/okf/entities/categories.md +55 -0
  52. package/okf/entities/channels.md +54 -0
  53. package/okf/entities/comments.md +44 -0
  54. package/okf/entities/components.md +46 -0
  55. package/okf/entities/contacts.md +96 -0
  56. package/okf/entities/contacts2contacts.md +42 -0
  57. package/okf/entities/contracts.md +83 -0
  58. package/okf/entities/couponcodes.md +58 -0
  59. package/okf/entities/coupons.md +69 -0
  60. package/okf/entities/customfields.md +59 -0
  61. package/okf/entities/davservers.md +74 -0
  62. package/okf/entities/devices.md +65 -0
  63. package/okf/entities/documents.md +76 -0
  64. package/okf/entities/dunning.md +82 -0
  65. package/okf/entities/dunning2transactions.md +46 -0
  66. package/okf/entities/entities2channels.md +42 -0
  67. package/okf/entities/events.md +57 -0
  68. package/okf/entities/feedservers.md +67 -0
  69. package/okf/entities/files.md +50 -0
  70. package/okf/entities/follows.md +40 -0
  71. package/okf/entities/forks.md +54 -0
  72. package/okf/entities/groups.md +48 -0
  73. package/okf/entities/groups2users.md +44 -0
  74. package/okf/entities/index.md +93 -0
  75. package/okf/entities/invitations.md +53 -0
  76. package/okf/entities/items.md +95 -0
  77. package/okf/entities/ledgers.md +56 -0
  78. package/okf/entities/likes.md +40 -0
  79. package/okf/entities/links.md +70 -0
  80. package/okf/entities/mailinglists.md +67 -0
  81. package/okf/entities/mailingrecipients.md +45 -0
  82. package/okf/entities/mailservers.md +77 -0
  83. package/okf/entities/messagereads.md +40 -0
  84. package/okf/entities/messages.md +104 -0
  85. package/okf/entities/notes.md +73 -0
  86. package/okf/entities/objects.md +70 -0
  87. package/okf/entities/opportunities.md +87 -0
  88. package/okf/entities/participants.md +52 -0
  89. package/okf/entities/payments.md +76 -0
  90. package/okf/entities/permissions.md +46 -0
  91. package/okf/entities/pricelists.md +70 -0
  92. package/okf/entities/pricelists2accounts.md +46 -0
  93. package/okf/entities/prices.md +49 -0
  94. package/okf/entities/projects.md +72 -0
  95. package/okf/entities/records.md +75 -0
  96. package/okf/entities/relateditems.md +43 -0
  97. package/okf/entities/resources.md +55 -0
  98. package/okf/entities/services.md +64 -0
  99. package/okf/entities/stocktransactions.md +72 -0
  100. package/okf/entities/storages.md +56 -0
  101. package/okf/entities/suppliers.md +51 -0
  102. package/okf/entities/tasks.md +86 -0
  103. package/okf/entities/tickets.md +86 -0
  104. package/okf/entities/transactions.md +118 -0
  105. package/okf/entities/users.md +66 -0
  106. package/okf/entities/weblets.md +66 -0
  107. package/okf/index.md +11 -0
  108. package/okf/log.md +4 -0
  109. package/okf/metrics/account-address-completeness.md +10 -0
  110. package/okf/metrics/cash-received.md +10 -0
  111. package/okf/metrics/index.md +9 -0
  112. package/okf/metrics/invoiced-net-revenue.md +16 -0
  113. package/okf/metrics/open-customers.md +14 -0
  114. package/okf/metrics/overdue-receivables.md +12 -0
  115. package/okf/metrics/stock-movement-by-storage.md +10 -0
  116. package/okf/metrics/supplier-delivery-performance.md +10 -0
  117. package/okf/playbooks/activity-timeline.md +11 -0
  118. package/okf/playbooks/calendar-availability.md +11 -0
  119. package/okf/playbooks/campaign-recipient-coverage.md +12 -0
  120. package/okf/playbooks/customer-360.md +12 -0
  121. package/okf/playbooks/document-approval.md +10 -0
  122. package/okf/playbooks/duplicate-account-review.md +11 -0
  123. package/okf/playbooks/effective-customer-price.md +11 -0
  124. package/okf/playbooks/index.md +13 -0
  125. package/okf/playbooks/missing-billing-addresses.md +12 -0
  126. package/okf/playbooks/revenue-this-year.md +19 -0
  127. package/okf/playbooks/supplier-scorecard.md +10 -0
  128. package/okf/playbooks/ticket-work-packet.md +11 -0
  129. package/package.json +11 -3
  130. package/scripts/data/okf-curation.mjs +446 -0
  131. package/scripts/generate-client.mjs +4 -275
  132. package/scripts/generate-okf.mjs +241 -0
  133. package/scripts/lib/live-test-config.mjs +20 -0
  134. package/scripts/lib/okf.mjs +272 -0
  135. package/scripts/lib/spec-model.mjs +325 -0
  136. package/src/index.js +4 -0
  137. package/src/runtime/okf.js +237 -0
@@ -0,0 +1,79 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Appointments
4
+ description: Calendar appointments.
5
+ resource: zeyos://api/appointments
6
+ tags: [work, generated]
7
+ api_backed: true
8
+ list_operation: listAppointments
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 | `date_part('epoch', now())` | — | — |
24
+ | `lastmodified` | bigint | no | `date_part('epoch', now())` | — | — |
25
+ | `davserver` | integer | yes | — | yes | [davservers](/entities/davservers.md) |
26
+ | `visibility` | smallint | no | `0` | — | — |
27
+ | `name` | text | no | — | yes | — |
28
+ | `location` | text | no | `''` | yes | — |
29
+ | `color` | character varying(6) | no | `''` | — | — |
30
+ | `datefrom` | bigint | no | — | yes | — |
31
+ | `dateto` | bigint | no | — | yes | — |
32
+ | `recurrence` | smallint | yes | — | — | — |
33
+ | `interval` | smallint | no | `1` | — | — |
34
+ | `maxoccurrences` | integer | no | `0` | — | — |
35
+ | `daterecurrence` | bigint | yes | — | — | — |
36
+ | `description` | text | no | `''` | — | — |
37
+
38
+ # Foreign Keys
39
+
40
+ - `fork` → [forks](/entities/forks.md) (`forks.ID`)
41
+ - `owneruser` → [users](/entities/users.md) (`users.ID`)
42
+ - `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
43
+ - `assigneduser` → [users](/entities/users.md) (`users.ID`)
44
+ - `davserver` → [davservers](/entities/davservers.md) (`davservers.ID`)
45
+
46
+ # Enums
47
+
48
+ ### `visibility`
49
+
50
+ `0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
51
+
52
+ ### `recurrence`
53
+
54
+ `0` = DAY · `1` = WORKDAY · `2` = WEEK · `3` = MONTH · `4` = YEAR
55
+
56
+ # Indexes
57
+
58
+ - `fk_appointments_assigneduser` — gin, partial on `assigneduser`
59
+ - `fk_appointments_davserver` — gin, partial on `davserver`
60
+ - `fk_appointments_fork` — gin, partial on `fork`
61
+ - `fk_appointments_ownergroup` — gin, partial on `ownergroup`
62
+ - `fk_appointments_owneruser` — gin, partial on `owneruser`
63
+ - `i_appointments_datefrom_dateto` — btree on `datefrom, dateto`
64
+ - `i_appointments_nofork` — gin, partial on `fork`
65
+ - `i_appointments_noowner` — gin, partial on `ownergroup`
66
+ - `s_appointments_location` — gin, partial on `location`
67
+ - `s_appointments_name` — gin on `name`
68
+
69
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
70
+
71
+ # Operations
72
+
73
+ - list: `listAppointments`
74
+ - get: `getAppointment`
75
+ - create: `createAppointment`
76
+ - update: `updateAppointment`
77
+ - delete: `deleteAppointment`
78
+ - exists: `existsAppointment`
79
+ <!-- okf:generated:end -->
@@ -0,0 +1,41 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Associations
4
+ description: Generic cross-entity relation records with metadata.
5
+ resource: zeyos://api/associations
6
+ tags: [platform, generated]
7
+ api_backed: true
8
+ list_operation: listAssociations
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
+ | `entity1` | t_entity | no | — | yes | — |
22
+ | `entity2` | t_entity | no | — | yes | — |
23
+ | `index1` | integer | no | — | yes | — |
24
+ | `index2` | integer | no | — | yes | — |
25
+ | `relation` | text | no | `''` | — | — |
26
+ | `meta` | json | yes | — | — | — |
27
+
28
+ # Indexes
29
+
30
+ - `i_associations_entity2_index2` — btree on `entity2, index2`
31
+ - `u_associations_entity1_index1_entity2_index2` — btree, unique on `entity1, index1, entity2, index2`
32
+
33
+ # Operations
34
+
35
+ - list: `listAssociations`
36
+ - get: `getAssociation`
37
+ - create: `createAssociation`
38
+ - update: `updateAssociation`
39
+ - delete: `deleteAssociation`
40
+ - exists: `existsAssociation`
41
+ <!-- okf:generated:end -->
@@ -0,0 +1,32 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Bin Files
4
+ description: Binary file storage records.
5
+ resource: zeyos://api/binfiles
6
+ tags: [platform, generated]
7
+ api_backed: true
8
+ list_operation: listBinFiles
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
+ | `size` | integer | no | — | yes | — |
19
+ | `hash` | bytea | no | — | yes | — |
20
+
21
+ # Indexes
22
+
23
+ - `i_binfiles_hash` — hash on `hash`
24
+
25
+ # Operations
26
+
27
+ - list: `listBinFiles`
28
+ <!-- okf:generated:end -->
29
+
30
+ # Notes
31
+
32
+ List-only: `listBinFiles`.
@@ -0,0 +1,66 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Campaigns
4
+ description: Marketing or outreach campaigns.
5
+ resource: zeyos://api/campaigns
6
+ tags: [outreach, generated]
7
+ api_backed: true
8
+ list_operation: listCampaigns
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
+ | `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
+ | `visibility` | smallint | no | `0` | — | — |
25
+ | `name` | text | no | — | yes | — |
26
+ | `datefrom` | bigint | no | — | — | — |
27
+ | `dateto` | bigint | yes | — | — | — |
28
+ | `status` | smallint | no | `0` | — | — |
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
+ - `assigneduser` → [users](/entities/users.md) (`users.ID`)
36
+
37
+ # Enums
38
+
39
+ ### `visibility`
40
+
41
+ `0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
42
+
43
+ ### `status`
44
+
45
+ `0` = DRAFT · `1` = NOTSTARTED · `2` = AWAITINGAPPROVAL · `3` = APPROVED · `4` = DISMISSED · `5` = ACTIVE · `6` = INACTIVE · `7` = INEVALUATION · `8` = CANCELLED · `9` = CLOSED
46
+
47
+ # Indexes
48
+
49
+ - `fk_campaigns_assigneduser` — gin, partial on `assigneduser`
50
+ - `fk_campaigns_fork` — gin, partial on `fork`
51
+ - `fk_campaigns_ownergroup` — gin on `ownergroup`
52
+ - `i_campaigns_nofork` — gin, partial on `fork`
53
+ - `i_campaigns_noowner` — gin, partial on `ownergroup`
54
+ - `s_campaigns_name` — gin on `name`
55
+
56
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
57
+
58
+ # Operations
59
+
60
+ - list: `listCampaigns`
61
+ - get: `getCampaign`
62
+ - create: `createCampaign`
63
+ - update: `updateCampaign`
64
+ - delete: `deleteCampaign`
65
+ - exists: `existsCampaign`
66
+ <!-- okf:generated:end -->
@@ -0,0 +1,55 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Categorys
4
+ description: Category definitions.
5
+ resource: zeyos://api/categories
6
+ tags: [commerce, generated]
7
+ api_backed: true
8
+ list_operation: listCategorys
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 | `EXTRACT(epoch FROM now())` | — | — |
24
+ | `entity` | text | no | — | yes | — |
25
+ | `name` | text | no | — | yes | — |
26
+
27
+ # Foreign Keys
28
+
29
+ - `fork` → [forks](/entities/forks.md) (`forks.ID`)
30
+ - `owneruser` → [users](/entities/users.md) (`users.ID`)
31
+ - `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
32
+
33
+ # Indexes
34
+
35
+ - `i_categories_entity_name_root` — btree, partial on `entity, name`
36
+ - `i_categories_entity_name_sub` — btree, partial on `entity, name`
37
+ - `i_categories_fork_entity_name_root` — btree, partial on `fork, entity, name`
38
+ - `i_categories_fork_entity_name_sub` — btree, partial on `fork, entity, name`
39
+ - `u_categories_fork_entity_name_owneruser_ownergroup` — btree, unique on `fork, entity, name, owneruser, ownergroup`
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: `listCategorys`
46
+ - get: `getCategory`
47
+ - create: `createCategory`
48
+ - update: `updateCategory`
49
+ - delete: `deleteCategory`
50
+ - exists: `existsCategory`
51
+ <!-- okf:generated:end -->
52
+
53
+ # Notes
54
+
55
+ operationId trap: list op is `listCategorys` (sic); singular ops use `Category`.
@@ -0,0 +1,54 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Channels
4
+ description: Collaboration or distribution channels.
5
+ resource: zeyos://api/channels
6
+ tags: [collaboration, generated]
7
+ api_backed: true
8
+ list_operation: listChannels
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 | `EXTRACT(epoch FROM now())` | — | — |
23
+ | `activity` | smallint | no | `0` | — | — |
24
+ | `name` | text | no | — | yes | — |
25
+ | `description` | text | no | `''` | — | — |
26
+
27
+ # Foreign Keys
28
+
29
+ - `owneruser` → [users](/entities/users.md) (`users.ID`)
30
+ - `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
31
+
32
+ # Enums
33
+
34
+ ### `activity`
35
+
36
+ `0` = ACTIVE · `1` = DEACTIVATED · `2` = DELETED
37
+
38
+ # Indexes
39
+
40
+ - `fk_channels_ownergroup` — gin, partial on `ownergroup`
41
+ - `fk_channels_owneruser` — gin, partial on `owneruser`
42
+ - `s_channels_name` — gin on `name`
43
+
44
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
45
+
46
+ # Operations
47
+
48
+ - list: `listChannels`
49
+ - get: `getChannel`
50
+ - create: `createChannel`
51
+ - update: `updateChannel`
52
+ - delete: `deleteChannel`
53
+ - exists: `existsChannel`
54
+ <!-- okf:generated:end -->
@@ -0,0 +1,44 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Comments
4
+ description: Record-linked comments.
5
+ resource: zeyos://api/comments
6
+ tags: [collaboration, generated]
7
+ api_backed: true
8
+ list_operation: listComments
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 | no | — | yes | [records](/entities/records.md) |
22
+ | `date` | bigint | no | `EXTRACT(epoch FROM now())` | yes | — |
23
+ | `sender` | text | no | `''` | — | — |
24
+ | `text` | text | no | `''` | — | — |
25
+ | `meta` | json | yes | — | — | — |
26
+
27
+ # Foreign Keys
28
+
29
+ - `record` → [records](/entities/records.md) (`records.ID`)
30
+
31
+ # Indexes
32
+
33
+ - `fk_comments_record` — btree on `record`
34
+ - `i_comments_date` — btree on `date`
35
+
36
+ # Operations
37
+
38
+ - list: `listComments`
39
+ - get: `getComment`
40
+ - create: `createComment`
41
+ - update: `updateComment`
42
+ - delete: `deleteComment`
43
+ - exists: `existsComment`
44
+ <!-- okf:generated:end -->
@@ -0,0 +1,46 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Components
4
+ description: Item-to-item composition records (BOM/kit).
5
+ resource: zeyos://api/components
6
+ tags: [commerce, generated]
7
+ api_backed: true
8
+ list_operation: listComponents
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
+ | `item` | integer | no | — | yes | [items](/entities/items.md) |
22
+ | `component` | integer | no | — | yes | [items](/entities/items.md) |
23
+ | `amount` | double precision | no | `0` | — | — |
24
+ | `price` | double precision | yes | — | — | — |
25
+ | `fixed` | smallint | no | `0` | — | — |
26
+ | `order` | integer | yes | — | — | — |
27
+
28
+ # Foreign Keys
29
+
30
+ - `item` → [items](/entities/items.md) (`items.ID`)
31
+ - `component` → [items](/entities/items.md) (`items.ID`)
32
+
33
+ # Indexes
34
+
35
+ - `fk_components_component` — btree on `component`
36
+ - `u_components_item_component` — btree, unique on `item, component`
37
+
38
+ # Operations
39
+
40
+ - list: `listComponents`
41
+ - get: `getComponent`
42
+ - create: `createComponent`
43
+ - update: `updateComponent`
44
+ - delete: `deleteComponent`
45
+ - exists: `existsComponent`
46
+ <!-- okf:generated:end -->
@@ -0,0 +1,96 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Contacts
4
+ description: People linked to accounts.
5
+ resource: zeyos://api/contacts
6
+ tags: [crm, generated]
7
+ api_backed: true
8
+ list_operation: listContacts
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 | `date_part('epoch', now())` | — | — |
24
+ | `lastmodified` | bigint | no | `date_part('epoch', now())` | — | — |
25
+ | `davserver` | integer | yes | — | yes | [davservers](/entities/davservers.md) |
26
+ | `picbinfile` | integer | yes | — | yes | [binfiles](/entities/binfiles.md) |
27
+ | `visibility` | smallint | no | `0` | — | — |
28
+ | `lastname` | text | no | `''` | yes | — |
29
+ | `firstname` | text | no | `''` | yes | — |
30
+ | `type` | smallint | no | `0` | — | — |
31
+ | `title` | text | no | `''` | — | — |
32
+ | `company` | text | no | `''` | yes | — |
33
+ | `position` | text | no | `''` | — | — |
34
+ | `department` | text | no | `''` | — | — |
35
+ | `address` | text | no | `''` | — | — |
36
+ | `postalcode` | text | no | `''` | — | — |
37
+ | `city` | text | no | `''` | — | — |
38
+ | `region` | text | no | `''` | — | — |
39
+ | `country` | character varying(2) | no | `''` | — | — |
40
+ | `phone` | text | no | `''` | — | — |
41
+ | `phone2` | text | no | `''` | — | — |
42
+ | `cell` | text | no | `''` | — | — |
43
+ | `fax` | text | no | `''` | — | — |
44
+ | `email` | text | no | `''` | yes | — |
45
+ | `email2` | text | no | `''` | yes | — |
46
+ | `website` | text | no | `''` | — | — |
47
+ | `birthdate` | bigint | yes | — | — | — |
48
+ | `description` | text | no | `''` | — | — |
49
+
50
+ # Foreign Keys
51
+
52
+ - `fork` → [forks](/entities/forks.md) (`forks.ID`)
53
+ - `owneruser` → [users](/entities/users.md) (`users.ID`)
54
+ - `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
55
+ - `assigneduser` → [users](/entities/users.md) (`users.ID`)
56
+ - `davserver` → [davservers](/entities/davservers.md) (`davservers.ID`)
57
+ - `picbinfile` → [binfiles](/entities/binfiles.md) (`binfiles.ID`)
58
+
59
+ # Enums
60
+
61
+ ### `visibility`
62
+
63
+ `0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
64
+
65
+ ### `type`
66
+
67
+ `0` = COMPANY · `1` = PERSON
68
+
69
+ # Indexes
70
+
71
+ - `fk_contacts_assigneduser` — gin, partial on `assigneduser`
72
+ - `fk_contacts_davserver` — gin, partial on `davserver`
73
+ - `fk_contacts_fork` — gin, partial on `fork`
74
+ - `fk_contacts_ownergroup` — gin, partial on `ownergroup`
75
+ - `fk_contacts_owneruser` — gin, partial on `owneruser`
76
+ - `fk_contacts_picbinfile` — btree, partial on `picbinfile`
77
+ - `i_contacts_lastname_firstname` — btree on `lastname, firstname`
78
+ - `i_contacts_nofork` — gin, partial on `fork`
79
+ - `i_contacts_noowner` — gin, partial on `ownergroup`
80
+ - `s_contacts_company` — gin, partial on `company`
81
+ - `s_contacts_email` — gin, partial on `email`
82
+ - `s_contacts_email2` — gin, partial on `email2`
83
+ - `s_contacts_firstname` — gin, partial on `firstname`
84
+ - `s_contacts_lastname` — gin, partial on `lastname`
85
+
86
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
87
+
88
+ # Operations
89
+
90
+ - list: `listContacts`
91
+ - get: `getContact`
92
+ - create: `createContact`
93
+ - update: `updateContact`
94
+ - delete: `deleteContact`
95
+ - exists: `existsContact`
96
+ <!-- okf:generated:end -->
@@ -0,0 +1,42 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Contacts To Contacts
4
+ description: Contact-to-contact relationships.
5
+ resource: zeyos://api/contacts2contacts
6
+ tags: [crm, generated]
7
+ api_backed: true
8
+ list_operation: listContactsToContacts
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
+ | `contact1` | integer | no | — | yes | [contacts](/entities/contacts.md) |
22
+ | `contact2` | integer | no | — | yes | [contacts](/entities/contacts.md) |
23
+
24
+ # Foreign Keys
25
+
26
+ - `contact1` → [contacts](/entities/contacts.md) (`contacts.ID`)
27
+ - `contact2` → [contacts](/entities/contacts.md) (`contacts.ID`)
28
+
29
+ # Indexes
30
+
31
+ - `fk_contacts2contacts_contact2` — btree on `contact2`
32
+ - `u_contacts2contacts_contact1_contact2` — btree, unique on `contact1, contact2`
33
+
34
+ # Operations
35
+
36
+ - list: `listContactsToContacts`
37
+ - get: `getContactToContact`
38
+ - create: `createContactToContact`
39
+ - update: `updateContactToContact`
40
+ - delete: `deleteContactToContact`
41
+ - exists: `existsContactToContact`
42
+ <!-- okf:generated:end -->
@@ -0,0 +1,83 @@
1
+ ---
2
+ type: ZeyOS Entity
3
+ title: Contracts
4
+ description: Long-lived commercial agreements.
5
+ resource: zeyos://api/contracts
6
+ tags: [crm, generated]
7
+ api_backed: true
8
+ list_operation: listContracts
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
+ | `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
+ | `visibility` | smallint | no | `0` | — | — |
26
+ | `name` | text | no | — | yes | — |
27
+ | `contractnum` | text | no | `''` | yes | — |
28
+ | `date` | bigint | no | `EXTRACT(epoch FROM now())` | yes | — |
29
+ | `datefrom` | bigint | yes | — | — | — |
30
+ | `dateto` | bigint | yes | — | — | — |
31
+ | `datecancel` | bigint | yes | — | — | — |
32
+ | `status` | smallint | no | `0` | yes | — |
33
+ | `currency` | character varying(3) | no | — | — | — |
34
+ | `exchangerate` | double precision | no | `1` | — | — |
35
+ | `billingcycle` | smallint | yes | — | — | — |
36
+ | `lastbilling` | bigint | yes | — | — | — |
37
+ | `description` | text | no | `''` | — | — |
38
+ | `contractitems` | json | yes | — | — | — |
39
+ | `billingitems` | json | yes | — | — | — |
40
+ | `procurementitems` | json | yes | — | — | — |
41
+ | `autobilling` | json | yes | — | — | — |
42
+
43
+ # Foreign Keys
44
+
45
+ - `fork` → [forks](/entities/forks.md) (`forks.ID`)
46
+ - `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
47
+ - `assigneduser` → [users](/entities/users.md) (`users.ID`)
48
+ - `account` → [accounts](/entities/accounts.md) (`accounts.ID`)
49
+
50
+ # Enums
51
+
52
+ ### `visibility`
53
+
54
+ `0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
55
+
56
+ ### `status`
57
+
58
+ `0` = DRAFT · `1` = AWAITINGAPPROVAL · `2` = APPROVED · `3` = DISMISSED · `4` = ACTIVE · `5` = INACTIVE · `6` = EXPIRED · `7` = CANCELLED · `8` = CLOSED
59
+
60
+ # Indexes
61
+
62
+ - `fk_contracts_account` — btree, partial on `account`
63
+ - `fk_contracts_assigneduser` — gin, partial on `assigneduser`
64
+ - `fk_contracts_fork` — gin, partial on `fork`
65
+ - `fk_contracts_ownergroup` — gin on `ownergroup`
66
+ - `i_contracts_autobilling` — gin, partial on `status`
67
+ - `i_contracts_date` — btree on `date`
68
+ - `i_contracts_nofork` — gin, partial on `fork`
69
+ - `i_contracts_noowner` — gin, partial on `ownergroup`
70
+ - `s_contracts_contractnum` — gin, partial on `contractnum`
71
+ - `s_contracts_name` — gin on `name`
72
+
73
+ > Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
74
+
75
+ # Operations
76
+
77
+ - list: `listContracts`
78
+ - get: `getContract`
79
+ - create: `createContract`
80
+ - update: `updateContract`
81
+ - delete: `deleteContract`
82
+ - exists: `existsContract`
83
+ <!-- okf:generated:end -->