@zeyos/client 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +21 -0
  3. package/README.md +458 -0
  4. package/agents/README.md +66 -0
  5. package/agents/shared/business-app-benchmarks.md +111 -0
  6. package/agents/shared/zeyos-entity-map.md +142 -0
  7. package/agents/shared/zeyos-entity-reference.md +570 -0
  8. package/agents/shared/zeyos-query-patterns.md +89 -0
  9. package/agents/zeyos-account-intelligence/SKILL.md +34 -0
  10. package/agents/zeyos-account-intelligence/agents/openai.yaml +4 -0
  11. package/agents/zeyos-account-intelligence/references/workflows.md +84 -0
  12. package/agents/zeyos-billing-insights/SKILL.md +41 -0
  13. package/agents/zeyos-billing-insights/agents/openai.yaml +4 -0
  14. package/agents/zeyos-billing-insights/references/workflows.md +106 -0
  15. package/agents/zeyos-campaign-and-outreach/SKILL.md +44 -0
  16. package/agents/zeyos-campaign-and-outreach/agents/openai.yaml +4 -0
  17. package/agents/zeyos-campaign-and-outreach/references/workflows.md +100 -0
  18. package/agents/zeyos-collaboration-and-activity/SKILL.md +37 -0
  19. package/agents/zeyos-collaboration-and-activity/agents/openai.yaml +4 -0
  20. package/agents/zeyos-collaboration-and-activity/references/workflows.md +104 -0
  21. package/agents/zeyos-collections-and-dunning/SKILL.md +46 -0
  22. package/agents/zeyos-collections-and-dunning/agents/openai.yaml +4 -0
  23. package/agents/zeyos-collections-and-dunning/references/workflows.md +132 -0
  24. package/agents/zeyos-commerce-and-inventory/SKILL.md +38 -0
  25. package/agents/zeyos-commerce-and-inventory/agents/openai.yaml +4 -0
  26. package/agents/zeyos-commerce-and-inventory/references/workflows.md +101 -0
  27. package/agents/zeyos-mail-operations/SKILL.md +35 -0
  28. package/agents/zeyos-mail-operations/agents/openai.yaml +4 -0
  29. package/agents/zeyos-mail-operations/references/workflows.md +110 -0
  30. package/agents/zeyos-notes-and-sops/SKILL.md +31 -0
  31. package/agents/zeyos-notes-and-sops/agents/openai.yaml +4 -0
  32. package/agents/zeyos-notes-and-sops/references/workflows.md +85 -0
  33. package/agents/zeyos-platform-and-schema/SKILL.md +37 -0
  34. package/agents/zeyos-platform-and-schema/agents/openai.yaml +4 -0
  35. package/agents/zeyos-platform-and-schema/references/workflows.md +97 -0
  36. package/agents/zeyos-work-management/SKILL.md +45 -0
  37. package/agents/zeyos-work-management/agents/openai.yaml +4 -0
  38. package/agents/zeyos-work-management/references/workflows.md +148 -0
  39. package/docs/01-api-reference/01-data-retrieval.md +601 -0
  40. package/docs/01-api-reference/02-authentication.md +288 -0
  41. package/docs/01-api-reference/03-resources.md +270 -0
  42. package/docs/01-api-reference/04-schema.md +539 -0
  43. package/docs/01-api-reference/_category_.json +9 -0
  44. package/docs/02-javascript-client/01-getting-started.md +146 -0
  45. package/docs/02-javascript-client/02-authentication.md +287 -0
  46. package/docs/02-javascript-client/03-making-requests.md +572 -0
  47. package/docs/02-javascript-client/04-practical-guide.md +348 -0
  48. package/docs/02-javascript-client/_category_.json +9 -0
  49. package/docs/03-cli/01-getting-started.md +219 -0
  50. package/docs/03-cli/02-commands.md +407 -0
  51. package/docs/03-cli/03-configuration.md +220 -0
  52. package/docs/03-cli/_category_.json +9 -0
  53. package/docs/04-agent-workflows/00-coding-agents.md +35 -0
  54. package/docs/04-agent-workflows/01-agent-quickstart.md +147 -0
  55. package/docs/04-agent-workflows/02-agent-recipes.md +109 -0
  56. package/docs/04-agent-workflows/03-cli-coverage-and-escalation.md +65 -0
  57. package/docs/04-agent-workflows/_category_.json +9 -0
  58. package/docs/04-sample-apps/01-kanban.md +89 -0
  59. package/docs/04-sample-apps/02-crm.md +81 -0
  60. package/docs/04-sample-apps/03-dashboard.md +80 -0
  61. package/docs/04-sample-apps/_category_.json +9 -0
  62. package/docs/05-tutorials/00-application-developers.md +43 -0
  63. package/docs/05-tutorials/01-integration-architecture.md +60 -0
  64. package/docs/05-tutorials/02-build-your-own-zeyos-frontend.md +517 -0
  65. package/docs/05-tutorials/03-server-side-integrations.md +185 -0
  66. package/docs/05-tutorials/_category_.json +9 -0
  67. package/docs/intro.md +197 -0
  68. package/openapi/api.json +24308 -0
  69. package/openapi/auth.json +415 -0
  70. package/openapi/dbref.json +56223 -0
  71. package/openapi/oauth2.json +781 -0
  72. package/openapi/sdk.json +949 -0
  73. package/openapi/views.txt +642 -0
  74. package/package.json +49 -0
  75. package/samples/crm/README.md +28 -0
  76. package/samples/crm/index.html +327 -0
  77. package/samples/crm/js/api.js +208 -0
  78. package/samples/crm/js/auth.js +61 -0
  79. package/samples/crm/js/main.js +545 -0
  80. package/samples/crm/js/state.js +90 -0
  81. package/samples/crm/js/ui.js +51 -0
  82. package/samples/dashboard/README.md +28 -0
  83. package/samples/dashboard/index.html +280 -0
  84. package/samples/dashboard/js/api.js +197 -0
  85. package/samples/dashboard/js/auth.js +59 -0
  86. package/samples/dashboard/js/main.js +382 -0
  87. package/samples/dashboard/js/state.js +81 -0
  88. package/samples/dashboard/js/ui.js +48 -0
  89. package/samples/kanban/README.md +28 -0
  90. package/samples/kanban/index.html +263 -0
  91. package/samples/kanban/js/api.js +152 -0
  92. package/samples/kanban/js/auth.js +59 -0
  93. package/samples/kanban/js/constants.js +40 -0
  94. package/samples/kanban/js/kanban.js +246 -0
  95. package/samples/kanban/js/main.js +362 -0
  96. package/samples/kanban/js/modals.js +474 -0
  97. package/samples/kanban/js/settings.js +82 -0
  98. package/samples/kanban/js/state.js +118 -0
  99. package/samples/kanban/js/ui.js +49 -0
  100. package/scripts/generate-client.mjs +344 -0
  101. package/src/generated/operations.js +9772 -0
  102. package/src/generated/schema.js +8982 -0
  103. package/src/index.js +85 -0
  104. package/src/runtime/client.js +1208 -0
  105. package/src/runtime/error.js +29 -0
  106. package/src/runtime/http.js +174 -0
  107. package/src/runtime/request-shape.js +35 -0
  108. package/src/runtime/schema.js +206 -0
  109. package/src/runtime/suggest.js +74 -0
  110. package/src/runtime/token-store.js +105 -0
