@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,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Projects
|
|
4
|
+
description: Top-level initiatives.
|
|
5
|
+
resource: zeyos://api/projects
|
|
6
|
+
tags: [work, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listProjects
|
|
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
|
+
| `account` | integer | yes | — | yes | [accounts](/entities/accounts.md) |
|
|
26
|
+
| `visibility` | smallint | no | `0` | — | — |
|
|
27
|
+
| `name` | text | no | — | yes | — |
|
|
28
|
+
| `projectnum` | text | no | `''` | yes | — |
|
|
29
|
+
| `status` | smallint | no | `0` | — | — |
|
|
30
|
+
| `description` | text | no | `''` | — | — |
|
|
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
|
+
- `assigneduser` → [users](/entities/users.md) (`users.ID`)
|
|
38
|
+
- `account` → [accounts](/entities/accounts.md) (`accounts.ID`)
|
|
39
|
+
|
|
40
|
+
# Enums
|
|
41
|
+
|
|
42
|
+
### `visibility`
|
|
43
|
+
|
|
44
|
+
`0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
|
|
45
|
+
|
|
46
|
+
### `status`
|
|
47
|
+
|
|
48
|
+
`0` = DRAFT · `1` = NOTSTARTED · `2` = AWAITINGAPPROVAL · `3` = APPROVED · `4` = DISMISSED · `5` = ACTIVE · `6` = INACTIVE · `7` = TESTING · `8` = CANCELLED · `9` = COMPLETED · `10` = FAILED · `11` = BOOKED
|
|
49
|
+
|
|
50
|
+
# Indexes
|
|
51
|
+
|
|
52
|
+
- `fk_projects_account` — btree, partial on `account`
|
|
53
|
+
- `fk_projects_assigneduser` — gin, partial on `assigneduser`
|
|
54
|
+
- `fk_projects_fork` — gin, partial on `fork`
|
|
55
|
+
- `fk_projects_ownergroup` — gin, partial on `ownergroup`
|
|
56
|
+
- `fk_projects_owneruser` — gin, partial on `owneruser`
|
|
57
|
+
- `i_projects_nofork` — gin, partial on `fork`
|
|
58
|
+
- `i_projects_noowner` — gin, partial on `ownergroup`
|
|
59
|
+
- `s_projects_name` — gin on `name`
|
|
60
|
+
- `s_projects_projectnum` — gin, partial on `projectnum`
|
|
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: `listProjects`
|
|
67
|
+
- get: `getProject`
|
|
68
|
+
- create: `createProject`
|
|
69
|
+
- update: `updateProject`
|
|
70
|
+
- delete: `deleteProject`
|
|
71
|
+
- exists: `existsProject`
|
|
72
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Records
|
|
4
|
+
description: Generic feed and discussion records with entity/index references.
|
|
5
|
+
resource: zeyos://api/records
|
|
6
|
+
tags: [collaboration, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listRecords
|
|
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
|
+
| `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 | — | 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
|
+
| `entity` | t_entity | yes | — | yes | — |
|
|
26
|
+
| `index` | integer | yes | — | yes | — |
|
|
27
|
+
| `channel` | integer | yes | — | yes | [channels](/entities/channels.md) |
|
|
28
|
+
| `flag` | smallint | no | `0` | — | — |
|
|
29
|
+
| `date` | bigint | no | `date_part('epoch', now())` | yes | — |
|
|
30
|
+
| `stickydate` | bigint | yes | — | yes | — |
|
|
31
|
+
| `sender` | text | no | `''` | yes | — |
|
|
32
|
+
| `location` | text | no | `''` | — | — |
|
|
33
|
+
| `text` | text | no | `''` | yes | — |
|
|
34
|
+
| `meta` | json | yes | — | — | — |
|
|
35
|
+
|
|
36
|
+
# Foreign Keys
|
|
37
|
+
|
|
38
|
+
- `fork` → [forks](/entities/forks.md) (`forks.ID`)
|
|
39
|
+
- `owneruser` → [users](/entities/users.md) (`users.ID`)
|
|
40
|
+
- `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
|
|
41
|
+
- `assigneduser` → [users](/entities/users.md) (`users.ID`)
|
|
42
|
+
- `channel` → [channels](/entities/channels.md) (`channels.ID`)
|
|
43
|
+
|
|
44
|
+
# Enums
|
|
45
|
+
|
|
46
|
+
### `flag`
|
|
47
|
+
|
|
48
|
+
`0` = REGULAR · `1` = ASSOCONLY · `2` = MINDLOGONLY · `3` = MONITOR · `4` = FEED
|
|
49
|
+
|
|
50
|
+
# Indexes
|
|
51
|
+
|
|
52
|
+
- `fk_records_assigneduser` — gin, partial on `assigneduser`
|
|
53
|
+
- `fk_records_channel` — btree, partial on `channel`
|
|
54
|
+
- `fk_records_fork` — gin, partial on `fork`
|
|
55
|
+
- `fk_records_ownergroup` — gin, partial on `ownergroup`
|
|
56
|
+
- `fk_records_owneruser` — gin, partial on `owneruser`
|
|
57
|
+
- `i_records_creator` — gin, partial on `creator`
|
|
58
|
+
- `i_records_date` — btree on `date`
|
|
59
|
+
- `i_records_entity_index` — btree, partial on `entity, index`
|
|
60
|
+
- `i_records_noowner` — gin, partial on `ownergroup`
|
|
61
|
+
- `i_records_stickydate` — btree, partial on `stickydate`
|
|
62
|
+
- `s_records_sender` — gin, partial on `sender`
|
|
63
|
+
- `s_records_text` — gin, partial on `text`
|
|
64
|
+
|
|
65
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
66
|
+
|
|
67
|
+
# Operations
|
|
68
|
+
|
|
69
|
+
- list: `listRecords`
|
|
70
|
+
- get: `getRecord`
|
|
71
|
+
- create: `createRecord`
|
|
72
|
+
- update: `updateRecord`
|
|
73
|
+
- delete: `deleteRecord`
|
|
74
|
+
- exists: `existsRecord`
|
|
75
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Related Items
|
|
4
|
+
description: Related product links (cross-sell, substitute, accessory).
|
|
5
|
+
resource: zeyos://api/relateditems
|
|
6
|
+
tags: [commerce, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listRelatedItems
|
|
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 | `EXTRACT(epoch FROM now())` | — | — |
|
|
20
|
+
| `lastmodified` | bigint | no | `EXTRACT(epoch FROM now())` | — | — |
|
|
21
|
+
| `item` | integer | no | — | yes | [items](/entities/items.md) |
|
|
22
|
+
| `relateditem` | integer | no | — | yes | [items](/entities/items.md) |
|
|
23
|
+
| `relation` | text | no | `''` | — | — |
|
|
24
|
+
|
|
25
|
+
# Foreign Keys
|
|
26
|
+
|
|
27
|
+
- `item` → [items](/entities/items.md) (`items.ID`)
|
|
28
|
+
- `relateditem` → [items](/entities/items.md) (`items.ID`)
|
|
29
|
+
|
|
30
|
+
# Indexes
|
|
31
|
+
|
|
32
|
+
- `fk_relateditems_relateditem` — btree on `relateditem`
|
|
33
|
+
- `u_relateditems_item_relateditem` — btree, unique on `item, relateditem`
|
|
34
|
+
|
|
35
|
+
# Operations
|
|
36
|
+
|
|
37
|
+
- list: `listRelatedItems`
|
|
38
|
+
- get: `getRelatedItem`
|
|
39
|
+
- create: `createRelatedItem`
|
|
40
|
+
- update: `updateRelatedItem`
|
|
41
|
+
- delete: `deleteRelatedItem`
|
|
42
|
+
- exists: `existsRelatedItem`
|
|
43
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Resources
|
|
4
|
+
description: Named resources linked to an application or standalone.
|
|
5
|
+
resource: zeyos://api/resources
|
|
6
|
+
tags: [platform, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listResources
|
|
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
|
+
| `application` | integer | yes | — | yes | [applications](/entities/applications.md) |
|
|
22
|
+
| `activity` | smallint | no | `0` | — | — |
|
|
23
|
+
| `name` | text | no | — | yes | — |
|
|
24
|
+
| `identifier` | character varying(200) | no | — | yes | — |
|
|
25
|
+
| `mimetype` | text | no | `'text/x-zymba'` | — | — |
|
|
26
|
+
| `public` | smallint | no | `0` | — | — |
|
|
27
|
+
| `binfile` | integer | yes | — | yes | [binfiles](/entities/binfiles.md) |
|
|
28
|
+
|
|
29
|
+
# Foreign Keys
|
|
30
|
+
|
|
31
|
+
- `application` → [applications](/entities/applications.md) (`applications.ID`)
|
|
32
|
+
- `binfile` → [binfiles](/entities/binfiles.md) (`binfiles.ID`)
|
|
33
|
+
|
|
34
|
+
# Enums
|
|
35
|
+
|
|
36
|
+
### `activity`
|
|
37
|
+
|
|
38
|
+
`0` = ACTIVE · `1` = DEACTIVATED · `2` = DELETED
|
|
39
|
+
|
|
40
|
+
# Indexes
|
|
41
|
+
|
|
42
|
+
- `fk_resources_application` — gin, partial on `application`
|
|
43
|
+
- `fk_resources_binfile` — btree, partial on `binfile`
|
|
44
|
+
- `s_resources_identifier` — gin on `identifier`
|
|
45
|
+
- `s_resources_name` — gin on `name`
|
|
46
|
+
- `u_resources_identifier` — btree, unique on `identifier`
|
|
47
|
+
|
|
48
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
49
|
+
|
|
50
|
+
# Operations
|
|
51
|
+
|
|
52
|
+
- list: `listResources`
|
|
53
|
+
- get: `getResource`
|
|
54
|
+
- exists: `existsResource`
|
|
55
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Services
|
|
4
|
+
description: Hook, timing, or remote-call services.
|
|
5
|
+
resource: zeyos://api/services
|
|
6
|
+
tags: [platform, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listServices
|
|
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
|
+
| `application` | integer | yes | — | yes | [applications](/entities/applications.md) |
|
|
22
|
+
| `activity` | smallint | no | `0` | — | — |
|
|
23
|
+
| `name` | text | no | — | yes | — |
|
|
24
|
+
| `identifier` | character varying(200) | no | — | yes | — |
|
|
25
|
+
| `type` | smallint | yes | — | — | — |
|
|
26
|
+
| `entity` | text | no | `''` | — | — |
|
|
27
|
+
| `schedule` | integer | no | `0` | — | — |
|
|
28
|
+
| `interval` | smallint | no | `1` | — | — |
|
|
29
|
+
| `mimetype` | text | no | `'text/x-zymba'` | — | — |
|
|
30
|
+
| `binfile` | integer | yes | — | yes | [binfiles](/entities/binfiles.md) |
|
|
31
|
+
| `url` | text | no | `''` | — | — |
|
|
32
|
+
| `accesskey` | bytea | yes | — | — | — |
|
|
33
|
+
|
|
34
|
+
# Foreign Keys
|
|
35
|
+
|
|
36
|
+
- `application` → [applications](/entities/applications.md) (`applications.ID`)
|
|
37
|
+
- `binfile` → [binfiles](/entities/binfiles.md) (`binfiles.ID`)
|
|
38
|
+
|
|
39
|
+
# Enums
|
|
40
|
+
|
|
41
|
+
### `activity`
|
|
42
|
+
|
|
43
|
+
`0` = ACTIVE · `1` = DEACTIVATED · `2` = DELETED
|
|
44
|
+
|
|
45
|
+
### `type`
|
|
46
|
+
|
|
47
|
+
`0` = TIMING · `1` = REMOTECALL · `2` = AFTER_CREATION · `3` = BEFORE_MODIFICATION · `4` = AFTER_MODIFICATION · `5` = AFTER_CREATION_MODIFICATION · `6` = BEFORE_DELETION · `7` = AFTER_DELETION
|
|
48
|
+
|
|
49
|
+
# Indexes
|
|
50
|
+
|
|
51
|
+
- `fk_services_application` — gin, partial on `application`
|
|
52
|
+
- `fk_services_binfile` — btree, partial on `binfile`
|
|
53
|
+
- `s_services_identifier` — gin on `identifier`
|
|
54
|
+
- `s_services_name` — gin on `name`
|
|
55
|
+
- `u_services_identifier` — btree, unique on `identifier`
|
|
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: `listServices`
|
|
62
|
+
- get: `getService`
|
|
63
|
+
- exists: `existsService`
|
|
64
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Stock Transactions
|
|
4
|
+
description: Inventory movements.
|
|
5
|
+
resource: zeyos://api/stocktransactions
|
|
6
|
+
tags: [commerce, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listStockTransactions
|
|
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
|
+
| `storage` | integer | yes | — | yes | [storages](/entities/storages.md) |
|
|
23
|
+
| `transaction` | integer | yes | — | yes | [transactions](/entities/transactions.md) |
|
|
24
|
+
| `transfer` | bigint | yes | — | yes | [stocktransactions](/entities/stocktransactions.md) |
|
|
25
|
+
| `flag` | smallint | no | `0` | — | — |
|
|
26
|
+
| `date` | bigint | no | `date_part('epoch', now())` | yes | — |
|
|
27
|
+
| `chargenum` | text | no | `''` | yes | — |
|
|
28
|
+
| `location` | text | no | `''` | — | — |
|
|
29
|
+
| `reference` | text | no | `''` | yes | — |
|
|
30
|
+
| `amount` | double precision | no | — | — | — |
|
|
31
|
+
| `sellingprice` | double precision | no | `0` | — | — |
|
|
32
|
+
| `purchaseprice` | double precision | no | `0` | — | — |
|
|
33
|
+
| `serials` | text[] | yes | — | yes | — |
|
|
34
|
+
| `subtransactions` | bigint[] | yes | — | — | — |
|
|
35
|
+
|
|
36
|
+
# Foreign Keys
|
|
37
|
+
|
|
38
|
+
- `item` → [items](/entities/items.md) (`items.ID`)
|
|
39
|
+
- `storage` → [storages](/entities/storages.md) (`storages.ID`)
|
|
40
|
+
- `transaction` → [transactions](/entities/transactions.md) (`transactions.ID`)
|
|
41
|
+
- `transfer` → [stocktransactions](/entities/stocktransactions.md) (`stocktransactions.ID`)
|
|
42
|
+
|
|
43
|
+
# Enums
|
|
44
|
+
|
|
45
|
+
### `flag`
|
|
46
|
+
|
|
47
|
+
`0` = BOOKED · `1` = RESERVED · `2` = CANCELLED
|
|
48
|
+
|
|
49
|
+
# Indexes
|
|
50
|
+
|
|
51
|
+
- `fk_stocktransactions_item` — btree on `item`
|
|
52
|
+
- `fk_stocktransactions_storage` — gin, partial on `storage`
|
|
53
|
+
- `fk_stocktransactions_transaction` — btree, partial on `transaction`
|
|
54
|
+
- `i_stocktransactions_date` — btree on `date`
|
|
55
|
+
- `i_stocktransactions_reservations` — btree, partial on `transaction`
|
|
56
|
+
- `i_stocktransactions_serials` — gin, partial on `serials`
|
|
57
|
+
- `s_stocktransactions_chargenum` — gin, partial on `chargenum`
|
|
58
|
+
- `s_stocktransactions_reference` — gin, partial on `reference`
|
|
59
|
+
- `s_stocktransactions_serials` — gin, partial on `f_safe_array_to_string(serials, ' ')`
|
|
60
|
+
- `u_stocktransactions_transfer` — btree, unique, partial on `transfer`
|
|
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: `listStockTransactions`
|
|
67
|
+
- get: `getStockTransaction`
|
|
68
|
+
- create: `createStockTransaction`
|
|
69
|
+
- update: `updateStockTransaction`
|
|
70
|
+
- delete: `deleteStockTransaction`
|
|
71
|
+
- exists: `existsStockTransaction`
|
|
72
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Storages
|
|
4
|
+
description: Inventory storage locations.
|
|
5
|
+
resource: zeyos://api/storages
|
|
6
|
+
tags: [commerce, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listStorages
|
|
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
|
+
| `visibility` | smallint | no | `0` | — | — |
|
|
24
|
+
| `name` | text | no | — | yes | — |
|
|
25
|
+
| `description` | text | no | `''` | — | — |
|
|
26
|
+
|
|
27
|
+
# Foreign Keys
|
|
28
|
+
|
|
29
|
+
- `fork` → [forks](/entities/forks.md) (`forks.ID`)
|
|
30
|
+
- `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
|
|
31
|
+
|
|
32
|
+
# Enums
|
|
33
|
+
|
|
34
|
+
### `visibility`
|
|
35
|
+
|
|
36
|
+
`0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
|
|
37
|
+
|
|
38
|
+
# Indexes
|
|
39
|
+
|
|
40
|
+
- `fk_storages_fork` — gin, partial on `fork`
|
|
41
|
+
- `fk_storages_ownergroup` — gin on `ownergroup`
|
|
42
|
+
- `i_storages_nofork` — gin, partial on `fork`
|
|
43
|
+
- `i_storages_noowner` — gin, partial on `ownergroup`
|
|
44
|
+
- `s_storages_name` — gin on `name`
|
|
45
|
+
|
|
46
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
47
|
+
|
|
48
|
+
# Operations
|
|
49
|
+
|
|
50
|
+
- list: `listStorages`
|
|
51
|
+
- get: `getStorage`
|
|
52
|
+
- create: `createStorage`
|
|
53
|
+
- update: `updateStorage`
|
|
54
|
+
- delete: `deleteStorage`
|
|
55
|
+
- exists: `existsStorage`
|
|
56
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Suppliers
|
|
4
|
+
description: Supplier-to-item links.
|
|
5
|
+
resource: zeyos://api/suppliers
|
|
6
|
+
tags: [commerce, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listSuppliers
|
|
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
|
+
| `account` | integer | no | — | yes | [accounts](/entities/accounts.md) |
|
|
23
|
+
| `itemnum` | text | no | `''` | yes | — |
|
|
24
|
+
| `price` | double precision | yes | — | — | — |
|
|
25
|
+
| `taxrate` | double precision | yes | — | — | — |
|
|
26
|
+
| `minamount` | double precision | no | `0` | — | — |
|
|
27
|
+
| `deliverytime` | smallint | yes | — | — | — |
|
|
28
|
+
| `stock` | double precision | yes | — | — | — |
|
|
29
|
+
|
|
30
|
+
# Foreign Keys
|
|
31
|
+
|
|
32
|
+
- `item` → [items](/entities/items.md) (`items.ID`)
|
|
33
|
+
- `account` → [accounts](/entities/accounts.md) (`accounts.ID`)
|
|
34
|
+
|
|
35
|
+
# Indexes
|
|
36
|
+
|
|
37
|
+
- `fk_suppliers_account` — gin on `account`
|
|
38
|
+
- `s_suppliers_itemnum` — gin, partial on `itemnum`
|
|
39
|
+
- `u_suppliers_item_account` — btree, unique on `item, account`
|
|
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: `listSuppliers`
|
|
46
|
+
- get: `getSupplier`
|
|
47
|
+
- create: `createSupplier`
|
|
48
|
+
- update: `updateSupplier`
|
|
49
|
+
- delete: `deleteSupplier`
|
|
50
|
+
- exists: `existsSupplier`
|
|
51
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Tasks
|
|
4
|
+
description: Actionable delivery work.
|
|
5
|
+
resource: zeyos://api/tasks
|
|
6
|
+
tags: [work, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listTasks
|
|
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
|
+
| `ticket` | integer | yes | — | yes | [tickets](/entities/tickets.md) |
|
|
27
|
+
| `project` | integer | yes | — | yes | [projects](/entities/projects.md) |
|
|
28
|
+
| `visibility` | smallint | no | `0` | — | — |
|
|
29
|
+
| `name` | text | no | — | yes | — |
|
|
30
|
+
| `tasknum` | text | no | `''` | yes | — |
|
|
31
|
+
| `datefrom` | bigint | yes | — | — | — |
|
|
32
|
+
| `duedate` | bigint | yes | — | — | — |
|
|
33
|
+
| `status` | smallint | no | `0` | — | — |
|
|
34
|
+
| `priority` | smallint | no | `2` | — | — |
|
|
35
|
+
| `projectedeffort` | integer | no | `0` | — | — |
|
|
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
|
+
- `ticket` → [tickets](/entities/tickets.md) (`tickets.ID`)
|
|
46
|
+
- `project` → [projects](/entities/projects.md) (`projects.ID`)
|
|
47
|
+
|
|
48
|
+
# Enums
|
|
49
|
+
|
|
50
|
+
### `visibility`
|
|
51
|
+
|
|
52
|
+
`0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
|
|
53
|
+
|
|
54
|
+
### `status`
|
|
55
|
+
|
|
56
|
+
`0` = NOTSTARTED · `1` = AWAITINGACCEPTANCE · `2` = ACCEPTED · `3` = REJECTED · `4` = ACTIVE · `5` = INACTIVE · `6` = FEEDBACKREQUIRED · `7` = TESTING · `8` = CANCELLED · `9` = COMPLETED · `10` = FAILED · `11` = BOOKED
|
|
57
|
+
|
|
58
|
+
### `priority`
|
|
59
|
+
|
|
60
|
+
`0` = LOWEST · `1` = LOW · `2` = MEDIUM · `3` = HIGH · `4` = HIGHEST
|
|
61
|
+
|
|
62
|
+
# Indexes
|
|
63
|
+
|
|
64
|
+
- `fk_tasks_assigneduser` — gin, partial on `assigneduser`
|
|
65
|
+
- `fk_tasks_davserver` — gin, partial on `davserver`
|
|
66
|
+
- `fk_tasks_fork` — gin, partial on `fork`
|
|
67
|
+
- `fk_tasks_ownergroup` — gin, partial on `ownergroup`
|
|
68
|
+
- `fk_tasks_owneruser` — gin, partial on `owneruser`
|
|
69
|
+
- `fk_tasks_project` — gin, partial on `project`
|
|
70
|
+
- `fk_tasks_ticket` — btree, partial on `ticket`
|
|
71
|
+
- `i_tasks_nofork` — gin, partial on `fork`
|
|
72
|
+
- `i_tasks_noowner` — gin, partial on `ownergroup`
|
|
73
|
+
- `s_tasks_name` — gin on `name`
|
|
74
|
+
- `s_tasks_tasknum` — gin, partial on `tasknum`
|
|
75
|
+
|
|
76
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
77
|
+
|
|
78
|
+
# Operations
|
|
79
|
+
|
|
80
|
+
- list: `listTasks`
|
|
81
|
+
- get: `getTask`
|
|
82
|
+
- create: `createTask`
|
|
83
|
+
- update: `updateTask`
|
|
84
|
+
- delete: `deleteTask`
|
|
85
|
+
- exists: `existsTask`
|
|
86
|
+
<!-- okf:generated:end -->
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Tickets
|
|
4
|
+
description: Support or service work items.
|
|
5
|
+
resource: zeyos://api/tickets
|
|
6
|
+
tags: [work, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listTickets
|
|
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
|
+
| `project` | integer | yes | — | yes | [projects](/entities/projects.md) |
|
|
26
|
+
| `visibility` | smallint | no | `0` | — | — |
|
|
27
|
+
| `name` | text | no | — | yes | — |
|
|
28
|
+
| `ticketnum` | text | no | `''` | yes | — |
|
|
29
|
+
| `date` | bigint | no | `date_part('epoch', now())` | yes | — |
|
|
30
|
+
| `duedate` | bigint | yes | — | — | — |
|
|
31
|
+
| `status` | smallint | no | `0` | — | — |
|
|
32
|
+
| `priority` | smallint | no | `2` | — | — |
|
|
33
|
+
| `description` | text | no | `''` | — | — |
|
|
34
|
+
| `billingitems` | json | yes | — | — | — |
|
|
35
|
+
| `procurementitems` | json | yes | — | — | — |
|
|
36
|
+
|
|
37
|
+
# Foreign Keys
|
|
38
|
+
|
|
39
|
+
- `fork` → [forks](/entities/forks.md) (`forks.ID`)
|
|
40
|
+
- `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
|
|
41
|
+
- `assigneduser` → [users](/entities/users.md) (`users.ID`)
|
|
42
|
+
- `account` → [accounts](/entities/accounts.md) (`accounts.ID`)
|
|
43
|
+
- `project` → [projects](/entities/projects.md) (`projects.ID`)
|
|
44
|
+
|
|
45
|
+
# Enums
|
|
46
|
+
|
|
47
|
+
### `visibility`
|
|
48
|
+
|
|
49
|
+
`0` = REGULAR · `1` = ARCHIVED · `2` = DELETED
|
|
50
|
+
|
|
51
|
+
### `status`
|
|
52
|
+
|
|
53
|
+
`0` = NOTSTARTED · `1` = AWAITINGACCEPTANCE · `2` = ACCEPTED · `3` = REJECTED · `4` = ACTIVE · `5` = INACTIVE · `6` = FEEDBACKREQUIRED · `7` = TESTING · `8` = CANCELLED · `9` = COMPLETED · `10` = FAILED · `11` = BOOKED
|
|
54
|
+
|
|
55
|
+
### `priority`
|
|
56
|
+
|
|
57
|
+
`0` = LOWEST · `1` = LOW · `2` = MEDIUM · `3` = HIGH · `4` = HIGHEST
|
|
58
|
+
|
|
59
|
+
# Indexes
|
|
60
|
+
|
|
61
|
+
- `fk_tickets_account` — btree, partial on `account`
|
|
62
|
+
- `fk_tickets_assigneduser` — gin, partial on `assigneduser`
|
|
63
|
+
- `fk_tickets_fork` — gin, partial on `fork`
|
|
64
|
+
- `fk_tickets_ownergroup` — gin on `ownergroup`
|
|
65
|
+
- `fk_tickets_project` — gin, partial on `project`
|
|
66
|
+
- `i_tickets_date` — btree on `date`
|
|
67
|
+
- `i_tickets_nofork` — gin, partial on `fork`
|
|
68
|
+
- `i_tickets_noowner` — gin, partial on `ownergroup`
|
|
69
|
+
- `s_tickets_name` — gin on `name`
|
|
70
|
+
- `s_tickets_ticketnum` — gin, partial on `ticketnum`
|
|
71
|
+
|
|
72
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
73
|
+
|
|
74
|
+
# Operations
|
|
75
|
+
|
|
76
|
+
- list: `listTickets`
|
|
77
|
+
- get: `getTicket`
|
|
78
|
+
- create: `createTicket`
|
|
79
|
+
- update: `updateTicket`
|
|
80
|
+
- delete: `deleteTicket`
|
|
81
|
+
- exists: `existsTicket`
|
|
82
|
+
<!-- okf:generated:end -->
|
|
83
|
+
|
|
84
|
+
# Notes
|
|
85
|
+
|
|
86
|
+
Closed = `status` IN [9 (COMPLETED), 11 (BOOKED)]. Filter time windows on the indexed `date` field, not `creationdate`/`lastmodified` (unindexed → HTTP 503). Has a `visibility` column. `priority`: 0=LOWEST…4=HIGHEST.
|