@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,415 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "ZeyOS Legacy Authentication API",
5
+ "termsOfService": "https://www.zeyos.com/termsofservice",
6
+ "contact": {
7
+ "name": "ZeyOS GmbH & Co. KG",
8
+ "url": "https://www.zeyos.com",
9
+ "email": "info@zeyos.com"
10
+ },
11
+ "version": "v1"
12
+ },
13
+ "externalDocs": {
14
+ "description": "ZeyOS Developer Center",
15
+ "url": "https://developers.zeyos.com"
16
+ },
17
+ "servers": [
18
+ {
19
+ "url": "https://cloud.zeyos.com/{INSTANCE}/auth/v1",
20
+ "description": "ZeyOS Cloud",
21
+ "variables": {
22
+ "INSTANCE": {
23
+ "default": "demo"
24
+ }
25
+ }
26
+ }
27
+ ],
28
+ "tags": [
29
+ {
30
+ "name": "general",
31
+ "description": "General Authentication"
32
+ },
33
+ {
34
+ "name": "token",
35
+ "description": "Token Authentication"
36
+ }
37
+ ],
38
+ "components": {
39
+ "securitySchemes": {
40
+ "token": {
41
+ "type": "http",
42
+ "scheme": "bearer",
43
+ "description": "HTTP Bearer Authentication ([RFC 6750](https://tools.ietf.org/html/rfc6750))"
44
+ },
45
+ "session": {
46
+ "type": "apiKey",
47
+ "name": "ZEYOSID",
48
+ "in": "cookie",
49
+ "description": "Session Cookie Authentication ([RFC 6265](https://tools.ietf.org/html/rfc6265))"
50
+ }
51
+ },
52
+ "schemas": {
53
+ "login": {
54
+ "type": "object",
55
+ "required": ["name", "password", "identifier"],
56
+ "properties": {
57
+ "name": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "description": "Username or e-mail address",
61
+ "example": "john.doe"
62
+ },
63
+ "password": {
64
+ "type": "string",
65
+ "format": "password",
66
+ "description": "Password",
67
+ "example": "**********"
68
+ },
69
+ "identifier": {
70
+ "type": "string",
71
+ "pattern": "^[a-zA-Z0-9_.:-]+$",
72
+ "description": "Client's persistent universally unique identifier (e.g. device ID or MAC address)",
73
+ "example": "95418037-cd82-4ab2-992a-e01370865286"
74
+ },
75
+ "appsecret": {
76
+ "type": "string",
77
+ "format": "password",
78
+ "description": "Application's API secret key",
79
+ "example": "519d6241f455abbe71d93e0de58083534473a65a"
80
+ },
81
+ "otp": {
82
+ "type": "string",
83
+ "format": "password",
84
+ "description": "OTP authentication code for 2FA (optional)",
85
+ "example": "123456"
86
+ },
87
+ "expdate": {
88
+ "type": "integer",
89
+ "format": "int64",
90
+ "nullable": true,
91
+ "default": null,
92
+ "description": "Token expiry date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) (optional, defaults to 100 days from now)",
93
+ "example": 872838840
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "responses": {
99
+ "401": {
100
+ "description": "Unauthorized",
101
+ "headers": {
102
+ "WWW-Authenticate": {
103
+ "description": "Preferred authentication scheme ([RFC 7235](https://tools.ietf.org/html/rfc7235#section-4.1))",
104
+ "schema": {
105
+ "type": "string",
106
+ "example": "Bearer realm=\"{INSTANCE}\" error=\"invalid_token\""
107
+ }
108
+ }
109
+ },
110
+ "content": {
111
+ "text/plain": {
112
+ "schema": {
113
+ "type": "string",
114
+ "example": "Unauthorized: Invalid bearer token"
115
+ }
116
+ }
117
+ }
118
+ },
119
+ "500": {
120
+ "description": "Runtime Error (Internal Server Error)",
121
+ "content": {
122
+ "text/plain": {
123
+ "schema": {
124
+ "type": "string",
125
+ "example": "I am afraid I can't do that Dave!"
126
+ }
127
+ }
128
+ }
129
+ }
130
+ }
131
+ },
132
+ "paths": {
133
+ "/": {
134
+ "get": {
135
+ "tags": ["general"],
136
+ "summary": "Get User info",
137
+ "description": "Authenticate with header-supplied credentials and return user info.",
138
+ "operationId": "getUserInfo",
139
+ "deprecated": true,
140
+ "security": [
141
+ {
142
+ "token": []
143
+ },
144
+ {
145
+ "session": []
146
+ }
147
+ ],
148
+ "parameters": [
149
+ {
150
+ "name": "access",
151
+ "in": "query",
152
+ "description": "Return user access info (`admin`, `nopublic`, `apionly`, `groups` and `permissions`)",
153
+ "schema": {
154
+ "type": "integer",
155
+ "enum": [0, 1],
156
+ "default": 0
157
+ }
158
+ },
159
+ {
160
+ "name": "settings",
161
+ "in": "query",
162
+ "description": "Return user settings (`settings`)",
163
+ "schema": {
164
+ "type": "integer",
165
+ "enum": [0, 1],
166
+ "default": 0
167
+ }
168
+ }
169
+ ],
170
+ "responses": {
171
+ "200": {
172
+ "description": "Successful Authentication (OK)",
173
+ "content": {
174
+ "application/json": {
175
+ "schema": {
176
+ "type": "object",
177
+ "properties": {
178
+ "auth": {
179
+ "properties": {
180
+ "user": {
181
+ "type": "integer",
182
+ "format": "int32",
183
+ "example": 1
184
+ },
185
+ "application": {
186
+ "type": "integer",
187
+ "format": "int32",
188
+ "nullable": true,
189
+ "example": 6
190
+ },
191
+ "lang": {
192
+ "type": "string",
193
+ "enum": ["de_DE", "en_US", "es_ES"],
194
+ "example": "en_US"
195
+ }
196
+ }
197
+ },
198
+ "user": {
199
+ "type": "integer",
200
+ "format": "int32",
201
+ "description": "User ID",
202
+ "example": 1
203
+ },
204
+ "contact": {
205
+ "type": "integer",
206
+ "format": "int32",
207
+ "nullable": true,
208
+ "description": "User's contact ID",
209
+ "example": null
210
+ },
211
+ "name": {
212
+ "type": "string",
213
+ "minLength": 1,
214
+ "description": "Username",
215
+ "example": "john.doe"
216
+ },
217
+ "email": {
218
+ "type": "string",
219
+ "format": "email",
220
+ "minLength": 1,
221
+ "description": "User's system e-mail address",
222
+ "example": "john.doe@company.com"
223
+ },
224
+ "admin": {
225
+ "type": "boolean",
226
+ "description": "User is an administrator",
227
+ "example": true
228
+ },
229
+ "nopublic": {
230
+ "type": "boolean",
231
+ "description": "User has no access to public data",
232
+ "example": false
233
+ },
234
+ "apionly": {
235
+ "type": "boolean",
236
+ "description": "User is restricted to API access, no regular login",
237
+ "example": false
238
+ },
239
+ "groups": {
240
+ "type": "object",
241
+ "description": "User's group IDs and respective writabilities",
242
+ "example": {
243
+ "1": true,
244
+ "7": false,
245
+ "13": true
246
+ }
247
+ },
248
+ "permissions": {
249
+ "type": "object",
250
+ "description": "User's permissions and respective writabilities",
251
+ "example": {
252
+ "billing": false,
253
+ "inventory": false,
254
+ "messages": true,
255
+ "notes": true,
256
+ "opportunities": false,
257
+ "tasks": true
258
+ }
259
+ },
260
+ "settings": {
261
+ "type": "object",
262
+ "description": "User's personal settings"
263
+ }
264
+ }
265
+ }
266
+ }
267
+ }
268
+ },
269
+ "401": {
270
+ "$ref": "#/components/responses/401"
271
+ },
272
+ "500": {
273
+ "$ref": "#/components/responses/500"
274
+ }
275
+ }
276
+ },
277
+ "head": {
278
+ "tags": ["general"],
279
+ "summary": "Verify credentials",
280
+ "description": "Authenticate with header-supplied credentials, but do not return any user info.",
281
+ "operationId": "verify",
282
+ "deprecated": true,
283
+ "security": [
284
+ {
285
+ "token": []
286
+ },
287
+ {
288
+ "session": []
289
+ }
290
+ ],
291
+ "responses": {
292
+ "204": {
293
+ "description": "Successful Authentication (No Content)"
294
+ },
295
+ "401": {
296
+ "$ref": "#/components/responses/401"
297
+ },
298
+ "500": {
299
+ "$ref": "#/components/responses/500"
300
+ }
301
+ }
302
+ }
303
+ },
304
+ "/login": {
305
+ "post": {
306
+ "tags": ["token"],
307
+ "summary": "Login",
308
+ "description": "Login with specified credentials and return a new auto-generated, cryptographically secure and persistent bearer token for subsequent requests' authentication. Use **`GET /logout`** to eventually logout and invalidate that token.",
309
+ "operationId": "login",
310
+ "deprecated": true,
311
+ "requestBody": {
312
+ "required": true,
313
+ "content": {
314
+ "application/x-www-form-urlencoded": {
315
+ "schema": {
316
+ "$ref": "#/components/schemas/login"
317
+ }
318
+ },
319
+ "application/json": {
320
+ "schema": {
321
+ "$ref": "#/components/schemas/login"
322
+ }
323
+ }
324
+ }
325
+ },
326
+ "responses": {
327
+ "200": {
328
+ "description": "Successful Login (OK)",
329
+ "content": {
330
+ "application/json": {
331
+ "schema": {
332
+ "type": "object",
333
+ "required": ["user", "application", "token", "identifier", "expdate"],
334
+ "properties": {
335
+ "user": {
336
+ "type": "integer",
337
+ "format": "int32",
338
+ "description": "User ID`",
339
+ "example": 6
340
+ },
341
+ "application": {
342
+ "type": "integer",
343
+ "format": "int32",
344
+ "nullable": true,
345
+ "description": "Application ID`",
346
+ "example": 6
347
+ },
348
+ "token": {
349
+ "type": "string",
350
+ "format": "password",
351
+ "pattern": "^[a-f0-9]{40}$",
352
+ "description": "Auto-generated bearer token for use in subsequent requests' `Authorization` header",
353
+ "example": "97c4281ea528ef02ba573fffce2fa80a3a8414b7"
354
+ },
355
+ "identifier": {
356
+ "type": "string",
357
+ "pattern": "^[a-zA-Z0-9_.:-]+$",
358
+ "description": "Client's persistent universally unique identifier (e.g. device ID or MAC address)",
359
+ "example": "95418037-cd82-4ab2-992a-e01370865286"
360
+ },
361
+ "expdate": {
362
+ "type": "integer",
363
+ "format": "int64",
364
+ "description": "Expiry date and time as a [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time)",
365
+ "example": 872838840
366
+ }
367
+ }
368
+ }
369
+ }
370
+ }
371
+ },
372
+ "401": {
373
+ "description": "Unauthorized",
374
+ "content": {
375
+ "text/plain": {
376
+ "schema": {
377
+ "type": "string",
378
+ "example": "Unauthorized: Invalid credentials"
379
+ }
380
+ }
381
+ }
382
+ },
383
+ "500": {
384
+ "$ref": "#/components/responses/500"
385
+ }
386
+ }
387
+ }
388
+ },
389
+ "/logout": {
390
+ "get": {
391
+ "tags": ["token"],
392
+ "summary": "Logout",
393
+ "description": "Logout and invalidate token. Any subsequent request that uses that token will fail to authenticate.",
394
+ "operationId": "logout",
395
+ "deprecated": true,
396
+ "security": [
397
+ {
398
+ "token": []
399
+ }
400
+ ],
401
+ "responses": {
402
+ "204": {
403
+ "description": "Successful Logout (No Content)"
404
+ },
405
+ "401": {
406
+ "$ref": "#/components/responses/401"
407
+ },
408
+ "500": {
409
+ "$ref": "#/components/responses/500"
410
+ }
411
+ }
412
+ }
413
+ }
414
+ }
415
+ }