@@ -0,0 +1,539 @@
1
+ ---
2
+ sidebar_label: Schema Reference
3
+ ---
4
+
5
+ # Schema Reference
6
+
7
+ This page documents the fields, types, and relationships for the most commonly used ZeyOS resources. Use it as a quick lookup when building queries, creating records, or planning data integrations.
8
+
9
+ ## Conventions
10
+
11
+ - **Timestamps** are Unix timestamps in **seconds** (not milliseconds). Convert with `new Date(value * 1000)` in JavaScript.
12
+ - **Visibility** controls soft-delete behaviour: `0` = regular, `1` = archived, `2` = deleted. Always include `visibility: 0` in filters to exclude archived and deleted records.
13
+ - **GIN-indexed fields** support the `filters` (plural) parameter. Using `filter` (singular) with these fields silently returns unfiltered results. See the [Practical Guide](../02-javascript-client/04-practical-guide.md#filter-vs-filters) for details.
14
+ - Fields marked **(required)** are `NOT NULL` in the database. Most of them have a server-side default (for example `creator` defaults to the authenticated user, `creationdate`/`lastmodified` default to the current time, integer flags default to `0`), so a create that omits them still succeeds. The exception to watch is **`currency` on accounts**: it is `NOT NULL` with no default, so `createAccount` without it fails with an opaque HTTP 500. On updates (PATCH), only the fields you send are changed.
15
+ - **Foreign key fields** (e.g. `account`, `project`, `ticket`) accept integer IDs referencing the related resource.
16
+
17
+ ---
18
+
19
+ ### Accounts
20
+
21
+ | Field | Type | Description |
22
+ |-------|------|-------------|
23
+ | `ID` | integer | Account ID (required) |
24
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
25
+ | `assigneduser` | integer | Assigned user ID |
26
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
27
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
28
+ | `contact` | integer | Contact ID |
29
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
30
+ | `lastname` | text | Last name (surname or company name); required if `firstname` is empty (required) |
31
+ | `firstname` | text | First name (given name); required if `lastname` is empty (required) |
32
+ | `type` | integer | Account type (`0`=PROSPECT, `1`=CUSTOMER, `2`=SUPPLIER, `3`=CUSTOMERANDSUPPLIER, `4`=COMPETITOR, `5`=EMPLOYEE) (required) |
33
+ | `customernum` | text | Customer number; only for PROSPECT, CUSTOMER, CUSTOMERANDSUPPLIER, or EMPLOYEE (required) |
34
+ | `suppliernum` | text | Supplier number; only for SUPPLIER or CUSTOMERANDSUPPLIER (required) |
35
+ | `taxid` | text | Tax ID (e.g. VATIN or SSN) (required) |
36
+ | `currency` | varchar | Currency code (ISO 4217) (required) |
37
+ | `locked` | integer | Deny booking of billing or procurement transactions (required) |
38
+ | `excludetax` | integer | Exclude from taxation (required) |
39
+ | `description` | text | Detailed general description (required) |
40
+
41
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `customernum`, `firstname`, `lastname`, `suppliernum`
42
+
43
+ ---
44
+
45
+ ### Contacts
46
+
47
+ | Field | Type | Description |
48
+ |-------|------|-------------|
49
+ | `ID` | integer | Contact ID (required) |
50
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
51
+ | `assigneduser` | integer | Assigned user ID |
52
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
53
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
54
+ | `davserver` | integer | DAV server ID |
55
+ | `picbinfile` | integer | Binary file ID; read-only (not for PUT or PATCH) |
56
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
57
+ | `lastname` | text | Last name (surname or company name); required if `firstname` is empty (required) |
58
+ | `firstname` | text | First name (given name); required if `lastname` is empty (required) |
59
+ | `type` | integer | Contact type (`0`=COMPANY, `1`=PERSON) (required) |
60
+ | `title` | text | Title or salutation; only for PERSON (required) |
61
+ | `company` | text | Company name; only for PERSON (required) |
62
+ | `position` | text | Position or job title; only for PERSON (required) |
63
+ | `department` | text | Department; only for PERSON (required) |
64
+ | `address` | text | Address (street and building/suite number) (required) |
65
+ | `postalcode` | text | Postal or ZIP code (required) |
66
+ | `city` | text | City or locality (required) |
67
+ | `region` | text | Region or state (required) |
68
+ | `country` | varchar | Country code (ISO 3166-1 alpha-2) (required) |
69
+ | `phone` | text | Primary phone number (required) |
70
+ | `phone2` | text | Secondary phone number (required) |
71
+ | `cell` | text | Cell phone number (required) |
72
+ | `fax` | text | Fax number (required) |
73
+ | `email` | text | Primary e-mail address (required) |
74
+ | `email2` | text | Secondary e-mail address (required) |
75
+ | `website` | text | Website URL (required) |
76
+ | `birthdate` | timestamp | Birth date as Unix timestamp; only for PERSON |
77
+ | `description` | text | Detailed general description (required) |
78
+
79
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `davserver`, `company`, `email`, `email2`, `firstname`, `lastname`
80
+
81
+ ---
82
+
83
+ ### Tickets
84
+
85
+ | Field | Type | Description |
86
+ |-------|------|-------------|
87
+ | `ID` | integer | Ticket ID (required) |
88
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
89
+ | `assigneduser` | integer | Assigned user ID |
90
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
91
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
92
+ | `account` | integer | Account ID; mutually exclusive with `project` |
93
+ | `project` | integer | Project ID; mutually exclusive with `account` |
94
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
95
+ | `name` | text | Name (required) |
96
+ | `ticketnum` | text | Ticket number (required) |
97
+ | `date` | timestamp | Designated date as Unix timestamp (defaults to now on creation) (required) |
98
+ | `duedate` | timestamp | Due date as Unix timestamp |
99
+ | `status` | integer | Status (`0`=NOTSTARTED, `1`=AWAITINGACCEPTANCE, `2`=ACCEPTED, `3`=REJECTED, `4`=ACTIVE, `5`=INACTIVE, `6`=FEEDBACKREQUIRED, `7`=TESTING, `8`=CANCELLED, `9`=COMPLETED, `10`=FAILED, `11`=BOOKED) (required) |
100
+ | `priority` | integer | Priority (`0`=LOWEST, `1`=LOW, `2`=MEDIUM, `3`=HIGH, `4`=HIGHEST) (required) |
101
+ | `description` | text | Detailed general description (required) |
102
+ | `billingitems` | json | JSON-encoded billing items (array) |
103
+ | `procurementitems` | json | JSON-encoded procurement items (array) |
104
+
105
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `project`, `name`, `ticketnum`
106
+
107
+ ---
108
+
109
+ ### Tasks
110
+
111
+ | Field | Type | Description |
112
+ |-------|------|-------------|
113
+ | `ID` | integer | Task ID (required) |
114
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
115
+ | `assigneduser` | integer | Assigned user ID |
116
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
117
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
118
+ | `davserver` | integer | DAV server ID |
119
+ | `ticket` | integer | Ticket ID; mutually exclusive with `project` |
120
+ | `project` | integer | Project ID; mutually exclusive with `ticket` |
121
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
122
+ | `name` | text | Name (required) |
123
+ | `tasknum` | text | Task number (required) |
124
+ | `datefrom` | timestamp | Start date as Unix timestamp |
125
+ | `duedate` | timestamp | Due date as Unix timestamp |
126
+ | `status` | integer | Status (`0`=NOTSTARTED, `1`=AWAITINGACCEPTANCE, `2`=ACCEPTED, `3`=REJECTED, `4`=ACTIVE, `5`=INACTIVE, `6`=FEEDBACKREQUIRED, `7`=TESTING, `8`=CANCELLED, `9`=COMPLETED, `10`=FAILED, `11`=BOOKED) (required) |
127
+ | `priority` | integer | Priority (`0`=LOWEST, `1`=LOW, `2`=MEDIUM, `3`=HIGH, `4`=HIGHEST) (required) |
128
+ | `projectedeffort` | integer | Projected effort in minutes (required) |
129
+ | `description` | text | Detailed general description (required) |
130
+
131
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `davserver`, `project`, `name`, `tasknum`
132
+
133
+ ---
134
+
135
+ ### Projects
136
+
137
+ | Field | Type | Description |
138
+ |-------|------|-------------|
139
+ | `ID` | integer | Project ID (required) |
140
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
141
+ | `assigneduser` | integer | Assigned user ID |
142
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
143
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
144
+ | `account` | integer | Account ID |
145
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
146
+ | `name` | text | Name (required) |
147
+ | `projectnum` | text | Project number (required) |
148
+ | `status` | integer | Status (`0`=DRAFT, `1`=NOTSTARTED, `2`=AWAITINGAPPROVAL, `3`=APPROVED, `4`=DISMISSED, `5`=ACTIVE, `6`=INACTIVE, `7`=TESTING, `8`=CANCELLED, `9`=COMPLETED, `10`=FAILED, `11`=BOOKED) (required) |
149
+ | `description` | text | Detailed general description (required) |
150
+
151
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `name`, `projectnum`
152
+
153
+ ---
154
+
155
+ ### Appointments
156
+
157
+ | Field | Type | Description |
158
+ |-------|------|-------------|
159
+ | `ID` | integer | Appointment ID (required) |
160
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
161
+ | `assigneduser` | integer | Assigned user ID |
162
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
163
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
164
+ | `davserver` | integer | DAV server ID |
165
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
166
+ | `name` | text | Name (required) |
167
+ | `location` | text | Location (required) |
168
+ | `color` | varchar | Color code (CSS hex without `#`) (required) |
169
+ | `datefrom` | timestamp | Start date as Unix timestamp; must be <= `dateto` (required) |
170
+ | `dateto` | timestamp | End date as Unix timestamp; must be >= `datefrom` (required) |
171
+ | `recurrence` | integer | Recurrence (`0`=DAY, `1`=WORKDAY, `2`=WEEK, `3`=MONTH, `4`=YEAR) |
172
+ | `interval` | integer | Recurrence interval in minutes (required) |
173
+ | `maxoccurrences` | integer | Maximum occurrences including start date (`0`=unlimited) (required) |
174
+ | `daterecurrence` | timestamp | Recurrence end date as Unix timestamp |
175
+ | `description` | text | Detailed general description (required) |
176
+
177
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `davserver`, `location`, `name`
178
+
179
+ ---
180
+
181
+ ### Transactions
182
+
183
+ | Field | Type | Description |
184
+ |-------|------|-------------|
185
+ | `ID` | integer | Transaction ID (required) |
186
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
187
+ | `assigneduser` | integer | Assigned user ID |
188
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
189
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
190
+ | `account` | integer | Account ID |
191
+ | `item` | integer | Item ID; must be `null` for BILLING and PROCUREMENT |
192
+ | `contract` | integer | Contract ID |
193
+ | `transactionnum` | text | Transaction number (required) |
194
+ | `type` | integer | Transaction type (`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) (required) |
195
+ | `date` | timestamp | Designated date as Unix timestamp (defaults to now on creation) (required) |
196
+ | `duedate` | timestamp | Due date as Unix timestamp |
197
+ | `status` | integer | Status (`0`=DRAFT, `1`=BOOKED, `2`=HOLD, `3`=CANCELLED, `4`=CLOSED, ... `20`=PAID, `21`=OVERPAID, `22`=PROCESSED, `23`=PROCESSED_CANCELLED) (required) |
198
+ | `calculation` | integer | Calculation method (`0`=NET, `1`=GROSS, `2`=EXACT, `3`=LEGACY, `4`=EXTERNAL) (required) |
199
+ | `productionfactor` | integer | Production factor; required for PRODUCTION, otherwise `null` |
200
+ | `currency` | varchar | Currency code (ISO 4217) (required) |
201
+ | `exchangerate` | float | Exchange rate as multiple of system currency unit (required) |
202
+ | `taxid` | text | Buyer Tax ID (e.g. VATIN or SSN) (required) |
203
+ | `shippingrecipient` | text | Shipping recipient (required) |
204
+ | `shippingaddress` | text | Shipping address (required) |
205
+ | `shippingpostalcode` | text | Shipping postal code (required) |
206
+ | `shippingcity` | text | Shipping city (required) |
207
+ | `shippingregion` | text | Shipping region or state (required) |
208
+ | `shippingcountry` | varchar | Shipping country code (ISO 3166-1 alpha-2) (required) |
209
+ | `billingrecipient` | text | Billing recipient (required) |
210
+ | `billingaddress` | text | Billing address (required) |
211
+ | `billingpostalcode` | text | Billing postal code (required) |
212
+ | `billingcity` | text | Billing city (required) |
213
+ | `billingregion` | text | Billing region or state (required) |
214
+ | `billingcountry` | varchar | Billing country code (ISO 3166-1 alpha-2) (required) |
215
+ | `sellertaxid` | text | Seller Tax ID (required) |
216
+ | `sellername` | text | Seller name (required) |
217
+ | `selleraddress` | text | Seller address (required) |
218
+ | `sellerpostalcode` | text | Seller postal code (required) |
219
+ | `sellercity` | text | Seller city (required) |
220
+ | `sellerregion` | text | Seller region or state (required) |
221
+ | `sellercountry` | varchar | Seller country code (ISO 3166-1 alpha-2) (required) |
222
+ | `discount` | float | Total absolute discount (required) |
223
+ | `netamount` | float | Total net amount (required) |
224
+ | `tax` | float | Total tax amount (required) |
225
+ | `margin` | float | Total absolute margin (required) |
226
+ | `weight` | float | Total shipping weight in kg (required) |
227
+ | `items` | json | JSON-encoded line items (array) |
228
+
229
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `transactionnum`
230
+
231
+ ---
232
+
233
+ ### Items
234
+
235
+ | Field | Type | Description |
236
+ |-------|------|-------------|
237
+ | `ID` | integer | Item ID (required) |
238
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
239
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
240
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
241
+ | `model` | integer | Model item ID; only for non-MODEL items |
242
+ | `picbinfile` | integer | Binary file ID; read-only (not for PUT or PATCH) |
243
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
244
+ | `name` | text | Product name (required) |
245
+ | `manufacturer` | text | Manufacturer (brand or company) (required) |
246
+ | `itemnum` | text | Item number / SKU (required) |
247
+ | `barcode` | text | Barcode (e.g. GTIN, EAN, UPC) (required) |
248
+ | `type` | integer | Item type (`0`=SIMPLE, `1`=SERIALS, `2`=CHARGES, `3`=SERIALSANDCHARGES, `4`=SET, `5`=CONTAINER, `6`=NOSTOCK, `7`=MODEL) (required) |
249
+ | `forcestock` | integer | Force stock check on depletion (`0`=STORAGE, `1`=LOCATION) |
250
+ | `applicability` | integer | Applicability (`0`=ALWAYS, `1`=NEVER, `2`=BILLINGONLY, `3`=PROCUREMENTONLY) (required) |
251
+ | `unit` | varchar | Unit code (UN/CEFACT Recommendation 20) (required) |
252
+ | `sellingprice` | float | Default selling price per unit (required) |
253
+ | `purchaseprice` | float | Default purchase price per unit (required) |
254
+ | `taxrate` | float | Tax rate in percent |
255
+ | `weight` | float | Shipping weight per unit in kg (required) |
256
+ | `classcode` | text | Product classification code (e.g. GPC, UNSPSC) (required) |
257
+ | `tariffcode` | text | Tariff code (e.g. HS, CN, HTS) (required) |
258
+ | `origin` | varchar | Origin country code (ISO 3166-1 alpha-2) (required) |
259
+ | `description` | text | Detailed general description (required) |
260
+ | `foreigntaxrates` | json | Country-specific tax rates; use country code as key |
261
+
262
+ **GIN-indexed fields** (use `filters` plural): `barcode`, `itemnum`, `manufacturer`, `name`
263
+
264
+ ---
265
+
266
+ ### Opportunities
267
+
268
+ | Field | Type | Description |
269
+ |-------|------|-------------|
270
+ | `ID` | integer | Opportunity ID (required) |
271
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
272
+ | `assigneduser` | integer | Assigned user ID |
273
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
274
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
275
+ | `account` | integer | Account ID |
276
+ | `contact` | integer | Contact ID |
277
+ | `campaign` | integer | Campaign ID |
278
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
279
+ | `name` | text | Name (required) |
280
+ | `opportunitynum` | text | Opportunity number (required) |
281
+ | `date` | timestamp | Designated date as Unix timestamp (defaults to now on creation) (required) |
282
+ | `duedate` | timestamp | Due date as Unix timestamp |
283
+ | `status` | integer | Status (`0`=UNEVALUATED, `1`=ELIGIBLE, `2`=FEEDBACKREQUIRED, `3`=INNEGOTIATION, `4`=OFFERED, `5`=ACCEPTED, `6`=REJECTED) (required) |
284
+ | `priority` | integer | Priority (`0`=LOWEST, `1`=LOW, `2`=MEDIUM, `3`=HIGH, `4`=HIGHEST) (required) |
285
+ | `probability` | integer | Probability of success in percent; must be `100` for ACCEPTED (required) |
286
+ | `worstcase` | float | Worst-case monetary outcome (required) |
287
+ | `mostlikely` | float | Most likely monetary outcome (required) |
288
+ | `upside` | float | Upside monetary outcome (required) |
289
+ | `description` | text | Detailed general description (required) |
290
+
291
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `name`, `opportunitynum`
292
+
293
+ ---
294
+
295
+ ### Documents
296
+
297
+ | Field | Type | Description |
298
+ |-------|------|-------------|
299
+ | `ID` | integer | Document ID (required) |
300
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
301
+ | `assigneduser` | integer | Assigned user ID |
302
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
303
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
304
+ | `binfile` | integer | Binary file ID; read-only (not for PUT or PATCH) |
305
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
306
+ | `name` | text | Name (required) |
307
+ | `documentnum` | text | Document number (required) |
308
+ | `status` | integer | Status (`0`=DRAFT, `1`=FEEDBACKREQUIRED, `2`=INREVISION, `3`=AWAITINGAPPROVAL, `4`=FINAL, `5`=OBSOLETE) (required) |
309
+ | `filename` | text | Filename (required) |
310
+ | `mimetype` | text | MIME type (required) |
311
+ | `public` | integer | Publicly accessible (required) |
312
+ | `description` | text | Detailed general description (required) |
313
+
314
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `documentnum`, `filename`, `name`
315
+
316
+ ---
317
+
318
+ ### Notes
319
+
320
+ | Field | Type | Description |
321
+ |-------|------|-------------|
322
+ | `ID` | integer | Note ID (required) |
323
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
324
+ | `assigneduser` | integer | Assigned user ID |
325
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
326
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
327
+ | `binfile` | integer | Binary file ID; read-only (not for PUT or PATCH) |
328
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
329
+ | `name` | text | Name (required) |
330
+ | `status` | integer | Status (`0`=DRAFT, `1`=FEEDBACKREQUIRED, `2`=INREVISION, `3`=AWAITINGAPPROVAL, `4`=FINAL, `5`=OBSOLETE) (required) |
331
+ | `contenttype` | text | Content MIME type (required) |
332
+ | `text` | text | Plain text content (required) |
333
+ | `attachments` | text[] | Array of attachment filenames |
334
+ | `description` | text | Detailed general description (required) |
335
+
336
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `name`
337
+
338
+ ---
339
+
340
+ ### Messages
341
+
342
+ | Field | Type | Description |
343
+ |-------|------|-------------|
344
+ | `ID` | integer | Message ID (required) |
345
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
346
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
347
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
348
+ | `mailserver` | integer | Mail server ID |
349
+ | `ticket` | integer | Ticket ID; mutually exclusive with `opportunity` |
350
+ | `opportunity` | integer | Opportunity ID; mutually exclusive with `ticket` |
351
+ | `mailinglist` | integer | Mailing list ID |
352
+ | `reference` | integer | Reference message (reply-to) ID; must be distinct from `ID` |
353
+ | `binfile` | integer | Binary file ID; read-only (not for PUT or PATCH) |
354
+ | `mailbox` | integer | Mailbox type (`0`=INBOX, `1`=DRAFTS, `2`=SENT, `3`=TEMPLATES, `4`=MAILINGS, `5`=ARCHIVE, `6`=TRASH, `7`=JUNK) (required) |
355
+ | `verified` | integer | Verified sender e-mail address (required) |
356
+ | `date` | timestamp | Designated date as Unix timestamp (defaults to now on creation) (required) |
357
+ | `subject` | text | Subject (required) |
358
+ | `sender` | text | Sender name and e-mail address (required) |
359
+ | `sender_email` | text | Sender e-mail address (required) |
360
+ | `sender_name` | text | Sender name (required) |
361
+ | `to` | text | All regular recipient names and e-mail addresses (required) |
362
+ | `to_email` | text | First regular recipient e-mail address (required) |
363
+ | `to_name` | text | First regular recipient name (required) |
364
+ | `to_count` | integer | Number of regular recipients (required) |
365
+ | `cc` | text | Carbon copy recipients (required) |
366
+ | `bcc` | text | Blind carbon copy recipients (required) |
367
+ | `contenttype` | text | Content MIME type (required) |
368
+ | `text` | text | Plain text content (required) |
369
+ | `attachments` | text[] | Array of attachment filenames |
370
+ | `senddate` | timestamp | Scheduled send date as Unix timestamp |
371
+ | `senderror` | text | Last send error message (required) |
372
+ | `messageid` | text | Message-ID header (required) |
373
+
374
+ **GIN-indexed fields** (use `filters` plural): `mailinglist`, `mailserver`, `sender`, `subject`, `to`
375
+
376
+ ---
377
+
378
+ ### Comments
379
+
380
+ | Field | Type | Description |
381
+ |-------|------|-------------|
382
+ | `ID` | timestamp | Comment ID (required) |
383
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
384
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
385
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
386
+ | `record` | timestamp | Record ID (parent record dependency) (required) |
387
+ | `date` | timestamp | Designated date as Unix timestamp (defaults to now on creation) (required) |
388
+ | `sender` | text | Sender (required) |
389
+ | `text` | text | Comment text (Markdown for rich text) (required) |
390
+ | `meta` | json | JSON-encoded metadata (object) |
391
+
392
+ ---
393
+
394
+ ### Events
395
+
396
+ | Field | Type | Description |
397
+ |-------|------|-------------|
398
+ | `ID` | integer | Event ID (required) |
399
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
400
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
401
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
402
+ | `entity` | t_entity | Canonical entity (required) |
403
+ | `index` | integer | Entity ID (required) |
404
+ | `name` | text | Name (required) |
405
+ | `color` | varchar | Color code (CSS hex without `#`) (required) |
406
+ | `datefrom` | timestamp | Start date as Unix timestamp; must be <= `dateto` (required) |
407
+ | `dateto` | timestamp | End date as Unix timestamp; must be >= `datefrom` (required) |
408
+ | `meta` | json | JSON-encoded metadata (object) |
409
+
410
+ ---
411
+
412
+ ### Campaigns
413
+
414
+ | Field | Type | Description |
415
+ |-------|------|-------------|
416
+ | `ID` | integer | Campaign ID (required) |
417
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
418
+ | `assigneduser` | integer | Assigned user ID |
419
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
420
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
421
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
422
+ | `name` | text | Name (required) |
423
+ | `datefrom` | timestamp | Start date as Unix timestamp; must be <= `dateto` (required) |
424
+ | `dateto` | timestamp | End date as Unix timestamp; must be >= `datefrom` |
425
+ | `status` | integer | Status (`0`=DRAFT, `1`=NOTSTARTED, `2`=AWAITINGAPPROVAL, `3`=APPROVED, `4`=DISMISSED, `5`=ACTIVE, `6`=INACTIVE, `7`=INEVALUATION, `8`=CANCELLED, `9`=CLOSED) (required) |
426
+ | `description` | text | Detailed general description (required) |
427
+
428
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `name`
429
+
430
+ ---
431
+
432
+ ### Contracts
433
+
434
+ | Field | Type | Description |
435
+ |-------|------|-------------|
436
+ | `ID` | integer | Contract ID (required) |
437
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
438
+ | `assigneduser` | integer | Assigned user ID |
439
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
440
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
441
+ | `account` | integer | Account ID |
442
+ | `visibility` | integer | Visibility (`0`=REGULAR, `1`=ARCHIVED, `2`=DELETED) (required) |
443
+ | `name` | text | Name (required) |
444
+ | `contractnum` | text | Contract number (required) |
445
+ | `date` | timestamp | Designated date as Unix timestamp (defaults to now on creation) (required) |
446
+ | `datefrom` | timestamp | Start date as Unix timestamp; must be <= `dateto` |
447
+ | `dateto` | timestamp | End date as Unix timestamp; must be >= `datefrom` |
448
+ | `datecancel` | timestamp | Cancellation date as Unix timestamp |
449
+ | `status` | integer | Status (`0`=DRAFT, `1`=AWAITINGAPPROVAL, `2`=APPROVED, `3`=DISMISSED, `4`=ACTIVE, `5`=INACTIVE, `6`=EXPIRED, `7`=CANCELLED, `8`=CLOSED) (required) |
450
+ | `currency` | varchar | Currency code (ISO 4217) (required) |
451
+ | `exchangerate` | float | Exchange rate as multiple of system currency unit (required) |
452
+ | `billingcycle` | integer | Billing cycle in months |
453
+ | `lastbilling` | timestamp | Last billing date as Unix timestamp |
454
+ | `description` | text | Detailed general description (required) |
455
+ | `contractitems` | json | JSON-encoded contract items (array) |
456
+ | `billingitems` | json | JSON-encoded billing items (array) |
457
+ | `procurementitems` | json | JSON-encoded procurement items (array) |
458
+ | `autobilling` | json | JSON-encoded auto-billing data; only if `billingcycle` is set |
459
+
460
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `status`, `contractnum`, `name`
461
+
462
+ ---
463
+
464
+ ### Files
465
+
466
+ | Field | Type | Description |
467
+ |-------|------|-------------|
468
+ | `ID` | timestamp | File ID (required) |
469
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
470
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
471
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
472
+ | `record` | timestamp | Record ID (parent dependency); mutually exclusive with `comment` |
473
+ | `comment` | timestamp | Comment ID (parent dependency); mutually exclusive with `record` |
474
+ | `binfile` | integer | Binary file ID; read-only (not for PUT or PATCH) |
475
+ | `filename` | text | Filename (required) |
476
+ | `mimetype` | text | MIME type (required) |
477
+
478
+ **GIN-indexed fields** (use `filters` plural): `filename`
479
+
480
+ ---
481
+
482
+ ### Payments
483
+
484
+ | Field | Type | Description |
485
+ |-------|------|-------------|
486
+ | `ID` | integer | Payment ID (required) |
487
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
488
+ | `assigneduser` | integer | Assigned user ID |
489
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
490
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
491
+ | `ledger` | integer | Ledger ID |
492
+ | `transaction` | integer | Transaction ID; mutually exclusive with `account` |
493
+ | `account` | integer | Account ID; mutually exclusive with `transaction` |
494
+ | `date` | timestamp | Designated date as Unix timestamp (defaults to now on creation) (required) |
495
+ | `subject` | text | Subject (e.g. bank statement or reference number) (required) |
496
+ | `status` | integer | Status (`0`=DRAFT, `1`=COMPLETED, `2`=CANCELLED, `3`=BOOKED) (required) |
497
+ | `amount` | float | Amount (monetary) (required) |
498
+ | `autoadvance` | integer | Auto-advance to next transaction (required) |
499
+ | `description` | text | Detailed general description (required) |
500
+
501
+ **GIN-indexed fields** (use `filters` plural): `assigneduser`, `ledger`, `subject`
502
+
503
+ ---
504
+
505
+ ### Users
506
+
507
+ | Field | Type | Description |
508
+ |-------|------|-------------|
509
+ | `ID` | integer | User ID (required) |
510
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
511
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
512
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
513
+ | `contact` | integer | Contact ID |
514
+ | `activity` | integer | Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED) (required) |
515
+ | `name` | text | Username (case-insensitively unique) (required) |
516
+ | `email` | text | System e-mail address (case-insensitively unique) (required) |
517
+ | `nopublic` | integer | Deny access to public data (required) |
518
+ | `apionly` | integer | Restricted to API access, no regular login (required) |
519
+ | `expdate` | timestamp | Expiry date as Unix timestamp |
520
+ | `description` | text | Description (required) |
521
+
522
+ **GIN-indexed fields** (use `filters` plural): `email`, `name`
523
+
524
+ ---
525
+
526
+ ### Groups
527
+
528
+ | Field | Type | Description |
529
+ |-------|------|-------------|
530
+ | `ID` | integer | Group ID (required) |
531
+ | `creator` | integer | Creator user ID (defaults to authenticated user on creation) |
532
+ | `creationdate` | timestamp | Creation date as Unix timestamp (defaults to now on creation) (required) |
533
+ | `lastmodified` | timestamp | Last modification date as Unix timestamp (auto-reset on modification) (required) |
534
+ | `leader` | integer | Leader user ID |
535
+ | `activity` | integer | Activity (`0`=ACTIVE, `1`=DEACTIVATED, `2`=DELETED) (required) |
536
+ | `name` | text | Name (case-insensitively unique) (required) |
537
+ | `description` | text | Description (required) |
538
+
539
+ **GIN-indexed fields** (use `filters` plural): `name`
@@ -0,0 +1,9 @@
1
+ {
2
+ "label": "API Reference",
3
+ "position": 2,
4
+ "collapsed": false,
5
+ "link": {
6
+ "type": "generated-index",
7
+ "description": "Complete reference for the ZeyOS REST API: query language, authentication, resource endpoints, and field schemas."
8
+ }
9
+ }