@tulipes/cli 0.1.0 → 0.2.0-rc.1
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/README.md +11 -8
- package/dist/agent.d.ts +12 -0
- package/dist/agent.js +29 -0
- package/dist/agent.js.map +1 -0
- package/dist/app-core.d.ts +8 -6
- package/dist/app-core.js +23 -14
- package/dist/app-core.js.map +1 -1
- package/dist/bin.js +3 -3
- package/dist/bin.js.map +1 -1
- package/dist/config-check.d.ts +8 -0
- package/dist/config-check.js +43 -0
- package/dist/config-check.js.map +1 -0
- package/dist/config-import.d.ts +20 -0
- package/dist/config-import.js +133 -0
- package/dist/config-import.js.map +1 -0
- package/dist/dev.d.ts +4 -4
- package/dist/dev.js +7 -10
- package/dist/dev.js.map +1 -1
- package/dist/init.d.ts +6 -11
- package/dist/init.js +17 -6420
- package/dist/init.js.map +1 -1
- package/dist/inspection.d.ts +9 -8
- package/dist/inspection.js +10 -11
- package/dist/inspection.js.map +1 -1
- package/dist/main.js +82 -11
- package/dist/main.js.map +1 -1
- package/dist/migrate.d.ts +30 -0
- package/dist/migrate.js +772 -0
- package/dist/migrate.js.map +1 -0
- package/dist/new-module.js +87 -46
- package/dist/new-module.js.map +1 -1
- package/dist/routes.d.ts +3 -5
- package/dist/routes.js +4 -6
- package/dist/routes.js.map +1 -1
- package/dist/spec.d.ts +2 -5
- package/dist/spec.js +13 -6
- package/dist/spec.js.map +1 -1
- package/dist/sync.d.ts +3 -11
- package/dist/sync.js +81 -20
- package/dist/sync.js.map +1 -1
- package/dist/template.d.ts +58 -0
- package/dist/template.js +244 -0
- package/dist/template.js.map +1 -0
- package/dist/update.js +4 -4
- package/package.json +17 -16
- package/templates/AGENTS.md +162 -0
- package/templates/CLAUDE.md +11 -118
- package/templates/app/.envs/.env.development +18 -0
- package/templates/app/.envs/.env.production +19 -0
- package/templates/app/.envs/.env.staging +19 -0
- package/templates/app/README.md +327 -0
- package/templates/app/app.ts +3 -0
- package/templates/app/config/app.config.ts +73 -0
- package/templates/app/docs/agent-manifest.json +724 -0
- package/templates/app/ecosystem.config.cjs +60 -0
- package/templates/app/modules/agent/controllers/agent.controllers.ts +31 -0
- package/templates/app/modules/agent/i18n/en.json +5 -0
- package/templates/app/modules/agent/i18n/fr.json +5 -0
- package/templates/app/modules/agent/module.acl.ts +14 -0
- package/templates/app/modules/agent/package.json +21 -0
- package/templates/app/modules/agent/routes/agent.routes.ts +29 -0
- package/templates/app/modules/agent/schemas/agent.schemas.ts +9 -0
- package/templates/app/modules/auth/bootstrap/credentials.bootstrap.ts +26 -0
- package/templates/app/modules/auth/bootstrap/seed-admin.bootstrap.ts +44 -0
- package/templates/app/modules/auth/controllers/auth.controllers.ts +312 -0
- package/templates/app/modules/auth/helpers/access-check.ts +42 -0
- package/templates/app/modules/auth/helpers/auth.ts +48 -0
- package/templates/app/modules/auth/helpers/documents.ts +57 -0
- package/templates/app/modules/auth/helpers/passport.ts +180 -0
- package/templates/app/modules/auth/helpers/passwords.ts +58 -0
- package/templates/app/modules/auth/helpers/session-cache.ts +67 -0
- package/templates/app/modules/auth/helpers/tokens.ts +329 -0
- package/templates/app/modules/auth/i18n/en.json +19 -0
- package/templates/app/modules/auth/i18n/fr.json +19 -0
- package/templates/app/modules/auth/lib/index.ts +12 -0
- package/templates/app/modules/auth/models/credential.model.ts +31 -0
- package/templates/app/modules/auth/models/revoked-token.model.ts +20 -0
- package/templates/app/modules/auth/models/session.model.ts +42 -0
- package/templates/app/modules/auth/module.acl.ts +41 -0
- package/templates/app/modules/auth/module.config.ts +30 -0
- package/templates/app/modules/auth/package.json +61 -0
- package/templates/app/modules/auth/routes/auth.routes.ts +94 -0
- package/templates/app/modules/auth/schemas/auth.schemas.ts +37 -0
- package/templates/app/modules/auth/tests/auth.test.ts +1079 -0
- package/templates/app/modules/config/controllers/config.controllers.ts +89 -0
- package/templates/app/modules/config/helpers/audit.ts +41 -0
- package/templates/app/modules/config/helpers/describe.ts +72 -0
- package/templates/app/modules/config/i18n/en.json +6 -0
- package/templates/app/modules/config/i18n/fr.json +6 -0
- package/templates/app/modules/config/models/config-audit.model.ts +26 -0
- package/templates/app/modules/config/module.acl.ts +12 -0
- package/templates/app/modules/config/package.json +23 -0
- package/templates/app/modules/config/routes/config.routes.ts +37 -0
- package/templates/app/modules/config/schemas/config.schemas.ts +13 -0
- package/templates/app/modules/config/tests/config.test.ts +126 -0
- package/templates/app/modules/core/bootstrap/cache.bootstrap.ts +12 -0
- package/templates/app/modules/core/helpers/cache/index.ts +60 -0
- package/templates/app/modules/core/helpers/cache/memory-cache.ts +53 -0
- package/templates/app/modules/core/helpers/cache/redis-cache.ts +68 -0
- package/templates/app/modules/core/helpers/cache/types.ts +37 -0
- package/templates/app/modules/core/helpers/lazy.ts +13 -0
- package/templates/app/modules/core/helpers/logger/index.ts +115 -0
- package/templates/app/modules/core/helpers/mongoose/index.ts +27 -0
- package/templates/app/modules/core/helpers/mongoose/plugins/base.plugin.ts +14 -0
- package/templates/app/modules/core/helpers/mongoose/plugins/soft-delete.plugin.ts +124 -0
- package/templates/app/modules/core/helpers/mongoose/plugins/timestamps.plugin.ts +13 -0
- package/templates/app/modules/core/helpers/mongoose/plugins/types.ts +45 -0
- package/templates/app/modules/core/helpers/mongoose/register.ts +20 -0
- package/templates/app/modules/core/lib/index.ts +34 -0
- package/templates/app/modules/core/module.config.ts +24 -0
- package/templates/app/modules/core/package.json +80 -0
- package/templates/app/modules/core/routes/core.routes.ts +24 -0
- package/templates/app/modules/core/tests/core.test.ts +19 -0
- package/templates/app/modules/hello/agent/hello.agent.ts +33 -0
- package/templates/app/modules/hello/bootstrap/seed-greetings.bootstrap.ts +27 -0
- package/templates/app/modules/hello/controllers/greetings.controllers.ts +43 -0
- package/templates/app/modules/hello/controllers/hello.controllers.ts +50 -0
- package/templates/app/modules/hello/helpers/greeting.ts +8 -0
- package/templates/app/modules/hello/i18n/en.json +8 -0
- package/templates/app/modules/hello/i18n/fr.json +8 -0
- package/templates/app/modules/hello/models/greeting.model.ts +24 -0
- package/templates/app/modules/hello/module.acl.ts +16 -0
- package/templates/app/modules/hello/module.config.ts +14 -0
- package/templates/app/modules/hello/package.json +24 -0
- package/templates/app/modules/hello/queues/hello.queues.ts +38 -0
- package/templates/app/modules/hello/routes/greetings.routes.ts +25 -0
- package/templates/app/modules/hello/routes/hello.routes.ts +44 -0
- package/templates/app/modules/hello/sockets/hello.sockets.ts +21 -0
- package/templates/app/modules/hello/tests/hello.test.ts +19 -0
- package/templates/app/modules/security/bootstrap/rate-limit.bootstrap.ts +8 -0
- package/templates/app/modules/security/helpers/hardening.ts +65 -0
- package/templates/app/modules/security/helpers/proxy.ts +16 -0
- package/templates/app/modules/security/helpers/rate-limit.ts +150 -0
- package/templates/app/modules/security/module.config.ts +59 -0
- package/templates/app/modules/security/package.json +26 -0
- package/templates/app/modules/security/routes/security.routes.ts +42 -0
- package/templates/app/modules/security/tests/security.test.ts +174 -0
- package/templates/app/modules/settings/bootstrap/log-streams.bootstrap.ts +12 -0
- package/templates/app/modules/settings/controllers/settings.controllers.ts +58 -0
- package/templates/app/modules/settings/helpers/access-lease.ts +99 -0
- package/templates/app/modules/settings/helpers/log-stream.ts +272 -0
- package/templates/app/modules/settings/helpers/log-tail.ts +253 -0
- package/templates/app/modules/settings/i18n/en.json +3 -0
- package/templates/app/modules/settings/i18n/fr.json +3 -0
- package/templates/app/modules/settings/module.acl.ts +12 -0
- package/templates/app/modules/settings/package.json +21 -0
- package/templates/app/modules/settings/routes/settings.routes.ts +33 -0
- package/templates/app/modules/settings/schemas/settings.schemas.ts +8 -0
- package/templates/app/modules/settings/tests/settings.test.ts +409 -0
- package/templates/app/modules/users/controllers/users.controllers.ts +113 -0
- package/templates/app/modules/users/i18n/en.json +14 -0
- package/templates/app/modules/users/i18n/fr.json +14 -0
- package/templates/app/modules/users/models/user.model.ts +18 -0
- package/templates/app/modules/users/module.acl.ts +10 -0
- package/templates/app/modules/users/module.config.ts +11 -0
- package/templates/app/modules/users/package.json +24 -0
- package/templates/app/modules/users/queues/users.queues.ts +31 -0
- package/templates/app/modules/users/routes/users.routes.ts +60 -0
- package/templates/app/modules/users/schemas/users.schemas.ts +30 -0
- package/templates/app/modules/users/sockets/users.sockets.ts +18 -0
- package/templates/app/nginx/development.conf +44 -0
- package/templates/app/nginx/production.conf +75 -0
- package/templates/app/nginx/staging.conf +51 -0
- package/templates/app/package.json +58 -0
- package/templates/app/scripts/count-greetings.ts +29 -0
- package/templates/app/scripts/deploy-nginx.ts +143 -0
- package/templates/app/scripts/list-users.ts +34 -0
- package/templates/app/tests/app.test.ts +28 -0
- package/templates/app/tests/support.ts +36 -0
- package/templates/app/tsconfig.json +28 -0
- package/templates/app/vitest.config.ts +6 -0
- package/templates/app/worker.ts +6 -0
- package/templates/claude/skills/tulipes-agent-tool/SKILL.md +83 -0
- package/templates/claude/skills/tulipes-boot-errors/SKILL.md +11 -5
- package/templates/claude/skills/tulipes-config/SKILL.md +74 -0
- package/templates/claude/skills/tulipes-endpoint/SKILL.md +38 -25
- package/templates/claude/skills/tulipes-env-variable/SKILL.md +54 -26
- package/templates/claude/skills/tulipes-model/SKILL.md +11 -4
- package/templates/claude/skills/tulipes-module/SKILL.md +11 -10
- package/templates/claude/skills/tulipes-queue/SKILL.md +20 -6
- package/templates/claude/skills/tulipes-settings/SKILL.md +49 -100
- package/templates/claude/skills/tulipes-spec/SKILL.md +10 -12
- package/templates/minimal/README.md +21 -0
- package/templates/minimal/app.ts +3 -0
- package/templates/minimal/config/app.config.ts +16 -0
- package/templates/minimal/modules/agent/module.acl.ts +3 -0
- package/templates/minimal/modules/agent/package.json +14 -0
- package/templates/minimal/modules/agent/routes/agent.routes.ts +20 -0
- package/templates/minimal/modules/core/module.acl.ts +4 -0
- package/templates/minimal/modules/core/package.json +21 -0
- package/templates/minimal/modules/hello/i18n/en.json +3 -0
- package/templates/minimal/modules/hello/module.acl.ts +2 -0
- package/templates/minimal/modules/hello/package.json +11 -0
- package/templates/minimal/modules/hello/routes/health.routes.ts +9 -0
- package/templates/minimal/modules/hello/routes/hello.routes.ts +10 -0
- package/templates/minimal/modules/security/package.json +15 -0
- package/templates/minimal/modules/security/routes/security.routes.ts +8 -0
- package/templates/minimal/package.json +38 -0
- package/templates/minimal/tests/app.test.ts +52 -0
- package/templates/minimal/tsconfig.json +22 -0
- package/templates/minimal/vitest.config.ts +5 -0
- package/templates/overlays/no-queues/ecosystem.config.cjs +52 -0
- package/templates/overlays/no-queues/modules/hello/controllers/greetings.controllers.ts +41 -0
- package/templates/overlays/no-queues/modules/users/controllers/users.controllers.ts +107 -0
- package/templates/versions.json +11 -0
- package/dist/minimal.d.ts +0 -2
- package/dist/minimal.js +0 -2200
- package/dist/minimal.js.map +0 -1
- /package/templates/{browser-auth.md → app/docs/browser-auth.md} +0 -0
|
@@ -0,0 +1,724 @@
|
|
|
1
|
+
{
|
|
2
|
+
"app": {
|
|
3
|
+
"name": "tulipes-example"
|
|
4
|
+
},
|
|
5
|
+
"authorization": "acl",
|
|
6
|
+
"modules": [
|
|
7
|
+
{
|
|
8
|
+
"name": "auth",
|
|
9
|
+
"tools": [
|
|
10
|
+
"auth_register",
|
|
11
|
+
"auth_login",
|
|
12
|
+
"auth_refresh",
|
|
13
|
+
"auth_logout",
|
|
14
|
+
"auth_me",
|
|
15
|
+
"auth_sessions",
|
|
16
|
+
"auth_session-end",
|
|
17
|
+
"auth_password"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "users",
|
|
22
|
+
"tools": [
|
|
23
|
+
"users_read",
|
|
24
|
+
"users_delete",
|
|
25
|
+
"users_read-deleted",
|
|
26
|
+
"users_create",
|
|
27
|
+
"users_ping",
|
|
28
|
+
"users_demo-missing",
|
|
29
|
+
"users_demo-boom"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "hello",
|
|
34
|
+
"summary": "Greets callers and counts how often each greeting is used.",
|
|
35
|
+
"tools": [
|
|
36
|
+
"hello_greet",
|
|
37
|
+
"hello_greet-name",
|
|
38
|
+
"hello_list-greetings",
|
|
39
|
+
"hello_use-greeting",
|
|
40
|
+
"hello_reset-counts"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "config",
|
|
45
|
+
"tools": [
|
|
46
|
+
"config_read",
|
|
47
|
+
"config_describe",
|
|
48
|
+
"config_write"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"tools": [
|
|
53
|
+
{
|
|
54
|
+
"name": "auth_register",
|
|
55
|
+
"module": "auth",
|
|
56
|
+
"permission": "auth:register",
|
|
57
|
+
"title": "Register",
|
|
58
|
+
"description": "Create an account and its credential",
|
|
59
|
+
"input_schema": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"body": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"properties": {
|
|
65
|
+
"email": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"format": "email",
|
|
68
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
|
|
69
|
+
},
|
|
70
|
+
"password": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"minLength": 8
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"required": [
|
|
76
|
+
"email",
|
|
77
|
+
"password"
|
|
78
|
+
],
|
|
79
|
+
"additionalProperties": false
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"body"
|
|
84
|
+
],
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
},
|
|
87
|
+
"read_only": false,
|
|
88
|
+
"transport": {
|
|
89
|
+
"kind": "http",
|
|
90
|
+
"method": "POST",
|
|
91
|
+
"path": "/api/v1/auth/register"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "auth_login",
|
|
96
|
+
"module": "auth",
|
|
97
|
+
"permission": "auth:login",
|
|
98
|
+
"title": "Log in",
|
|
99
|
+
"description": "Exchange email and password for a token pair",
|
|
100
|
+
"input_schema": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"body": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"properties": {
|
|
106
|
+
"email": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"format": "email",
|
|
109
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
|
|
110
|
+
},
|
|
111
|
+
"password": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"minLength": 1
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"required": [
|
|
117
|
+
"email",
|
|
118
|
+
"password"
|
|
119
|
+
],
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": [
|
|
124
|
+
"body"
|
|
125
|
+
],
|
|
126
|
+
"additionalProperties": false
|
|
127
|
+
},
|
|
128
|
+
"read_only": false,
|
|
129
|
+
"transport": {
|
|
130
|
+
"kind": "http",
|
|
131
|
+
"method": "POST",
|
|
132
|
+
"path": "/api/v1/auth/login"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "auth_refresh",
|
|
137
|
+
"module": "auth",
|
|
138
|
+
"permission": "auth:refresh",
|
|
139
|
+
"title": "Refresh tokens",
|
|
140
|
+
"description": "Rotate a refresh token for a new pair",
|
|
141
|
+
"input_schema": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"properties": {
|
|
144
|
+
"body": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"properties": {
|
|
147
|
+
"refresh_token": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"minLength": 1
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"required": [
|
|
153
|
+
"refresh_token"
|
|
154
|
+
],
|
|
155
|
+
"additionalProperties": false
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"required": [
|
|
159
|
+
"body"
|
|
160
|
+
],
|
|
161
|
+
"additionalProperties": false
|
|
162
|
+
},
|
|
163
|
+
"read_only": false,
|
|
164
|
+
"transport": {
|
|
165
|
+
"kind": "http",
|
|
166
|
+
"method": "POST",
|
|
167
|
+
"path": "/api/v1/auth/refresh"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "auth_logout",
|
|
172
|
+
"module": "auth",
|
|
173
|
+
"permission": "auth:logout",
|
|
174
|
+
"title": "Log out",
|
|
175
|
+
"description": "Revoke this session immediately",
|
|
176
|
+
"input_schema": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"properties": {},
|
|
179
|
+
"required": [],
|
|
180
|
+
"additionalProperties": false
|
|
181
|
+
},
|
|
182
|
+
"read_only": false,
|
|
183
|
+
"transport": {
|
|
184
|
+
"kind": "http",
|
|
185
|
+
"method": "POST",
|
|
186
|
+
"path": "/api/v1/auth/logout"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "auth_me",
|
|
191
|
+
"module": "auth",
|
|
192
|
+
"permission": "auth:me",
|
|
193
|
+
"title": "Who am I",
|
|
194
|
+
"description": "The caller and the session behind this request",
|
|
195
|
+
"input_schema": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"properties": {},
|
|
198
|
+
"required": [],
|
|
199
|
+
"additionalProperties": false
|
|
200
|
+
},
|
|
201
|
+
"read_only": true,
|
|
202
|
+
"transport": {
|
|
203
|
+
"kind": "http",
|
|
204
|
+
"method": "GET",
|
|
205
|
+
"path": "/api/v1/auth/me"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "auth_sessions",
|
|
210
|
+
"module": "auth",
|
|
211
|
+
"permission": "auth:sessions",
|
|
212
|
+
"title": "List sessions",
|
|
213
|
+
"description": "Every device this account is signed in on",
|
|
214
|
+
"input_schema": {
|
|
215
|
+
"type": "object",
|
|
216
|
+
"properties": {},
|
|
217
|
+
"required": [],
|
|
218
|
+
"additionalProperties": false
|
|
219
|
+
},
|
|
220
|
+
"read_only": true,
|
|
221
|
+
"transport": {
|
|
222
|
+
"kind": "http",
|
|
223
|
+
"method": "GET",
|
|
224
|
+
"path": "/api/v1/auth/sessions"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"name": "auth_session-end",
|
|
229
|
+
"module": "auth",
|
|
230
|
+
"permission": "auth:session-end",
|
|
231
|
+
"title": "End a session",
|
|
232
|
+
"description": "Sign one other device out",
|
|
233
|
+
"input_schema": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"properties": {
|
|
236
|
+
"params": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"properties": {
|
|
239
|
+
"sid": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"format": "uuid",
|
|
242
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"required": [
|
|
246
|
+
"sid"
|
|
247
|
+
],
|
|
248
|
+
"additionalProperties": false
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"required": [
|
|
252
|
+
"params"
|
|
253
|
+
],
|
|
254
|
+
"additionalProperties": false
|
|
255
|
+
},
|
|
256
|
+
"read_only": false,
|
|
257
|
+
"transport": {
|
|
258
|
+
"kind": "http",
|
|
259
|
+
"method": "DELETE",
|
|
260
|
+
"path": "/api/v1/auth/sessions/:sid"
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "auth_password",
|
|
265
|
+
"module": "auth",
|
|
266
|
+
"permission": "auth:password",
|
|
267
|
+
"title": "Change password",
|
|
268
|
+
"description": "Set a new password and end every other session",
|
|
269
|
+
"input_schema": {
|
|
270
|
+
"type": "object",
|
|
271
|
+
"properties": {
|
|
272
|
+
"body": {
|
|
273
|
+
"type": "object",
|
|
274
|
+
"properties": {
|
|
275
|
+
"password": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"minLength": 8
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"required": [
|
|
281
|
+
"password"
|
|
282
|
+
],
|
|
283
|
+
"additionalProperties": false
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"required": [
|
|
287
|
+
"body"
|
|
288
|
+
],
|
|
289
|
+
"additionalProperties": false
|
|
290
|
+
},
|
|
291
|
+
"read_only": false,
|
|
292
|
+
"transport": {
|
|
293
|
+
"kind": "http",
|
|
294
|
+
"method": "POST",
|
|
295
|
+
"path": "/api/v1/auth/password"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "users_read",
|
|
300
|
+
"module": "users",
|
|
301
|
+
"permission": "users:read",
|
|
302
|
+
"title": "List users",
|
|
303
|
+
"description": "Page through accounts, clamped by the shared bounds",
|
|
304
|
+
"input_schema": {
|
|
305
|
+
"type": "object",
|
|
306
|
+
"properties": {
|
|
307
|
+
"query": {
|
|
308
|
+
"type": "object",
|
|
309
|
+
"properties": {
|
|
310
|
+
"page": {
|
|
311
|
+
"type": "integer",
|
|
312
|
+
"minimum": 1,
|
|
313
|
+
"maximum": 9007199254740991
|
|
314
|
+
},
|
|
315
|
+
"per_page": {
|
|
316
|
+
"type": "integer",
|
|
317
|
+
"minimum": 1,
|
|
318
|
+
"maximum": 100
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"additionalProperties": false
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"required": [],
|
|
325
|
+
"additionalProperties": false
|
|
326
|
+
},
|
|
327
|
+
"read_only": true,
|
|
328
|
+
"transport": {
|
|
329
|
+
"kind": "http",
|
|
330
|
+
"method": "GET",
|
|
331
|
+
"path": "/users/"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"name": "users_delete",
|
|
336
|
+
"module": "users",
|
|
337
|
+
"permission": "users:delete",
|
|
338
|
+
"title": "Soft-delete a user",
|
|
339
|
+
"description": "Flags the account; ordinary queries stop returning it",
|
|
340
|
+
"input_schema": {
|
|
341
|
+
"type": "object",
|
|
342
|
+
"properties": {
|
|
343
|
+
"params": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"properties": {
|
|
346
|
+
"email": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"format": "email",
|
|
349
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"required": [
|
|
353
|
+
"email"
|
|
354
|
+
],
|
|
355
|
+
"additionalProperties": false
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"required": [
|
|
359
|
+
"params"
|
|
360
|
+
],
|
|
361
|
+
"additionalProperties": false
|
|
362
|
+
},
|
|
363
|
+
"read_only": false,
|
|
364
|
+
"transport": {
|
|
365
|
+
"kind": "http",
|
|
366
|
+
"method": "DELETE",
|
|
367
|
+
"path": "/users/:email"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"name": "users_read-deleted",
|
|
372
|
+
"module": "users",
|
|
373
|
+
"permission": "users:read-deleted",
|
|
374
|
+
"title": "List soft-deleted users",
|
|
375
|
+
"description": "List soft-deleted users",
|
|
376
|
+
"input_schema": {
|
|
377
|
+
"type": "object",
|
|
378
|
+
"properties": {},
|
|
379
|
+
"required": [],
|
|
380
|
+
"additionalProperties": false
|
|
381
|
+
},
|
|
382
|
+
"read_only": true,
|
|
383
|
+
"transport": {
|
|
384
|
+
"kind": "http",
|
|
385
|
+
"method": "GET",
|
|
386
|
+
"path": "/users/deleted"
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "users_create",
|
|
391
|
+
"module": "users",
|
|
392
|
+
"permission": "users:create",
|
|
393
|
+
"title": "Create a user",
|
|
394
|
+
"description": "Adds the account and queues its welcome email",
|
|
395
|
+
"input_schema": {
|
|
396
|
+
"type": "object",
|
|
397
|
+
"properties": {
|
|
398
|
+
"body": {
|
|
399
|
+
"type": "object",
|
|
400
|
+
"properties": {
|
|
401
|
+
"email": {
|
|
402
|
+
"type": "string",
|
|
403
|
+
"format": "email",
|
|
404
|
+
"pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"required": [
|
|
408
|
+
"email"
|
|
409
|
+
],
|
|
410
|
+
"additionalProperties": false
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"required": [
|
|
414
|
+
"body"
|
|
415
|
+
],
|
|
416
|
+
"additionalProperties": false
|
|
417
|
+
},
|
|
418
|
+
"read_only": false,
|
|
419
|
+
"transport": {
|
|
420
|
+
"kind": "http",
|
|
421
|
+
"method": "POST",
|
|
422
|
+
"path": "/users/"
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"name": "users_ping",
|
|
427
|
+
"module": "users",
|
|
428
|
+
"permission": "users:ping",
|
|
429
|
+
"title": "Users module status",
|
|
430
|
+
"description": "Users module status",
|
|
431
|
+
"input_schema": {
|
|
432
|
+
"type": "object",
|
|
433
|
+
"properties": {},
|
|
434
|
+
"required": [],
|
|
435
|
+
"additionalProperties": false
|
|
436
|
+
},
|
|
437
|
+
"read_only": true,
|
|
438
|
+
"transport": {
|
|
439
|
+
"kind": "http",
|
|
440
|
+
"method": "GET",
|
|
441
|
+
"path": "/users/ping"
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"name": "users_demo-missing",
|
|
446
|
+
"module": "users",
|
|
447
|
+
"permission": "users:demo-missing",
|
|
448
|
+
"title": "HttpError demo",
|
|
449
|
+
"description": "HttpError demo",
|
|
450
|
+
"input_schema": {
|
|
451
|
+
"type": "object",
|
|
452
|
+
"properties": {},
|
|
453
|
+
"required": [],
|
|
454
|
+
"additionalProperties": false
|
|
455
|
+
},
|
|
456
|
+
"read_only": true,
|
|
457
|
+
"transport": {
|
|
458
|
+
"kind": "http",
|
|
459
|
+
"method": "GET",
|
|
460
|
+
"path": "/users/missing"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"name": "users_demo-boom",
|
|
465
|
+
"module": "users",
|
|
466
|
+
"permission": "users:demo-boom",
|
|
467
|
+
"title": "Unhandled error demo",
|
|
468
|
+
"description": "Unhandled error demo",
|
|
469
|
+
"input_schema": {
|
|
470
|
+
"type": "object",
|
|
471
|
+
"properties": {},
|
|
472
|
+
"required": [],
|
|
473
|
+
"additionalProperties": false
|
|
474
|
+
},
|
|
475
|
+
"read_only": true,
|
|
476
|
+
"transport": {
|
|
477
|
+
"kind": "http",
|
|
478
|
+
"method": "GET",
|
|
479
|
+
"path": "/users/boom"
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "hello_greet",
|
|
484
|
+
"module": "hello",
|
|
485
|
+
"permission": "hello:greet",
|
|
486
|
+
"title": "Greet",
|
|
487
|
+
"description": "A greeting in the caller's language",
|
|
488
|
+
"input_schema": {
|
|
489
|
+
"type": "object",
|
|
490
|
+
"properties": {},
|
|
491
|
+
"required": [],
|
|
492
|
+
"additionalProperties": false
|
|
493
|
+
},
|
|
494
|
+
"read_only": true,
|
|
495
|
+
"transport": {
|
|
496
|
+
"kind": "http",
|
|
497
|
+
"method": "GET",
|
|
498
|
+
"path": "/api/v1/hello"
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "hello_greet-name",
|
|
503
|
+
"module": "hello",
|
|
504
|
+
"permission": "hello:greet-name",
|
|
505
|
+
"title": "Greet by name",
|
|
506
|
+
"description": "Greet by name",
|
|
507
|
+
"input_schema": {
|
|
508
|
+
"type": "object",
|
|
509
|
+
"properties": {
|
|
510
|
+
"params": {
|
|
511
|
+
"type": "object",
|
|
512
|
+
"properties": {
|
|
513
|
+
"name": {
|
|
514
|
+
"type": "string"
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
"required": [
|
|
518
|
+
"name"
|
|
519
|
+
],
|
|
520
|
+
"additionalProperties": false
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
"required": [
|
|
524
|
+
"params"
|
|
525
|
+
],
|
|
526
|
+
"additionalProperties": false
|
|
527
|
+
},
|
|
528
|
+
"read_only": true,
|
|
529
|
+
"transport": {
|
|
530
|
+
"kind": "http",
|
|
531
|
+
"method": "GET",
|
|
532
|
+
"path": "/api/v1/hello/:name"
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"name": "hello_list-greetings",
|
|
537
|
+
"module": "hello",
|
|
538
|
+
"permission": "hello:list-greetings",
|
|
539
|
+
"title": "List greetings",
|
|
540
|
+
"description": "The stored greetings, with how often each was used",
|
|
541
|
+
"input_schema": {
|
|
542
|
+
"type": "object",
|
|
543
|
+
"properties": {},
|
|
544
|
+
"required": [],
|
|
545
|
+
"additionalProperties": false
|
|
546
|
+
},
|
|
547
|
+
"read_only": true,
|
|
548
|
+
"transport": {
|
|
549
|
+
"kind": "http",
|
|
550
|
+
"method": "GET",
|
|
551
|
+
"path": "/api/v1/greetings"
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"name": "hello_use-greeting",
|
|
556
|
+
"module": "hello",
|
|
557
|
+
"permission": "hello:use-greeting",
|
|
558
|
+
"title": "Use a greeting",
|
|
559
|
+
"description": "Queues a job that counts the use",
|
|
560
|
+
"input_schema": {
|
|
561
|
+
"type": "object",
|
|
562
|
+
"properties": {
|
|
563
|
+
"params": {
|
|
564
|
+
"type": "object",
|
|
565
|
+
"properties": {
|
|
566
|
+
"name": {
|
|
567
|
+
"type": "string"
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
"required": [
|
|
571
|
+
"name"
|
|
572
|
+
],
|
|
573
|
+
"additionalProperties": false
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"required": [
|
|
577
|
+
"params"
|
|
578
|
+
],
|
|
579
|
+
"additionalProperties": false
|
|
580
|
+
},
|
|
581
|
+
"read_only": false,
|
|
582
|
+
"transport": {
|
|
583
|
+
"kind": "http",
|
|
584
|
+
"method": "POST",
|
|
585
|
+
"path": "/api/v1/greetings/:name/use"
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"name": "hello_reset-counts",
|
|
590
|
+
"module": "hello",
|
|
591
|
+
"permission": "hello:reset-counts",
|
|
592
|
+
"description": "Reset the usage counter of every greeting to zero",
|
|
593
|
+
"input_schema": {
|
|
594
|
+
"type": "object",
|
|
595
|
+
"properties": {
|
|
596
|
+
"confirm": {
|
|
597
|
+
"description": "Set to true to confirm the reset",
|
|
598
|
+
"type": "boolean",
|
|
599
|
+
"const": true
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"required": [
|
|
603
|
+
"confirm"
|
|
604
|
+
],
|
|
605
|
+
"additionalProperties": false
|
|
606
|
+
},
|
|
607
|
+
"read_only": false,
|
|
608
|
+
"transport": {
|
|
609
|
+
"kind": "action"
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"name": "config_read",
|
|
614
|
+
"module": "config",
|
|
615
|
+
"permission": "config:read",
|
|
616
|
+
"title": "Describe the app",
|
|
617
|
+
"description": "Every module in load order: manifest, declared variables (names, types, sources; secrets never), settings with schema, live values and stored version, endpoints with the roles that reach them",
|
|
618
|
+
"input_schema": {
|
|
619
|
+
"type": "object",
|
|
620
|
+
"properties": {},
|
|
621
|
+
"required": [],
|
|
622
|
+
"additionalProperties": false
|
|
623
|
+
},
|
|
624
|
+
"read_only": true,
|
|
625
|
+
"transport": {
|
|
626
|
+
"kind": "http",
|
|
627
|
+
"method": "GET",
|
|
628
|
+
"path": "/api/v1/config/"
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"name": "config_describe",
|
|
633
|
+
"module": "config",
|
|
634
|
+
"permission": "config:describe",
|
|
635
|
+
"title": "Describe one module",
|
|
636
|
+
"description": "The same description for one module",
|
|
637
|
+
"input_schema": {
|
|
638
|
+
"type": "object",
|
|
639
|
+
"properties": {
|
|
640
|
+
"params": {
|
|
641
|
+
"type": "object",
|
|
642
|
+
"properties": {
|
|
643
|
+
"module": {
|
|
644
|
+
"type": "string",
|
|
645
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
"required": [
|
|
649
|
+
"module"
|
|
650
|
+
],
|
|
651
|
+
"additionalProperties": false
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
"required": [
|
|
655
|
+
"params"
|
|
656
|
+
],
|
|
657
|
+
"additionalProperties": false
|
|
658
|
+
},
|
|
659
|
+
"read_only": true,
|
|
660
|
+
"transport": {
|
|
661
|
+
"kind": "http",
|
|
662
|
+
"method": "GET",
|
|
663
|
+
"path": "/api/v1/config/:module"
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
"name": "config_write",
|
|
668
|
+
"module": "config",
|
|
669
|
+
"permission": "config:write",
|
|
670
|
+
"title": "Change a module's settings",
|
|
671
|
+
"description": "A patch over the stored values, validated by the module's schema; a stale version is refused; applied at once in every replica, except fields tagged restart, which apply on the next boot",
|
|
672
|
+
"input_schema": {
|
|
673
|
+
"type": "object",
|
|
674
|
+
"properties": {
|
|
675
|
+
"params": {
|
|
676
|
+
"type": "object",
|
|
677
|
+
"properties": {
|
|
678
|
+
"module": {
|
|
679
|
+
"type": "string",
|
|
680
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
681
|
+
}
|
|
682
|
+
},
|
|
683
|
+
"required": [
|
|
684
|
+
"module"
|
|
685
|
+
],
|
|
686
|
+
"additionalProperties": false
|
|
687
|
+
},
|
|
688
|
+
"body": {
|
|
689
|
+
"type": "object",
|
|
690
|
+
"properties": {
|
|
691
|
+
"values": {
|
|
692
|
+
"type": "object",
|
|
693
|
+
"propertyNames": {
|
|
694
|
+
"type": "string"
|
|
695
|
+
},
|
|
696
|
+
"additionalProperties": {}
|
|
697
|
+
},
|
|
698
|
+
"version": {
|
|
699
|
+
"type": "integer",
|
|
700
|
+
"exclusiveMinimum": 0,
|
|
701
|
+
"maximum": 9007199254740991
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
"required": [
|
|
705
|
+
"values"
|
|
706
|
+
],
|
|
707
|
+
"additionalProperties": false
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
"required": [
|
|
711
|
+
"params",
|
|
712
|
+
"body"
|
|
713
|
+
],
|
|
714
|
+
"additionalProperties": false
|
|
715
|
+
},
|
|
716
|
+
"read_only": false,
|
|
717
|
+
"transport": {
|
|
718
|
+
"kind": "http",
|
|
719
|
+
"method": "PATCH",
|
|
720
|
+
"path": "/api/v1/config/:module"
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
]
|
|
724
|
+
}
|