@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.
- package/CHANGELOG.md +16 -0
- package/README.md +31 -1
- package/agents/README.md +2 -0
- package/agents/shared/zeyos-entity-map.md +5 -1
- package/agents/shared/zeyos-entity-reference.md +89 -33
- package/docs/03-cli/02-commands.md +28 -0
- package/docs/06-okf/01-overview.md +70 -0
- package/docs/06-okf/02-producing-and-consuming.md +46 -0
- package/docs/06-okf/03-keeping-fresh.md +53 -0
- package/docs/06-okf/04-loops.md +58 -0
- package/docs/06-okf/_category_.json +9 -0
- package/okf/concepts/counting-and-sums.md +10 -0
- package/okf/concepts/dates-unix-seconds.md +12 -0
- package/okf/concepts/enums.md +14 -0
- package/okf/concepts/filters-vs-filter.md +14 -0
- package/okf/concepts/index.md +8 -0
- package/okf/concepts/operationid-vocabulary.md +17 -0
- package/okf/concepts/visibility-column.md +13 -0
- package/okf/entities/accounts.md +82 -0
- package/okf/entities/actionsteps.md +84 -0
- package/okf/entities/addresses.md +50 -0
- package/okf/entities/applicationassets.md +43 -0
- package/okf/entities/applications.md +62 -0
- package/okf/entities/appointments.md +79 -0
- package/okf/entities/associations.md +41 -0
- package/okf/entities/binfiles.md +32 -0
- package/okf/entities/campaigns.md +66 -0
- package/okf/entities/categories.md +55 -0
- package/okf/entities/channels.md +54 -0
- package/okf/entities/comments.md +44 -0
- package/okf/entities/components.md +46 -0
- package/okf/entities/contacts.md +96 -0
- package/okf/entities/contacts2contacts.md +42 -0
- package/okf/entities/contracts.md +83 -0
- package/okf/entities/couponcodes.md +58 -0
- package/okf/entities/coupons.md +69 -0
- package/okf/entities/customfields.md +59 -0
- package/okf/entities/davservers.md +74 -0
- package/okf/entities/devices.md +65 -0
- package/okf/entities/documents.md +76 -0
- package/okf/entities/dunning.md +82 -0
- package/okf/entities/dunning2transactions.md +46 -0
- package/okf/entities/entities2channels.md +42 -0
- package/okf/entities/events.md +57 -0
- package/okf/entities/feedservers.md +67 -0
- package/okf/entities/files.md +50 -0
- package/okf/entities/follows.md +40 -0
- package/okf/entities/forks.md +54 -0
- package/okf/entities/groups.md +48 -0
- package/okf/entities/groups2users.md +44 -0
- package/okf/entities/index.md +93 -0
- package/okf/entities/invitations.md +53 -0
- package/okf/entities/items.md +95 -0
- package/okf/entities/ledgers.md +56 -0
- package/okf/entities/likes.md +40 -0
- package/okf/entities/links.md +70 -0
- package/okf/entities/mailinglists.md +67 -0
- package/okf/entities/mailingrecipients.md +45 -0
- package/okf/entities/mailservers.md +77 -0
- package/okf/entities/messagereads.md +40 -0
- package/okf/entities/messages.md +104 -0
- package/okf/entities/notes.md +73 -0
- package/okf/entities/objects.md +70 -0
- package/okf/entities/opportunities.md +87 -0
- package/okf/entities/participants.md +52 -0
- package/okf/entities/payments.md +76 -0
- package/okf/entities/permissions.md +46 -0
- package/okf/entities/pricelists.md +70 -0
- package/okf/entities/pricelists2accounts.md +46 -0
- package/okf/entities/prices.md +49 -0
- package/okf/entities/projects.md +72 -0
- package/okf/entities/records.md +75 -0
- package/okf/entities/relateditems.md +43 -0
- package/okf/entities/resources.md +55 -0
- package/okf/entities/services.md +64 -0
- package/okf/entities/stocktransactions.md +72 -0
- package/okf/entities/storages.md +56 -0
- package/okf/entities/suppliers.md +51 -0
- package/okf/entities/tasks.md +86 -0
- package/okf/entities/tickets.md +86 -0
- package/okf/entities/transactions.md +118 -0
- package/okf/entities/users.md +66 -0
- package/okf/entities/weblets.md +66 -0
- package/okf/index.md +11 -0
- package/okf/log.md +4 -0
- package/okf/metrics/cash-received.md +10 -0
- package/okf/metrics/index.md +6 -0
- package/okf/metrics/invoiced-net-revenue.md +16 -0
- package/okf/metrics/open-customers.md +14 -0
- package/okf/metrics/overdue-receivables.md +12 -0
- package/okf/playbooks/customer-360.md +12 -0
- package/okf/playbooks/index.md +5 -0
- package/okf/playbooks/revenue-this-year.md +19 -0
- package/okf/playbooks/ticket-work-packet.md +11 -0
- package/package.json +9 -2
- package/scripts/data/okf-curation.mjs +258 -0
- package/scripts/generate-client.mjs +4 -275
- package/scripts/generate-okf.mjs +241 -0
- package/scripts/lib/okf.mjs +272 -0
- package/scripts/lib/spec-model.mjs +325 -0
- package/src/index.js +4 -0
- package/src/runtime/okf.js +237 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Messages
|
|
4
|
+
description: Email and message records.
|
|
5
|
+
resource: zeyos://api/messages
|
|
6
|
+
tags: [messaging, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listMessages
|
|
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
|
+
| `mailserver` | integer | yes | — | yes | [mailservers](/entities/mailservers.md) |
|
|
25
|
+
| `ticket` | integer | yes | — | yes | [tickets](/entities/tickets.md) |
|
|
26
|
+
| `opportunity` | integer | yes | — | yes | [opportunities](/entities/opportunities.md) |
|
|
27
|
+
| `mailinglist` | integer | yes | — | yes | [mailinglists](/entities/mailinglists.md) |
|
|
28
|
+
| `reference` | integer | yes | — | yes | [messages](/entities/messages.md) |
|
|
29
|
+
| `binfile` | integer | yes | — | yes | [binfiles](/entities/binfiles.md) |
|
|
30
|
+
| `mailbox` | smallint | no | `0` | — | — |
|
|
31
|
+
| `verified` | smallint | no | `0` | — | — |
|
|
32
|
+
| `date` | bigint | no | `date_part('epoch', now())` | yes | — |
|
|
33
|
+
| `subject` | text | no | `''` | yes | — |
|
|
34
|
+
| `sender` | text | no | `''` | yes | — |
|
|
35
|
+
| `sender_email` | text | no | `''` | — | — |
|
|
36
|
+
| `sender_name` | text | no | `''` | — | — |
|
|
37
|
+
| `to` | text | no | `''` | yes | — |
|
|
38
|
+
| `to_email` | text | no | `''` | — | — |
|
|
39
|
+
| `to_name` | text | no | `''` | — | — |
|
|
40
|
+
| `to_count` | integer | no | `0` | — | — |
|
|
41
|
+
| `cc` | text | no | `''` | — | — |
|
|
42
|
+
| `bcc` | text | no | `''` | — | — |
|
|
43
|
+
| `contenttype` | text | no | `''` | — | — |
|
|
44
|
+
| `text` | text | no | `''` | — | — |
|
|
45
|
+
| `attachments` | text[] | yes | — | — | — |
|
|
46
|
+
| `senddate` | bigint | yes | — | — | — |
|
|
47
|
+
| `senderror` | text | no | `''` | — | — |
|
|
48
|
+
| `messageid` | text | no | `''` | yes | — |
|
|
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
|
+
- `mailserver` → [mailservers](/entities/mailservers.md) (`mailservers.ID`)
|
|
56
|
+
- `ticket` → [tickets](/entities/tickets.md) (`tickets.ID`)
|
|
57
|
+
- `opportunity` → [opportunities](/entities/opportunities.md) (`opportunities.ID`)
|
|
58
|
+
- `mailinglist` → [mailinglists](/entities/mailinglists.md) (`mailinglists.ID`)
|
|
59
|
+
- `reference` → [messages](/entities/messages.md) (`messages.ID`)
|
|
60
|
+
- `binfile` → [binfiles](/entities/binfiles.md) (`binfiles.ID`)
|
|
61
|
+
|
|
62
|
+
# Enums
|
|
63
|
+
|
|
64
|
+
### `mailbox`
|
|
65
|
+
|
|
66
|
+
`0` = INBOX · `1` = DRAFTS · `2` = SENT · `3` = TEMPLATES · `4` = MAILINGS · `5` = ARCHIVE · `6` = TRASH · `7` = JUNK
|
|
67
|
+
|
|
68
|
+
# Indexes
|
|
69
|
+
|
|
70
|
+
- `fk_messages_binfile` — btree, partial on `binfile`
|
|
71
|
+
- `fk_messages_fork` — gin, partial on `fork`
|
|
72
|
+
- `fk_messages_mailinglist` — gin, partial on `mailinglist`
|
|
73
|
+
- `fk_messages_mailserver` — gin, partial on `mailserver`
|
|
74
|
+
- `fk_messages_opportunity` — btree, partial on `opportunity`
|
|
75
|
+
- `fk_messages_ownergroup` — gin, partial on `ownergroup`
|
|
76
|
+
- `fk_messages_owneruser` — gin, partial on `owneruser`
|
|
77
|
+
- `fk_messages_reference` — btree, partial on `reference`
|
|
78
|
+
- `fk_messages_ticket` — btree, partial on `ticket`
|
|
79
|
+
- `i_messages_inbox_date` — btree, partial on `date`
|
|
80
|
+
- `i_messages_messageid` — btree, partial on `messageid`
|
|
81
|
+
- `i_messages_nofork` — gin, partial on `fork`
|
|
82
|
+
- `i_messages_noowner` — gin, partial on `ownergroup`
|
|
83
|
+
- `i_messages_regular_date` — btree, partial on `date`
|
|
84
|
+
- `i_messages_sendmail` — btree, partial on `mailserver`
|
|
85
|
+
- `i_messages_trash_date` — btree, partial on `date`
|
|
86
|
+
- `s_messages_sender` — gin, partial on `sender`
|
|
87
|
+
- `s_messages_subject` — gin, partial on `subject`
|
|
88
|
+
- `s_messages_to` — gin, partial on `to`
|
|
89
|
+
|
|
90
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
91
|
+
|
|
92
|
+
# Operations
|
|
93
|
+
|
|
94
|
+
- list: `listMessages`
|
|
95
|
+
- get: `getMessage`
|
|
96
|
+
- create: `createMessage`
|
|
97
|
+
- update: `updateMessage`
|
|
98
|
+
- delete: `deleteMessage`
|
|
99
|
+
- exists: `existsMessage`
|
|
100
|
+
<!-- okf:generated:end -->
|
|
101
|
+
|
|
102
|
+
# Notes
|
|
103
|
+
|
|
104
|
+
No direct `account` foreign key — link via `ticket`/`opportunity`/`mailinglist`/`reference`, or resolve customer email addresses first. Reconstruct threads via `reference`/`messageid`/`subject`.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Notes
|
|
4
|
+
description: Text-centric internal knowledge items.
|
|
5
|
+
resource: zeyos://api/notes
|
|
6
|
+
tags: [knowledge, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listNotes
|
|
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
|
+
| `binfile` | integer | yes | — | yes | [binfiles](/entities/binfiles.md) |
|
|
26
|
+
| `visibility` | smallint | no | `0` | — | — |
|
|
27
|
+
| `name` | text | no | — | yes | — |
|
|
28
|
+
| `status` | smallint | no | `0` | — | — |
|
|
29
|
+
| `contenttype` | text | no | `''` | — | — |
|
|
30
|
+
| `text` | text | no | `''` | — | — |
|
|
31
|
+
| `attachments` | text[] | yes | — | — | — |
|
|
32
|
+
| `description` | text | no | `''` | — | — |
|
|
33
|
+
|
|
34
|
+
# Foreign Keys
|
|
35
|
+
|
|
36
|
+
- `fork` → [forks](/entities/forks.md) (`forks.ID`)
|
|
37
|
+
- `owneruser` → [users](/entities/users.md) (`users.ID`)
|
|
38
|
+
- `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
|
|
39
|
+
- `assigneduser` → [users](/entities/users.md) (`users.ID`)
|
|
40
|
+
- `binfile` → [binfiles](/entities/binfiles.md) (`binfiles.ID`)
|
|
41
|
+
|
|
42
|
+
# Enums
|
|
43
|
+
|
|
44
|
+
### `visibility`
|
|
45
|
+
|
|
46
|
+
`0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
|
|
47
|
+
|
|
48
|
+
### `status`
|
|
49
|
+
|
|
50
|
+
`0` = DRAFT · `1` = FEEDBACKREQUIRED · `2` = INREVISION · `3` = AWAITINGAPPROVAL · `4` = FINAL · `5` = OBSOLETE
|
|
51
|
+
|
|
52
|
+
# Indexes
|
|
53
|
+
|
|
54
|
+
- `fk_notes_assigneduser` — gin, partial on `assigneduser`
|
|
55
|
+
- `fk_notes_binfile` — btree, partial on `binfile`
|
|
56
|
+
- `fk_notes_fork` — gin, partial on `fork`
|
|
57
|
+
- `fk_notes_ownergroup` — gin, partial on `ownergroup`
|
|
58
|
+
- `fk_notes_owneruser` — gin, partial on `owneruser`
|
|
59
|
+
- `i_notes_nofork` — gin, partial on `fork`
|
|
60
|
+
- `i_notes_noowner` — gin, partial on `ownergroup`
|
|
61
|
+
- `s_notes_name` — gin on `name`
|
|
62
|
+
|
|
63
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
64
|
+
|
|
65
|
+
# Operations
|
|
66
|
+
|
|
67
|
+
- list: `listNotes`
|
|
68
|
+
- get: `getNote`
|
|
69
|
+
- create: `createNote`
|
|
70
|
+
- update: `updateNote`
|
|
71
|
+
- delete: `deleteNote`
|
|
72
|
+
- exists: `existsNote`
|
|
73
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Objects
|
|
4
|
+
description: Custom object records with arbitrary JSON payloads.
|
|
5
|
+
resource: zeyos://api/objects
|
|
6
|
+
tags: [platform, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listObjects
|
|
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
|
+
| `binfile` | integer | yes | — | yes | [binfiles](/entities/binfiles.md) |
|
|
26
|
+
| `visibility` | smallint | no | `0` | — | — |
|
|
27
|
+
| `name` | text | no | — | yes | — |
|
|
28
|
+
| `entity` | text | no | — | yes | — |
|
|
29
|
+
| `date` | bigint | no | `EXTRACT(epoch FROM now())` | yes | — |
|
|
30
|
+
| `description` | text | no | `''` | — | — |
|
|
31
|
+
| `data` | json | yes | — | — | — |
|
|
32
|
+
|
|
33
|
+
# Foreign Keys
|
|
34
|
+
|
|
35
|
+
- `fork` → [forks](/entities/forks.md) (`forks.ID`)
|
|
36
|
+
- `owneruser` → [users](/entities/users.md) (`users.ID`)
|
|
37
|
+
- `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
|
|
38
|
+
- `assigneduser` → [users](/entities/users.md) (`users.ID`)
|
|
39
|
+
- `binfile` → [binfiles](/entities/binfiles.md) (`binfiles.ID`)
|
|
40
|
+
|
|
41
|
+
# Enums
|
|
42
|
+
|
|
43
|
+
### `visibility`
|
|
44
|
+
|
|
45
|
+
`0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
|
|
46
|
+
|
|
47
|
+
# Indexes
|
|
48
|
+
|
|
49
|
+
- `fk_objects_assigneduser` — gin, partial on `assigneduser`
|
|
50
|
+
- `fk_objects_binfile` — btree, partial on `binfile`
|
|
51
|
+
- `fk_objects_fork` — gin, partial on `fork`
|
|
52
|
+
- `fk_objects_ownergroup` — gin, partial on `ownergroup`
|
|
53
|
+
- `fk_objects_owneruser` — gin, partial on `owneruser`
|
|
54
|
+
- `i_objects_date` — btree on `date`
|
|
55
|
+
- `i_objects_entity` — gin on `entity`
|
|
56
|
+
- `i_objects_nofork` — gin, partial on `fork`
|
|
57
|
+
- `i_objects_noowner` — gin, partial on `ownergroup`
|
|
58
|
+
- `s_objects_name` — gin on `name`
|
|
59
|
+
|
|
60
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
61
|
+
|
|
62
|
+
# Operations
|
|
63
|
+
|
|
64
|
+
- list: `listObjects`
|
|
65
|
+
- get: `getObject`
|
|
66
|
+
- create: `createObject`
|
|
67
|
+
- update: `updateObject`
|
|
68
|
+
- delete: `deleteObject`
|
|
69
|
+
- exists: `existsObject`
|
|
70
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Opportunities
|
|
4
|
+
description: Sales pipeline and deal records.
|
|
5
|
+
resource: zeyos://api/opportunities
|
|
6
|
+
tags: [crm, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listOpportunities
|
|
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
|
+
| `contact` | integer | yes | — | yes | [contacts](/entities/contacts.md) |
|
|
26
|
+
| `campaign` | integer | yes | — | yes | [campaigns](/entities/campaigns.md) |
|
|
27
|
+
| `visibility` | smallint | no | `0` | — | — |
|
|
28
|
+
| `name` | text | no | — | yes | — |
|
|
29
|
+
| `opportunitynum` | text | no | `''` | yes | — |
|
|
30
|
+
| `date` | bigint | no | `EXTRACT(epoch FROM now())` | yes | — |
|
|
31
|
+
| `duedate` | bigint | yes | — | — | — |
|
|
32
|
+
| `status` | smallint | no | `0` | — | — |
|
|
33
|
+
| `priority` | smallint | no | `2` | — | — |
|
|
34
|
+
| `probability` | smallint | no | `0` | — | — |
|
|
35
|
+
| `worstcase` | double precision | no | `0` | — | — |
|
|
36
|
+
| `mostlikely` | double precision | no | `0` | — | — |
|
|
37
|
+
| `upside` | double precision | no | `0` | — | — |
|
|
38
|
+
| `description` | text | no | `''` | — | — |
|
|
39
|
+
|
|
40
|
+
# Foreign Keys
|
|
41
|
+
|
|
42
|
+
- `fork` → [forks](/entities/forks.md) (`forks.ID`)
|
|
43
|
+
- `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
|
|
44
|
+
- `assigneduser` → [users](/entities/users.md) (`users.ID`)
|
|
45
|
+
- `account` → [accounts](/entities/accounts.md) (`accounts.ID`)
|
|
46
|
+
- `contact` → [contacts](/entities/contacts.md) (`contacts.ID`)
|
|
47
|
+
- `campaign` → [campaigns](/entities/campaigns.md) (`campaigns.ID`)
|
|
48
|
+
|
|
49
|
+
# Enums
|
|
50
|
+
|
|
51
|
+
### `visibility`
|
|
52
|
+
|
|
53
|
+
`0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
|
|
54
|
+
|
|
55
|
+
### `status`
|
|
56
|
+
|
|
57
|
+
`0` = UNEVALUATED · `1` = ELIGIBLE · `2` = FEEDBACKREQUIRED · `3` = INNEGOTIATION · `4` = OFFERED · `5` = ACCEPTED · `6` = REJECTED
|
|
58
|
+
|
|
59
|
+
### `priority`
|
|
60
|
+
|
|
61
|
+
`0` = LOWEST · `1` = LOW · `2` = MEDIUM · `3` = HIGH · `4` = HIGHEST
|
|
62
|
+
|
|
63
|
+
# Indexes
|
|
64
|
+
|
|
65
|
+
- `fk_opportunities_account` — btree, partial on `account`
|
|
66
|
+
- `fk_opportunities_assigneduser` — gin, partial on `assigneduser`
|
|
67
|
+
- `fk_opportunities_campaign` — btree, partial on `campaign`
|
|
68
|
+
- `fk_opportunities_contact` — btree, partial on `contact`
|
|
69
|
+
- `fk_opportunities_fork` — gin, partial on `fork`
|
|
70
|
+
- `fk_opportunities_ownergroup` — gin on `ownergroup`
|
|
71
|
+
- `i_opportunities_date` — btree on `date`
|
|
72
|
+
- `i_opportunities_nofork` — gin, partial on `fork`
|
|
73
|
+
- `i_opportunities_noowner` — gin, partial on `ownergroup`
|
|
74
|
+
- `s_opportunities_name` — gin on `name`
|
|
75
|
+
- `s_opportunities_opportunitynum` — gin, partial on `opportunitynum`
|
|
76
|
+
|
|
77
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
78
|
+
|
|
79
|
+
# Operations
|
|
80
|
+
|
|
81
|
+
- list: `listOpportunities`
|
|
82
|
+
- get: `getOpportunity`
|
|
83
|
+
- create: `createOpportunity`
|
|
84
|
+
- update: `updateOpportunity`
|
|
85
|
+
- delete: `deleteOpportunity`
|
|
86
|
+
- exists: `existsOpportunity`
|
|
87
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Participants
|
|
4
|
+
description: Contacts enrolled in campaigns or mailing lists.
|
|
5
|
+
resource: zeyos://api/participants
|
|
6
|
+
tags: [outreach, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listParticipants
|
|
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
|
+
| `mailinglist` | integer | yes | — | yes | [mailinglists](/entities/mailinglists.md) |
|
|
22
|
+
| `campaign` | integer | yes | — | yes | [campaigns](/entities/campaigns.md) |
|
|
23
|
+
| `contact` | integer | yes | — | yes | [contacts](/entities/contacts.md) |
|
|
24
|
+
| `name` | text | no | — | yes | — |
|
|
25
|
+
| `phone` | text | no | `''` | — | — |
|
|
26
|
+
| `email` | text | no | `''` | yes | — |
|
|
27
|
+
|
|
28
|
+
# Foreign Keys
|
|
29
|
+
|
|
30
|
+
- `mailinglist` → [mailinglists](/entities/mailinglists.md) (`mailinglists.ID`)
|
|
31
|
+
- `campaign` → [campaigns](/entities/campaigns.md) (`campaigns.ID`)
|
|
32
|
+
- `contact` → [contacts](/entities/contacts.md) (`contacts.ID`)
|
|
33
|
+
|
|
34
|
+
# Indexes
|
|
35
|
+
|
|
36
|
+
- `fk_participants_campaign` — gin, partial on `campaign`
|
|
37
|
+
- `fk_participants_contact` — btree, partial on `contact`
|
|
38
|
+
- `fk_participants_mailinglist` — gin, partial on `mailinglist`
|
|
39
|
+
- `s_participants_email` — gin, partial on `email`
|
|
40
|
+
- `s_participants_name` — gin on `name`
|
|
41
|
+
|
|
42
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
43
|
+
|
|
44
|
+
# Operations
|
|
45
|
+
|
|
46
|
+
- list: `listParticipants`
|
|
47
|
+
- get: `getParticipant`
|
|
48
|
+
- create: `createParticipant`
|
|
49
|
+
- update: `updateParticipant`
|
|
50
|
+
- delete: `deleteParticipant`
|
|
51
|
+
- exists: `existsParticipant`
|
|
52
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Payments
|
|
4
|
+
description: Cash movement records.
|
|
5
|
+
resource: zeyos://api/payments
|
|
6
|
+
tags: [billing, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listPayments
|
|
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
|
+
| `ledger` | integer | yes | — | yes | [ledgers](/entities/ledgers.md) |
|
|
25
|
+
| `transaction` | integer | yes | — | yes | [transactions](/entities/transactions.md) |
|
|
26
|
+
| `account` | integer | yes | — | yes | [accounts](/entities/accounts.md) |
|
|
27
|
+
| `date` | bigint | no | `date_part('epoch', now())` | yes | — |
|
|
28
|
+
| `subject` | text | no | `''` | yes | — |
|
|
29
|
+
| `status` | smallint | no | `0` | — | — |
|
|
30
|
+
| `amount` | double precision | no | — | — | — |
|
|
31
|
+
| `autoadvance` | smallint | no | `0` | — | — |
|
|
32
|
+
| `description` | text | no | `''` | — | — |
|
|
33
|
+
|
|
34
|
+
# Foreign Keys
|
|
35
|
+
|
|
36
|
+
- `fork` → [forks](/entities/forks.md) (`forks.ID`)
|
|
37
|
+
- `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
|
|
38
|
+
- `assigneduser` → [users](/entities/users.md) (`users.ID`)
|
|
39
|
+
- `ledger` → [ledgers](/entities/ledgers.md) (`ledgers.ID`)
|
|
40
|
+
- `transaction` → [transactions](/entities/transactions.md) (`transactions.ID`)
|
|
41
|
+
- `account` → [accounts](/entities/accounts.md) (`accounts.ID`)
|
|
42
|
+
|
|
43
|
+
# Enums
|
|
44
|
+
|
|
45
|
+
### `status`
|
|
46
|
+
|
|
47
|
+
`0` = DRAFT · `1` = COMPLETED · `2` = CANCELLED · `3` = BOOKED
|
|
48
|
+
|
|
49
|
+
# Indexes
|
|
50
|
+
|
|
51
|
+
- `fk_payments_account` — btree, partial on `account`
|
|
52
|
+
- `fk_payments_assigneduser` — gin, partial on `assigneduser`
|
|
53
|
+
- `fk_payments_fork` — gin, partial on `fork`
|
|
54
|
+
- `fk_payments_ledger` — gin, partial on `ledger`
|
|
55
|
+
- `fk_payments_ownergroup` — gin on `ownergroup`
|
|
56
|
+
- `fk_payments_transaction` — btree, partial on `transaction`
|
|
57
|
+
- `i_payments_date` — btree on `date`
|
|
58
|
+
- `i_payments_nofork` — gin, partial on `fork`
|
|
59
|
+
- `i_payments_noowner` — gin, partial on `ownergroup`
|
|
60
|
+
- `s_payments_subject` — gin, partial on `subject`
|
|
61
|
+
|
|
62
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
63
|
+
|
|
64
|
+
# Operations
|
|
65
|
+
|
|
66
|
+
- list: `listPayments`
|
|
67
|
+
- get: `getPayment`
|
|
68
|
+
- create: `createPayment`
|
|
69
|
+
- update: `updatePayment`
|
|
70
|
+
- delete: `deletePayment`
|
|
71
|
+
- exists: `existsPayment`
|
|
72
|
+
<!-- okf:generated:end -->
|
|
73
|
+
|
|
74
|
+
# Notes
|
|
75
|
+
|
|
76
|
+
Cash basis. Links to a `transaction` or directly to an `account`. Sum `amount` for cash received.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Permissions
|
|
4
|
+
description: Group-level permission grants.
|
|
5
|
+
resource: zeyos://api/permissions
|
|
6
|
+
tags: [platform, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listPermissions
|
|
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
|
+
| `fork` | integer | yes | — | yes | [forks](/entities/forks.md) |
|
|
23
|
+
| `application` | integer | yes | — | yes | [applications](/entities/applications.md) |
|
|
24
|
+
| `identifier` | character varying(200) | yes | — | yes | — |
|
|
25
|
+
| `writable` | smallint | no | `0` | — | — |
|
|
26
|
+
|
|
27
|
+
# Foreign Keys
|
|
28
|
+
|
|
29
|
+
- `group` → [groups](/entities/groups.md) (`groups.ID`)
|
|
30
|
+
- `fork` → [forks](/entities/forks.md) (`forks.ID`)
|
|
31
|
+
- `application` → [applications](/entities/applications.md) (`applications.ID`)
|
|
32
|
+
|
|
33
|
+
# Indexes
|
|
34
|
+
|
|
35
|
+
- `fk_permissions_application` — gin, partial on `application`
|
|
36
|
+
- `fk_permissions_fork` — gin, partial on `fork`
|
|
37
|
+
- `u_permissions_group_fork_application_identifier` — btree, unique on `group, fork, application, identifier`
|
|
38
|
+
|
|
39
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
40
|
+
|
|
41
|
+
# Operations
|
|
42
|
+
|
|
43
|
+
- list: `listPermissions`
|
|
44
|
+
- get: `getPermission`
|
|
45
|
+
- exists: `existsPermission`
|
|
46
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Price Lists
|
|
4
|
+
description: Price list definitions.
|
|
5
|
+
resource: zeyos://api/pricelists
|
|
6
|
+
tags: [commerce, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listPriceLists
|
|
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
|
+
| `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
|
|
22
|
+
| `lastmodified` | bigint | no | `date_part('epoch', now())` | — | — |
|
|
23
|
+
| `activity` | smallint | no | `0` | — | — |
|
|
24
|
+
| `name` | text | no | — | yes | — |
|
|
25
|
+
| `type` | smallint | no | `0` | — | — |
|
|
26
|
+
| `currency` | character varying(3) | no | — | — | — |
|
|
27
|
+
| `discount` | double precision | no | `0` | — | — |
|
|
28
|
+
| `datefrom` | bigint | yes | — | — | — |
|
|
29
|
+
| `dateto` | bigint | yes | — | — | — |
|
|
30
|
+
| `applytoall` | smallint | no | `0` | — | — |
|
|
31
|
+
| `description` | text | no | `''` | — | — |
|
|
32
|
+
|
|
33
|
+
# Foreign Keys
|
|
34
|
+
|
|
35
|
+
- `fork` → [forks](/entities/forks.md) (`forks.ID`)
|
|
36
|
+
- `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
|
|
37
|
+
|
|
38
|
+
# Enums
|
|
39
|
+
|
|
40
|
+
### `activity`
|
|
41
|
+
|
|
42
|
+
`0` = ACTIVE · `1` = DEACTIVATED · `2` = DELETED
|
|
43
|
+
|
|
44
|
+
### `type`
|
|
45
|
+
|
|
46
|
+
`0` = BILLING_MIN · `1` = BILLING_MAX · `2` = PROCUREMENT_MIN · `3` = PROCUREMENT_MAX · `4` = PRODUCTION_MIN · `5` = PRODUCTION_MAX
|
|
47
|
+
|
|
48
|
+
# Indexes
|
|
49
|
+
|
|
50
|
+
- `fk_pricelists_fork` — gin, partial on `fork`
|
|
51
|
+
- `fk_pricelists_ownergroup` — gin on `ownergroup`
|
|
52
|
+
- `i_pricelists_nofork` — gin, partial on `fork`
|
|
53
|
+
- `i_pricelists_noowner` — gin, partial on `ownergroup`
|
|
54
|
+
- `s_pricelists_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: `listPriceLists`
|
|
61
|
+
- get: `getPriceList`
|
|
62
|
+
- create: `createPriceList`
|
|
63
|
+
- update: `updatePriceList`
|
|
64
|
+
- delete: `deletePriceList`
|
|
65
|
+
- exists: `existsPriceList`
|
|
66
|
+
<!-- okf:generated:end -->
|
|
67
|
+
|
|
68
|
+
# Notes
|
|
69
|
+
|
|
70
|
+
operationId: `listPriceLists`.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Price Lists To Accounts
|
|
4
|
+
description: Account-to-price-list assignments.
|
|
5
|
+
resource: zeyos://api/pricelists2accounts
|
|
6
|
+
tags: [commerce, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listPriceListsToAccounts
|
|
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
|
+
| `pricelist` | integer | no | — | yes | [pricelists](/entities/pricelists.md) |
|
|
22
|
+
| `account` | integer | no | — | yes | [accounts](/entities/accounts.md) |
|
|
23
|
+
|
|
24
|
+
# Foreign Keys
|
|
25
|
+
|
|
26
|
+
- `pricelist` → [pricelists](/entities/pricelists.md) (`pricelists.ID`)
|
|
27
|
+
- `account` → [accounts](/entities/accounts.md) (`accounts.ID`)
|
|
28
|
+
|
|
29
|
+
# Indexes
|
|
30
|
+
|
|
31
|
+
- `fk_pricelists2accounts_account` — btree on `account`
|
|
32
|
+
- `u_pricelists2accounts_pricelist_account` — btree, unique on `pricelist, account`
|
|
33
|
+
|
|
34
|
+
# Operations
|
|
35
|
+
|
|
36
|
+
- list: `listPriceListsToAccounts`
|
|
37
|
+
- get: `getPriceListToAccount`
|
|
38
|
+
- create: `createPriceListToAccount`
|
|
39
|
+
- update: `updatePriceListToAccount`
|
|
40
|
+
- delete: `deletePriceListToAccount`
|
|
41
|
+
- exists: `existsPriceListToAccount`
|
|
42
|
+
<!-- okf:generated:end -->
|
|
43
|
+
|
|
44
|
+
# Notes
|
|
45
|
+
|
|
46
|
+
operationId: `listPriceListsToAccounts`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Prices
|
|
4
|
+
description: Item prices within a price list.
|
|
5
|
+
resource: zeyos://api/prices
|
|
6
|
+
tags: [commerce, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listPrices
|
|
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
|
+
| `pricelist` | integer | no | — | yes | [pricelists](/entities/pricelists.md) |
|
|
23
|
+
| `price` | double precision | yes | — | — | — |
|
|
24
|
+
| `rebate` | double precision | no | `0` | — | — |
|
|
25
|
+
| `discount` | double precision | yes | — | — | — |
|
|
26
|
+
| `minamount` | double precision | no | `0` | — | — |
|
|
27
|
+
| `costprice` | double precision | yes | — | — | — |
|
|
28
|
+
|
|
29
|
+
# Foreign Keys
|
|
30
|
+
|
|
31
|
+
- `item` → [items](/entities/items.md) (`items.ID`)
|
|
32
|
+
- `pricelist` → [pricelists](/entities/pricelists.md) (`pricelists.ID`)
|
|
33
|
+
|
|
34
|
+
# Indexes
|
|
35
|
+
|
|
36
|
+
- `fk_prices_item` — btree on `item`
|
|
37
|
+
- `fk_prices_pricelist` — gin on `pricelist`
|
|
38
|
+
|
|
39
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
40
|
+
|
|
41
|
+
# Operations
|
|
42
|
+
|
|
43
|
+
- list: `listPrices`
|
|
44
|
+
- get: `getPrice`
|
|
45
|
+
- create: `createPrice`
|
|
46
|
+
- update: `updatePrice`
|
|
47
|
+
- delete: `deletePrice`
|
|
48
|
+
- exists: `existsPrice`
|
|
49
|
+
<!-- okf:generated:end -->
|