@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.
- package/CHANGELOG.md +54 -0
- package/README.md +41 -2
- package/agents/README.md +10 -0
- package/agents/shared/zeyos-agent-operating-guide.md +42 -0
- package/agents/shared/zeyos-entity-map.md +5 -1
- package/agents/shared/zeyos-entity-reference.md +89 -33
- package/agents/shared/zeyos-query-patterns.md +26 -0
- package/agents/zeyos-calendar-and-scheduling/SKILL.md +45 -0
- package/agents/zeyos-calendar-and-scheduling/references/workflows.md +49 -0
- package/agents/zeyos-data-quality-and-governance/SKILL.md +43 -0
- package/agents/zeyos-data-quality-and-governance/references/workflows.md +51 -0
- package/agents/zeyos-document-and-approval/SKILL.md +41 -0
- package/agents/zeyos-document-and-approval/references/workflows.md +43 -0
- package/agents/zeyos-procurement-and-supplier-performance/SKILL.md +36 -0
- package/agents/zeyos-procurement-and-supplier-performance/references/workflows.md +46 -0
- package/agents/zeyos-time-tracking/SKILL.md +2 -0
- package/agents/zeyos-time-tracking/references/workflows.md +68 -0
- package/agents/zeyos-work-management/SKILL.md +4 -3
- package/agents/zeyos-work-management/references/workflows.md +39 -1
- package/docs/03-cli/02-commands.md +36 -2
- package/docs/03-cli/03-configuration.md +1 -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/calendar-timezones.md +10 -0
- package/okf/concepts/confirmation-and-side-effects.md +14 -0
- package/okf/concepts/counting-and-sums.md +10 -0
- package/okf/concepts/currency-and-rounding.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/idempotency-and-deduplication.md +10 -0
- package/okf/concepts/index.md +16 -0
- package/okf/concepts/null-empty-missing.md +10 -0
- package/okf/concepts/official-versus-latest.md +10 -0
- package/okf/concepts/operationid-vocabulary.md +17 -0
- package/okf/concepts/ownership-versus-attention.md +15 -0
- package/okf/concepts/untrusted-business-content.md +10 -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/account-address-completeness.md +10 -0
- package/okf/metrics/cash-received.md +10 -0
- package/okf/metrics/index.md +9 -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/metrics/stock-movement-by-storage.md +10 -0
- package/okf/metrics/supplier-delivery-performance.md +10 -0
- package/okf/playbooks/activity-timeline.md +11 -0
- package/okf/playbooks/calendar-availability.md +11 -0
- package/okf/playbooks/campaign-recipient-coverage.md +12 -0
- package/okf/playbooks/customer-360.md +12 -0
- package/okf/playbooks/document-approval.md +10 -0
- package/okf/playbooks/duplicate-account-review.md +11 -0
- package/okf/playbooks/effective-customer-price.md +11 -0
- package/okf/playbooks/index.md +13 -0
- package/okf/playbooks/missing-billing-addresses.md +12 -0
- package/okf/playbooks/revenue-this-year.md +19 -0
- package/okf/playbooks/supplier-scorecard.md +10 -0
- package/okf/playbooks/ticket-work-packet.md +11 -0
- package/package.json +11 -3
- package/scripts/data/okf-curation.mjs +446 -0
- package/scripts/generate-client.mjs +4 -275
- package/scripts/generate-okf.mjs +241 -0
- package/scripts/lib/live-test-config.mjs +20 -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: 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.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Transactions
|
|
4
|
+
description: Billing, procurement, or production business transactions.
|
|
5
|
+
resource: zeyos://api/transactions
|
|
6
|
+
tags: [billing, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listTransactions
|
|
9
|
+
visibility_column: false
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<!-- okf:generated:start — rewritten by scripts/generate-okf.mjs; do not edit by hand -->
|
|
13
|
+
# Schema
|
|
14
|
+
|
|
15
|
+
| Column | Type | Nullable | Default | Indexed | FK |
|
|
16
|
+
|---|---|---|---|---|---|
|
|
17
|
+
| `ID` | integer | no | — | yes | — |
|
|
18
|
+
| `fork` | integer | yes | — | yes | [forks](/entities/forks.md) |
|
|
19
|
+
| `ownergroup` | integer | yes | — | yes | [groups](/entities/groups.md) |
|
|
20
|
+
| `creator` | integer | yes | — | — | — |
|
|
21
|
+
| `assigneduser` | integer | yes | — | yes | [users](/entities/users.md) |
|
|
22
|
+
| `creationdate` | bigint | no | `date_part('epoch', now())` | — | — |
|
|
23
|
+
| `lastmodified` | bigint | no | `date_part('epoch', now())` | — | — |
|
|
24
|
+
| `account` | integer | yes | — | yes | [accounts](/entities/accounts.md) |
|
|
25
|
+
| `item` | integer | yes | — | yes | [items](/entities/items.md) |
|
|
26
|
+
| `contract` | integer | yes | — | yes | [contracts](/entities/contracts.md) |
|
|
27
|
+
| `transactionnum` | text | no | — | yes | — |
|
|
28
|
+
| `type` | smallint | no | `0` | yes | — |
|
|
29
|
+
| `date` | bigint | no | `date_part('epoch', now())` | yes | — |
|
|
30
|
+
| `duedate` | bigint | yes | — | — | — |
|
|
31
|
+
| `status` | smallint | no | `0` | — | — |
|
|
32
|
+
| `calculation` | smallint | no | `0` | — | — |
|
|
33
|
+
| `productionfactor` | integer | yes | — | — | — |
|
|
34
|
+
| `currency` | character varying(3) | no | — | — | — |
|
|
35
|
+
| `exchangerate` | double precision | no | `1` | — | — |
|
|
36
|
+
| `taxid` | text | no | `''` | — | — |
|
|
37
|
+
| `shippingrecipient` | text | no | `''` | — | — |
|
|
38
|
+
| `shippingaddress` | text | no | `''` | — | — |
|
|
39
|
+
| `shippingpostalcode` | text | no | `''` | — | — |
|
|
40
|
+
| `shippingcity` | text | no | `''` | — | — |
|
|
41
|
+
| `shippingregion` | text | no | `''` | — | — |
|
|
42
|
+
| `shippingcountry` | character varying(2) | no | `''` | — | — |
|
|
43
|
+
| `billingrecipient` | text | no | `''` | — | — |
|
|
44
|
+
| `billingaddress` | text | no | `''` | — | — |
|
|
45
|
+
| `billingpostalcode` | text | no | `''` | — | — |
|
|
46
|
+
| `billingcity` | text | no | `''` | — | — |
|
|
47
|
+
| `billingregion` | text | no | `''` | — | — |
|
|
48
|
+
| `billingcountry` | character varying(2) | no | `''` | — | — |
|
|
49
|
+
| `sellertaxid` | text | no | `''` | — | — |
|
|
50
|
+
| `sellername` | text | no | `''` | — | — |
|
|
51
|
+
| `selleraddress` | text | no | `''` | — | — |
|
|
52
|
+
| `sellerpostalcode` | text | no | `''` | — | — |
|
|
53
|
+
| `sellercity` | text | no | `''` | — | — |
|
|
54
|
+
| `sellerregion` | text | no | `''` | — | — |
|
|
55
|
+
| `sellercountry` | character varying(2) | no | `''` | — | — |
|
|
56
|
+
| `discount` | double precision | no | `0` | — | — |
|
|
57
|
+
| `netamount` | double precision | no | `0` | — | — |
|
|
58
|
+
| `tax` | double precision | no | `0` | — | — |
|
|
59
|
+
| `margin` | double precision | no | `0` | — | — |
|
|
60
|
+
| `weight` | double precision | no | `0` | — | — |
|
|
61
|
+
| `items` | json | yes | — | — | — |
|
|
62
|
+
|
|
63
|
+
# Foreign Keys
|
|
64
|
+
|
|
65
|
+
- `fork` → [forks](/entities/forks.md) (`forks.ID`)
|
|
66
|
+
- `ownergroup` → [groups](/entities/groups.md) (`groups.ID`)
|
|
67
|
+
- `assigneduser` → [users](/entities/users.md) (`users.ID`)
|
|
68
|
+
- `account` → [accounts](/entities/accounts.md) (`accounts.ID`)
|
|
69
|
+
- `item` → [items](/entities/items.md) (`items.ID`)
|
|
70
|
+
- `contract` → [contracts](/entities/contracts.md) (`contracts.ID`)
|
|
71
|
+
|
|
72
|
+
# Enums
|
|
73
|
+
|
|
74
|
+
### `type`
|
|
75
|
+
|
|
76
|
+
`0` = BILLING_QUOTE · `1` = BILLING_ORDER · `2` = BILLING_DELIVERY · `3` = BILLING_INVOICE · `4` = BILLING_CREDIT · `5` = PROCUREMENT_REQUEST · `6` = PROCUREMENT_ORDER · `7` = PROCUREMENT_DELIVERY · `8` = PROCUREMENT_INVOICE · `9` = PROCUREMENT_CREDIT · `10` = PRODUCTION_FABRICATION · `11` = PRODUCTION_DISASSEMBLY
|
|
77
|
+
|
|
78
|
+
### `status`
|
|
79
|
+
|
|
80
|
+
`0` = DRAFT · `1` = BOOKED · `2` = HOLD · `3` = CANCELLED · `4` = CLOSED · `5` = PARTLYORDERED · `6` = PARTLYORDERED_CANCELLED · `7` = PARTLYORDERED_CLOSED · `8` = ORDERED · `9` = PARTLYDELIVERED · `10` = PARTLYDELIVERED_CANCELLED · `11` = PARTLYDELIVERED_CLOSED · `12` = DELIVERED · `13` = PARTLYINVOICED · `14` = PARTLYINVOICED_CANCELLED · `15` = PARTLYINVOICED_CLOSED · `16` = INVOICED · `17` = PARTLYPAID · `18` = PARTLYPAID_CANCELLED · `19` = PARTLYPAID_CLOSED · `20` = PAID · `21` = OVERPAID · `22` = PROCESSED · `23` = PROCESSED_CANCELLED
|
|
81
|
+
|
|
82
|
+
### `calculation`
|
|
83
|
+
|
|
84
|
+
`0` = NET · `1` = GROSS · `2` = EXACT · `3` = LEGACY · `4` = EXTERNAL
|
|
85
|
+
|
|
86
|
+
# Indexes
|
|
87
|
+
|
|
88
|
+
- `fk_transactions_account` — btree, partial on `account`
|
|
89
|
+
- `fk_transactions_assigneduser` — gin, partial on `assigneduser`
|
|
90
|
+
- `fk_transactions_contract` — btree, partial on `contract`
|
|
91
|
+
- `fk_transactions_fork` — gin, partial on `fork`
|
|
92
|
+
- `fk_transactions_item` — btree, partial on `item`
|
|
93
|
+
- `fk_transactions_ownergroup` — gin on `ownergroup`
|
|
94
|
+
- `i_transactions_billing_date` — btree, partial on `date`
|
|
95
|
+
- `i_transactions_collection_date` — btree, partial on `date`
|
|
96
|
+
- `i_transactions_nofork` — gin, partial on `fork`
|
|
97
|
+
- `i_transactions_noowner` — gin, partial on `ownergroup`
|
|
98
|
+
- `i_transactions_procurement_date` — btree, partial on `date`
|
|
99
|
+
- `i_transactions_production_date` — btree, partial on `date`
|
|
100
|
+
- `i_transactions_transactionnum` — btree on `transactionnum`
|
|
101
|
+
- `s_transactions_transactionnum` — gin on `transactionnum`
|
|
102
|
+
- `u_transactions_transactionnum_type` — btree, unique, partial on `transactionnum, type`
|
|
103
|
+
|
|
104
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
105
|
+
|
|
106
|
+
# Operations
|
|
107
|
+
|
|
108
|
+
- list: `listTransactions`
|
|
109
|
+
- get: `getTransaction`
|
|
110
|
+
- create: `createTransaction`
|
|
111
|
+
- update: `updateTransaction`
|
|
112
|
+
- delete: `deleteTransaction`
|
|
113
|
+
- exists: `existsTransaction`
|
|
114
|
+
<!-- okf:generated:end -->
|
|
115
|
+
|
|
116
|
+
# Notes
|
|
117
|
+
|
|
118
|
+
NO `visibility` column — adding `"visibility":0` to a filter 400s. Use `type` 3=billing invoice, 4=billing credit. Use `netamount` for invoiced revenue; sum client-side (no server-side SUM). Use `date` for period reporting.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Users
|
|
4
|
+
description: System users.
|
|
5
|
+
resource: zeyos://api/users
|
|
6
|
+
tags: [platform, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listUsers
|
|
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
|
+
| `contact` | integer | yes | — | yes | [contacts](/entities/contacts.md) |
|
|
22
|
+
| `activity` | smallint | no | `0` | — | — |
|
|
23
|
+
| `name` | text | no | — | yes | — |
|
|
24
|
+
| `email` | text | no | — | yes | — |
|
|
25
|
+
| `nopublic` | smallint | no | `0` | — | — |
|
|
26
|
+
| `apionly` | smallint | no | `0` | — | — |
|
|
27
|
+
| `expdate` | bigint | yes | — | — | — |
|
|
28
|
+
| `password` | text | no | `''` | — | — |
|
|
29
|
+
| `resetlogintoken` | bytea | yes | — | — | — |
|
|
30
|
+
| `persistentlogintoken` | bytea | yes | — | yes | — |
|
|
31
|
+
| `signature` | bytea | yes | — | — | — |
|
|
32
|
+
| `description` | text | no | `''` | — | — |
|
|
33
|
+
| `otpsecret` | bytea | yes | — | — | — |
|
|
34
|
+
| `settings` | json | yes | — | — | — |
|
|
35
|
+
|
|
36
|
+
# Foreign Keys
|
|
37
|
+
|
|
38
|
+
- `contact` → [contacts](/entities/contacts.md) (`contacts.ID`)
|
|
39
|
+
|
|
40
|
+
# Enums
|
|
41
|
+
|
|
42
|
+
### `activity`
|
|
43
|
+
|
|
44
|
+
`0` = ACTIVE · `1` = DEACTIVATED · `2` = DELETED
|
|
45
|
+
|
|
46
|
+
# Indexes
|
|
47
|
+
|
|
48
|
+
- `fk_users_contact` — btree, partial on `contact`
|
|
49
|
+
- `s_users_email` — gin on `email`
|
|
50
|
+
- `s_users_name` — gin on `name`
|
|
51
|
+
- `u_users_email` — btree, unique on `lower(email)`
|
|
52
|
+
- `u_users_name` — btree, unique on `lower(name)`
|
|
53
|
+
- `u_users_persistentlogintoken` — btree, unique, partial on `persistentlogintoken`
|
|
54
|
+
|
|
55
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
56
|
+
|
|
57
|
+
# Operations
|
|
58
|
+
|
|
59
|
+
- list: `listUsers`
|
|
60
|
+
- get: `getUser`
|
|
61
|
+
- exists: `existsUser`
|
|
62
|
+
<!-- okf:generated:end -->
|
|
63
|
+
|
|
64
|
+
# Notes
|
|
65
|
+
|
|
66
|
+
Resolve assignees/ownership here; user names may not match contact names.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: ZeyOS Entity
|
|
3
|
+
title: Weblets
|
|
4
|
+
description: UI modules with view/type metadata.
|
|
5
|
+
resource: zeyos://api/weblets
|
|
6
|
+
tags: [platform, generated]
|
|
7
|
+
api_backed: true
|
|
8
|
+
list_operation: listWeblets
|
|
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
|
+
| `view` | text | no | `''` | — | — |
|
|
26
|
+
| `type` | smallint | no | `0` | — | — |
|
|
27
|
+
| `width` | smallint | no | `0` | — | — |
|
|
28
|
+
| `height` | smallint | no | `0` | — | — |
|
|
29
|
+
| `svgpath` | text | no | `''` | — | — |
|
|
30
|
+
| `color` | character varying(6) | no | `''` | — | — |
|
|
31
|
+
| `mimetype` | text | no | `'text/x-zymba'` | — | — |
|
|
32
|
+
| `langaliases` | json | yes | — | — | — |
|
|
33
|
+
| `binfile` | integer | yes | — | yes | [binfiles](/entities/binfiles.md) |
|
|
34
|
+
| `url` | text | no | `''` | — | — |
|
|
35
|
+
|
|
36
|
+
# Foreign Keys
|
|
37
|
+
|
|
38
|
+
- `application` → [applications](/entities/applications.md) (`applications.ID`)
|
|
39
|
+
- `binfile` → [binfiles](/entities/binfiles.md) (`binfiles.ID`)
|
|
40
|
+
|
|
41
|
+
# Enums
|
|
42
|
+
|
|
43
|
+
### `activity`
|
|
44
|
+
|
|
45
|
+
`0` = ACTIVE · `1` = DEACTIVATED · `2` = DELETED
|
|
46
|
+
|
|
47
|
+
### `type`
|
|
48
|
+
|
|
49
|
+
`0` = INTEGRATED · `1` = STANDALONE · `2` = DETACHED · `3` = POPUP_FRAMED · `4` = POPUP_PLAIN · `5` = EMBEDDED_FRAMED · `6` = EMBEDDED_COLLAPSED · `7` = EMBEDDED_PLAIN
|
|
50
|
+
|
|
51
|
+
# Indexes
|
|
52
|
+
|
|
53
|
+
- `fk_weblets_application` — gin, partial on `application`
|
|
54
|
+
- `fk_weblets_binfile` — btree, partial on `binfile`
|
|
55
|
+
- `s_weblets_identifier` — gin on `identifier`
|
|
56
|
+
- `s_weblets_name` — gin on `name`
|
|
57
|
+
- `u_weblets_identifier` — btree, unique on `identifier`
|
|
58
|
+
|
|
59
|
+
> Partial/GIN indexes back the `filters` (plural) query form for foreign-key fields. See [filters-vs-filter](/concepts/filters-vs-filter.md).
|
|
60
|
+
|
|
61
|
+
# Operations
|
|
62
|
+
|
|
63
|
+
- list: `listWeblets`
|
|
64
|
+
- get: `getWeblet`
|
|
65
|
+
- exists: `existsWeblet`
|
|
66
|
+
<!-- okf:generated:end -->
|
package/okf/index.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
okf_version: 0.1
|
|
3
|
+
source_snapshot: 19d7df6ae9aa
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ZeyOS Knowledge Bundle
|
|
7
|
+
|
|
8
|
+
* [Entities](entities/) - 64 API-backed entity concepts (schema, foreign keys, enums, indexes, operations).
|
|
9
|
+
* [Metrics](metrics/) - Business metric definitions.
|
|
10
|
+
* [Playbooks](playbooks/) - Step-by-step query workflows.
|
|
11
|
+
* [Concepts](concepts/) - Cross-cutting query rules and footguns.
|
package/okf/log.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Metric
|
|
3
|
+
title: Account Address Completeness
|
|
4
|
+
description: "Which active customers lack a billing (or shipping) address."
|
|
5
|
+
tags: [crm]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
**Definition.** Active [accounts](/entities/accounts.md) (`type = 1`, `visibility = 0`) with no [addresses](/entities/addresses.md) row of `type = 1` (billing). `addresses` has **no** `visibility` column — do not filter it.
|
|
9
|
+
|
|
10
|
+
This is an anti-join, not a count. See [missing-billing-addresses](/playbooks/missing-billing-addresses.md) and [null-empty-missing](/concepts/null-empty-missing.md).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Metric
|
|
3
|
+
title: Cash Received
|
|
4
|
+
description: "Cash collected (settlement basis) over a date window."
|
|
5
|
+
tags: [billing, payments]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
**Definition.** Sum of `amount` over [payments](/entities/payments.md) with `date` in the window. This is cash basis — distinct from [invoiced-net-revenue](/metrics/invoiced-net-revenue.md) (accrual/billed basis).
|
|
9
|
+
|
|
10
|
+
Separate direct account payments from transaction-linked payments if the answer needs it. Sum client-side; there is no server-side SUM.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Metrics
|
|
2
|
+
|
|
3
|
+
* [Account Address Completeness](account-address-completeness.md) - Which active customers lack a billing (or shipping) address.
|
|
4
|
+
* [Cash Received](cash-received.md) - Cash collected (settlement basis) over a date window.
|
|
5
|
+
* [Invoiced Net Revenue](invoiced-net-revenue.md) - Net invoiced revenue from billing invoices over a date window.
|
|
6
|
+
* [Open Customers](open-customers.md) - Count of active customer accounts.
|
|
7
|
+
* [Overdue Receivables](overdue-receivables.md) - Receivables in collection, via dunning — not from transactions alone.
|
|
8
|
+
* [Stock Movement by Storage](stock-movement-by-storage.md) - Booked/reserved/cancelled stock movement quantities grouped per storage.
|
|
9
|
+
* [Supplier Delivery Performance](supplier-delivery-performance.md) - Ordered vs invoiced value, delivery timeliness and price variance per supplier.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Metric
|
|
3
|
+
title: Invoiced Net Revenue
|
|
4
|
+
description: "Net invoiced revenue from billing invoices over a date window."
|
|
5
|
+
tags: [billing, revenue]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
**Definition.** Sum of `netamount` over [transactions](/entities/transactions.md) where `type = 3` (billing invoice) and `date` falls in the window. For *net after credits*, also sum `type = 4` (billing credit) and subtract.
|
|
9
|
+
|
|
10
|
+
**Why `date`, not `lastmodified`.** `date` is the business-effective invoice date; `lastmodified` is change tracking. See [dates-unix-seconds](/concepts/dates-unix-seconds.md).
|
|
11
|
+
|
|
12
|
+
**No server-side SUM.** `list` the matching rows (high `--limit`, up to 10000) with `netamount` and add them up client-side. See [counting-and-sums](/concepts/counting-and-sums.md).
|
|
13
|
+
|
|
14
|
+
**Do not** add `"visibility":0` — `transactions` has no such column and it 400s. See [visibility-column](/concepts/visibility-column.md).
|
|
15
|
+
|
|
16
|
+
Related playbook: [revenue-this-year](/playbooks/revenue-this-year.md).
|