@cosmicdrift/kumiko-bundled-features 0.411.0 → 0.413.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/dist/admin-shell/feature.d.ts +1 -1
- package/dist/agent-tools/agent-doc-lint.d.ts +9 -0
- package/dist/agent-tools/agent-doc-lint.js +42 -5
- package/dist/agent-tools/agent-manifest.d.ts +0 -1
- package/dist/agent-tools/agent-manifest.js +9 -99
- package/dist/agent-tools/api-docs/anchors.d.ts +14 -0
- package/dist/agent-tools/api-docs/anchors.js +49 -0
- package/dist/agent-tools/api-docs/check.d.ts +7 -0
- package/dist/agent-tools/api-docs/check.js +15 -0
- package/dist/agent-tools/api-docs/collect-events.d.ts +10 -0
- package/dist/agent-tools/api-docs/collect-events.js +90 -0
- package/dist/agent-tools/api-docs/collect.d.ts +15 -0
- package/dist/agent-tools/api-docs/collect.js +108 -0
- package/dist/agent-tools/api-docs/curl.d.ts +5 -0
- package/dist/agent-tools/api-docs/curl.js +24 -0
- package/dist/agent-tools/api-docs/error-table.d.ts +9 -0
- package/dist/agent-tools/api-docs/error-table.js +31 -0
- package/dist/agent-tools/api-docs/examples.d.ts +16 -0
- package/dist/agent-tools/api-docs/examples.js +25 -0
- package/dist/agent-tools/api-docs/generate.d.ts +19 -0
- package/dist/agent-tools/api-docs/generate.js +104 -0
- package/dist/agent-tools/api-docs/index-json.d.ts +15 -0
- package/dist/agent-tools/api-docs/index-json.js +6 -0
- package/dist/agent-tools/api-docs/index.d.ts +9 -0
- package/dist/agent-tools/api-docs/index.js +6 -0
- package/dist/agent-tools/api-docs/list-parameters.d.ts +61 -0
- package/dist/agent-tools/api-docs/list-parameters.js +28 -0
- package/dist/agent-tools/api-docs/markdown.d.ts +29 -0
- package/dist/agent-tools/api-docs/markdown.js +48 -0
- package/dist/agent-tools/api-docs/menu-path.d.ts +8 -0
- package/dist/agent-tools/api-docs/menu-path.js +60 -0
- package/dist/agent-tools/api-docs/model.d.ts +76 -0
- package/dist/agent-tools/api-docs/problems.d.ts +32 -0
- package/dist/agent-tools/api-docs/problems.js +28 -0
- package/dist/agent-tools/api-docs/render-events.d.ts +12 -0
- package/dist/agent-tools/api-docs/render-events.js +55 -0
- package/dist/agent-tools/api-docs/render-openapi.d.ts +10 -0
- package/dist/agent-tools/api-docs/render-openapi.js +170 -0
- package/dist/agent-tools/api-docs/render-overview.d.ts +11 -0
- package/dist/agent-tools/api-docs/render-overview.js +60 -0
- package/dist/agent-tools/api-docs/render-reference.d.ts +14 -0
- package/dist/agent-tools/api-docs/render-reference.js +50 -0
- package/dist/agent-tools/api-docs/render-tokens.d.ts +12 -0
- package/dist/agent-tools/api-docs/render-tokens.js +101 -0
- package/dist/agent-tools/api-docs/schema-fields.d.ts +16 -0
- package/dist/agent-tools/api-docs/schema-fields.js +141 -0
- package/dist/agent-tools/api-docs/section-ids.d.ts +25 -0
- package/dist/agent-tools/api-docs/section-ids.js +26 -0
- package/dist/agent-tools/api-docs/system-only.d.ts +5 -0
- package/dist/agent-tools/api-docs/system-only.js +7 -0
- package/dist/agent-tools/api-docs/texts/de.d.ts +123 -0
- package/dist/agent-tools/api-docs/texts/de.js +123 -0
- package/dist/agent-tools/api-docs/texts/en.d.ts +123 -0
- package/dist/agent-tools/api-docs/texts/en.js +123 -0
- package/dist/agent-tools/api-docs/texts/es.d.ts +123 -0
- package/dist/agent-tools/api-docs/texts/es.js +123 -0
- package/dist/agent-tools/api-docs/texts/fr.d.ts +123 -0
- package/dist/agent-tools/api-docs/texts/fr.js +123 -0
- package/dist/agent-tools/api-docs/texts/index.d.ts +14 -0
- package/dist/agent-tools/api-docs/texts/index.js +55 -0
- package/dist/agent-tools/api-docs/texts/it.d.ts +123 -0
- package/dist/agent-tools/api-docs/texts/it.js +123 -0
- package/dist/agent-tools/api-docs/texts/types.d.ts +18 -0
- package/dist/agent-tools/api-docs/texts/types.js +104 -0
- package/dist/agent-tools/api-docs/ui-writes.d.ts +12 -0
- package/dist/agent-tools/api-docs/ui-writes.js +73 -0
- package/dist/agent-tools/handler-schema.d.ts +5 -0
- package/dist/agent-tools/handler-schema.js +37 -0
- package/dist/agent-tools/index.d.ts +2 -1
- package/dist/agent-tools/index.js +2 -1
- package/dist/agent-tools/labels.d.ts +26 -0
- package/dist/agent-tools/labels.js +131 -0
- package/dist/auth-email-password/boot-rules.d.ts +7 -0
- package/dist/auth-email-password/boot-rules.js +7 -0
- package/dist/auth-email-password/feature.js +6 -13
- package/dist/auth-email-password/validate-options.d.ts +5 -0
- package/dist/auth-email-password/validate-options.js +15 -0
- package/dist/billing-foundation/boot-rules.d.ts +22 -0
- package/dist/billing-foundation/boot-rules.js +22 -0
- package/dist/billing-foundation/validate-options.js +56 -18
- package/dist/cap-overview/boot-rules.d.ts +12 -0
- package/dist/cap-overview/boot-rules.js +12 -0
- package/dist/cap-overview/feature.js +8 -3
- package/dist/documents/boot-rules.d.ts +12 -0
- package/dist/documents/boot-rules.js +12 -0
- package/dist/documents/feature.js +8 -3
- package/dist/file-derivatives/boot-rules.d.ts +7 -0
- package/dist/file-derivatives/boot-rules.js +7 -0
- package/dist/file-derivatives/feature.js +5 -2
- package/dist/folders/boot-rules.d.ts +7 -0
- package/dist/folders/boot-rules.js +7 -0
- package/dist/folders/feature.js +8 -5
- package/dist/helpdesk/boot-rules.d.ts +7 -0
- package/dist/helpdesk/boot-rules.js +7 -0
- package/dist/{contact → helpdesk}/challenge.js +2 -2
- package/dist/helpdesk/client/helpdesk-client-source.d.ts +1 -0
- package/dist/{contact/client/contact-client-source.js → helpdesk/client/helpdesk-client-source.js} +4 -4
- package/dist/helpdesk/client/helpdesk-website-client.d.ts +26 -0
- package/dist/helpdesk/client/helpdesk-website-client.js +1 -0
- package/dist/helpdesk/client/index.d.ts +2 -0
- package/dist/helpdesk/client/index.js +1 -0
- package/dist/{contact → helpdesk}/entity.d.ts +6 -6
- package/dist/{contact → helpdesk}/entity.js +31 -27
- package/dist/helpdesk/feature.d.ts +3 -0
- package/dist/{contact → helpdesk}/feature.js +43 -39
- package/dist/{contact → helpdesk}/handlers/attempts.d.ts +2 -2
- package/dist/helpdesk/handlers/challenge.query.d.ts +9 -0
- package/dist/{contact → helpdesk}/handlers/challenge.query.js +5 -5
- package/dist/helpdesk/handlers/forward-request.write.d.ts +9 -0
- package/dist/{contact → helpdesk}/handlers/forward-request.write.js +17 -15
- package/dist/{contact → helpdesk}/handlers/mark-done.write.d.ts +2 -2
- package/dist/{contact → helpdesk}/handlers/mark-done.write.js +8 -8
- package/dist/{contact → helpdesk}/handlers/notify-reporter-in-app.write.d.ts +2 -2
- package/dist/{contact → helpdesk}/handlers/notify-reporter-in-app.write.js +11 -11
- package/dist/{contact → helpdesk}/handlers/open-count.js +2 -2
- package/dist/{contact → helpdesk}/handlers/open-count.query.js +4 -4
- package/dist/{contact → helpdesk}/handlers/replies.query.js +6 -6
- package/dist/{contact → helpdesk}/handlers/reply.write.d.ts +4 -4
- package/dist/{contact → helpdesk}/handlers/reply.write.js +16 -16
- package/dist/helpdesk/handlers/report.write.d.ts +16 -0
- package/dist/{contact → helpdesk}/handlers/report.write.js +17 -17
- package/dist/helpdesk/handlers/request-delivery.query.d.ts +16 -0
- package/dist/{contact → helpdesk}/handlers/request-delivery.query.js +24 -24
- package/dist/{contact → helpdesk}/handlers/request-detail.query.d.ts +3 -3
- package/dist/{contact → helpdesk}/handlers/request-detail.query.js +10 -10
- package/dist/{contact → helpdesk}/handlers/request-list.query.js +2 -2
- package/dist/helpdesk/handlers/send-reply-mail.write.d.ts +8 -0
- package/dist/{contact → helpdesk}/handlers/send-reply-mail.write.js +15 -15
- package/dist/helpdesk/handlers/send-test.write.d.ts +5 -0
- package/dist/{contact → helpdesk}/handlers/send-test.write.js +10 -10
- package/dist/{contact → helpdesk}/handlers/submit.write.d.ts +4 -4
- package/dist/{contact → helpdesk}/handlers/submit.write.js +17 -17
- package/dist/{contact → helpdesk}/handlers/take-over-uploads.js +5 -5
- package/dist/{contact → helpdesk}/i18n.d.ts +1 -1
- package/dist/{contact → helpdesk}/i18n.js +78 -75
- package/dist/helpdesk/index.d.ts +5 -0
- package/dist/helpdesk/index.js +4 -0
- package/dist/{contact → helpdesk}/lib.d.ts +5 -5
- package/dist/{contact → helpdesk}/lib.js +16 -16
- package/dist/{contact → helpdesk}/mail.d.ts +20 -20
- package/dist/{contact → helpdesk}/mail.js +47 -47
- package/dist/{contact → helpdesk}/options.d.ts +6 -6
- package/dist/helpdesk/options.js +36 -0
- package/dist/helpdesk/panels.d.ts +2 -0
- package/dist/helpdesk/panels.js +21 -0
- package/dist/{contact → helpdesk}/payloads.d.ts +11 -11
- package/dist/{contact → helpdesk}/payloads.js +28 -28
- package/dist/helpdesk/screens.d.ts +5 -0
- package/dist/{contact → helpdesk}/screens.js +87 -87
- package/dist/{contact → helpdesk}/subject.js +3 -3
- package/dist/helpdesk/user-data-hooks.d.ts +3 -0
- package/dist/{contact → helpdesk}/user-data-hooks.js +15 -15
- package/dist/helpdesk/web/constants.d.ts +127 -0
- package/dist/helpdesk/web/constants.js +126 -0
- package/dist/helpdesk/web/index.d.ts +1 -0
- package/dist/helpdesk/web/index.js +1 -0
- package/dist/host-routing/boot-rules.d.ts +22 -0
- package/dist/host-routing/boot-rules.js +22 -0
- package/dist/host-routing/validate-options.js +35 -11
- package/dist/inbound-mail-foundation/entities.d.ts +84 -0
- package/dist/inbound-mail-foundation/entities.js +96 -71
- package/dist/inbound-mail-foundation/feature.js +2 -2
- package/dist/jobs/boot-rules.d.ts +7 -0
- package/dist/jobs/boot-rules.js +7 -0
- package/dist/jobs/feature.js +5 -2
- package/dist/legal-pages/boot-rules.d.ts +17 -0
- package/dist/legal-pages/boot-rules.js +17 -0
- package/dist/legal-pages/feature.js +5 -2
- package/dist/legal-pages/lib/validate-routes.js +11 -3
- package/dist/metrics/boot-rules.d.ts +12 -0
- package/dist/metrics/boot-rules.js +12 -0
- package/dist/metrics/validate.js +8 -2
- package/dist/notes-history/boot-rules.d.ts +7 -0
- package/dist/notes-history/boot-rules.js +7 -0
- package/dist/notes-history/feature.js +7 -4
- package/dist/personal-access-tokens/boot-rules.d.ts +7 -0
- package/dist/personal-access-tokens/boot-rules.js +7 -0
- package/dist/personal-access-tokens/feature.d.ts +1 -0
- package/dist/personal-access-tokens/feature.js +4 -2
- package/dist/personal-access-tokens/handlers/create.write.js +2 -2
- package/dist/personal-access-tokens/i18n.js +5 -1
- package/dist/personal-access-tokens/index.d.ts +4 -2
- package/dist/personal-access-tokens/index.js +29 -2
- package/dist/personal-access-tokens/scope-events-check.d.ts +3 -0
- package/dist/personal-access-tokens/scope-events-check.js +21 -0
- package/dist/personal-access-tokens/screens.js +8 -2
- package/dist/personal-access-tokens/web/constants.d.ts +1 -0
- package/dist/personal-access-tokens/web/constants.js +1 -0
- package/dist/personal-access-tokens/web/scopes.d.ts +2 -0
- package/dist/personal-access-tokens/web/scopes.js +12 -0
- package/dist/presence/boot-rules.d.ts +7 -0
- package/dist/presence/boot-rules.js +7 -0
- package/dist/presence/options.js +5 -1
- package/dist/readiness/boot-rules.d.ts +12 -0
- package/dist/readiness/boot-rules.js +12 -0
- package/dist/readiness/probe-boot-check.js +8 -3
- package/dist/shared/assert-no-where-rule-in-ownership-write.d.ts +1 -1
- package/dist/shared/assert-no-where-rule-in-ownership-write.js +11 -7
- package/dist/shared/boot-rules.d.ts +7 -0
- package/dist/shared/boot-rules.js +7 -0
- package/dist/subscription-mollie/boot-rules.d.ts +17 -0
- package/dist/subscription-mollie/boot-rules.js +17 -0
- package/dist/subscription-mollie/feature.js +13 -6
- package/dist/tags/boot-rules.d.ts +7 -0
- package/dist/tags/boot-rules.js +7 -0
- package/dist/tags/feature.js +8 -5
- package/dist/template-resolver/boot-rules.d.ts +17 -0
- package/dist/template-resolver/boot-rules.js +17 -0
- package/dist/template-resolver/feature.js +14 -5
- package/dist/tenant/boot-rules.d.ts +7 -0
- package/dist/tenant/boot-rules.js +7 -0
- package/dist/tenant/feature.js +5 -2
- package/kumiko-es-tables.json +4 -4
- package/package.json +29 -29
- package/src/agent-tools/changes.json +24 -0
- package/src/{contact → helpdesk}/changes.json +6 -0
- package/src/inbound-mail-foundation/changes.json +6 -0
- package/src/personal-access-tokens/changes.json +6 -0
- package/dist/contact/client/contact-client-source.d.ts +0 -1
- package/dist/contact/client/contact-website-client.d.ts +0 -26
- package/dist/contact/client/index.d.ts +0 -2
- package/dist/contact/client/index.js +0 -1
- package/dist/contact/feature.d.ts +0 -3
- package/dist/contact/handlers/challenge.query.d.ts +0 -9
- package/dist/contact/handlers/forward-request.write.d.ts +0 -9
- package/dist/contact/handlers/report.write.d.ts +0 -16
- package/dist/contact/handlers/request-delivery.query.d.ts +0 -16
- package/dist/contact/handlers/send-reply-mail.write.d.ts +0 -8
- package/dist/contact/handlers/send-test.write.d.ts +0 -5
- package/dist/contact/index.d.ts +0 -5
- package/dist/contact/index.js +0 -4
- package/dist/contact/options.js +0 -32
- package/dist/contact/panels.d.ts +0 -2
- package/dist/contact/panels.js +0 -21
- package/dist/contact/screens.d.ts +0 -5
- package/dist/contact/user-data-hooks.d.ts +0 -3
- package/dist/contact/web/constants.d.ts +0 -127
- package/dist/contact/web/constants.js +0 -126
- package/dist/contact/web/index.d.ts +0 -1
- package/dist/contact/web/index.js +0 -1
- /package/dist/{contact/client/contact-website-client.js → agent-tools/api-docs/model.js} +0 -0
- /package/dist/{contact → helpdesk}/challenge.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/access.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/access.js +0 -0
- /package/dist/{contact → helpdesk}/handlers/attempts.js +0 -0
- /package/dist/{contact → helpdesk}/handlers/open-count.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/open-count.query.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/replies.query.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/request-list.query.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/take-over-uploads.d.ts +0 -0
- /package/dist/{contact → helpdesk}/pow.d.ts +0 -0
- /package/dist/{contact → helpdesk}/pow.js +0 -0
- /package/dist/{contact → helpdesk}/subject.d.ts +0 -0
- /package/dist/{contact → helpdesk}/user-agent.d.ts +0 -0
- /package/dist/{contact → helpdesk}/user-agent.js +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export declare const itApiDocsTexts: {
|
|
2
|
+
readonly text: {
|
|
3
|
+
readonly "overview.title": "API HTTP";
|
|
4
|
+
readonly "overview.description": "Endpoint, corpo della richiesta, risposte, codici di errore, elenchi e batch dell'API HTTP.";
|
|
5
|
+
readonly "overview.intro": "Ogni chiamata è un POST con corpo JSON. Il campo `type` indica l'handler, `payload` contiene i suoi campi. Le pagine di riferimento elencano ogni handler con i suoi campi.";
|
|
6
|
+
readonly "overview.endpoints.heading": "Endpoint";
|
|
7
|
+
readonly "overview.endpoints.query": "Legge dati. Non modifica mai nulla.";
|
|
8
|
+
readonly "overview.endpoints.write": "Modifica dati: creare, aggiornare, eliminare o un'azione specifica.";
|
|
9
|
+
readonly "overview.endpoints.batch": "Esegue più chiamate di scrittura in una transazione.";
|
|
10
|
+
readonly "overview.auth.heading": "Autenticazione";
|
|
11
|
+
readonly "overview.auth.body": "Invia un token API nell'header `Authorization` come `Bearer <token>`. Le richieste con token non richiedono cookie né token CSRF. Il token stabilisce anche l'account in cui gira la richiesta, quindi non invii mai un ID di account o di tenant.";
|
|
12
|
+
readonly "overview.body.heading": "Corpo della richiesta";
|
|
13
|
+
readonly "overview.body.body": "`type` è il nome dell'handler, per esempio `{exampleType}`. `payload` contiene i campi del riferimento. `requestId` è facoltativo, vedi sotto. Il payload può essere annidato al massimo per {maxDepth} livelli.";
|
|
14
|
+
readonly "overview.responses.heading": "Risposte";
|
|
15
|
+
readonly "overview.responses.success": "Una lettura riuscita restituisce `data`. Una scrittura riuscita restituisce `isSuccess: true` e `data`.";
|
|
16
|
+
readonly "overview.responses.error": "In caso di errore lo stato HTTP è 4xx o 5xx e il corpo contiene `error`. Le chiamate di scrittura restituiscono anche `isSuccess: false`. Valuta `error.code` e lo stato. `message` è pensato per le persone e può cambiare.";
|
|
17
|
+
readonly "overview.errors.heading": "Codici di errore";
|
|
18
|
+
readonly "overview.errors.columns": "Codice | Stato HTTP | Significato";
|
|
19
|
+
readonly "overview.versions.heading": "Versioni e conflitti";
|
|
20
|
+
readonly "overview.versions.body": "Ogni record ha una `version`. Un aggiornamento usa la `version` che hai letto per ultima. Se nel frattempo qualcuno ha modificato il record, la chiamata fallisce con 409 `version_conflict`. Rileggi il record, controlla la modifica e inviala con la nuova versione.";
|
|
21
|
+
readonly "overview.lists.heading": "Elenchi";
|
|
22
|
+
readonly "overview.lists.intro": "Gli handler di elenco finiscono con `:list` e accettano questi campi:";
|
|
23
|
+
readonly "overview.lists.columns": "Campo | Tipo | Descrizione";
|
|
24
|
+
readonly "overview.lists.response": "La risposta contiene `rows` e `nextCursor`. Per la pagina successiva invia `nextCursor` come `cursor`. Nell'ultima pagina `nextCursor` è `null`.";
|
|
25
|
+
readonly "overview.batch.heading": "Batch";
|
|
26
|
+
readonly "overview.batch.body": "`POST /api/batch` accetta `commands`, un elenco di chiamate di scrittura `{ type, payload }`. Vengono eseguite in una transazione: se una fallisce, nessuna ha effetto. La risposta ha allora `isSuccess: false`, l'`error` e `failedIndex`, la posizione del comando fallito contata da 0.";
|
|
27
|
+
readonly "overview.retry.heading": "Ripetere in sicurezza";
|
|
28
|
+
readonly "overview.retry.body": "Invia un `requestId` con le chiamate di scrittura e di batch, una stringa qualsiasi unica per ogni modifica. Se la connessione cade e invii di nuovo la stessa chiamata con lo stesso `requestId`, ricevi il primo risultato e la modifica non viene eseguita due volte.";
|
|
29
|
+
readonly "tokens.title": "Token API";
|
|
30
|
+
readonly "tokens.description": "Crea un token API per {appName}, scegli i suoi scope e invialo con le tue richieste.";
|
|
31
|
+
readonly "tokens.intro": "Un token API permette a uno script o a un altro servizio di chiamare l'API di {appName} a tuo nome. I suoi scope decidono quali dati può leggere o modificare.";
|
|
32
|
+
readonly "tokens.create.heading": "Creare un token";
|
|
33
|
+
readonly "tokens.create.step1": "Apri {menuPath}.";
|
|
34
|
+
readonly "tokens.create.step2": "Scegli **{createLabel}**.";
|
|
35
|
+
readonly "tokens.create.step3": "Inserisci un nome, scegli gli scope e la scadenza e conferma con la tua password.";
|
|
36
|
+
readonly "tokens.create.step4": "Copia il token. Inizia con `kpat_` e viene mostrato una sola volta.";
|
|
37
|
+
readonly "tokens.expiry": "Un token scade dopo {defaultDays} giorni se non scegli un'altra scadenza. La scadenza massima possibile è di {maxDays} giorni.";
|
|
38
|
+
readonly "tokens.use.heading": "Usare il token";
|
|
39
|
+
readonly "tokens.use.body": "Invia il token nell'header `Authorization`. Le richieste con token non richiedono cookie né token CSRF.";
|
|
40
|
+
readonly "tokens.scopes.heading": "Scope";
|
|
41
|
+
readonly "tokens.scopes.intro": "Ogni scope ha due livelli. `read` consente gli handler di lettura. `write` consente tutto ciò che consente `read` più gli handler di scrittura.";
|
|
42
|
+
readonly "tokens.scopes.columns": "Scope | Permesso | Handler";
|
|
43
|
+
readonly "tokens.rateLimit.heading": "Limite di richieste";
|
|
44
|
+
readonly "tokens.rateLimit": "Ogni token può inviare {max} richieste ogni {windowSeconds} secondi. Oltre, l'API risponde 429 `pat_rate_limited`.";
|
|
45
|
+
readonly "tokens.errors.heading": "Errori";
|
|
46
|
+
readonly "tokens.errors.columns": "Stato HTTP | Codice | Causa";
|
|
47
|
+
readonly "tokens.errors.missing": "Manca l'header `Authorization`.";
|
|
48
|
+
readonly "tokens.errors.invalid": "Il token è sconosciuto, revocato o scaduto.";
|
|
49
|
+
readonly "tokens.errors.scope": "Al token manca lo scope per questo handler.";
|
|
50
|
+
readonly "tokens.errors.route": "L'endpoint non accetta token. I token funzionano solo sugli endpoint dell'API.";
|
|
51
|
+
readonly "tokens.errors.rate": "Troppe richieste con questo token.";
|
|
52
|
+
readonly "tokens.errors.disabled": "I token API non fanno parte del tuo piano.";
|
|
53
|
+
readonly "tokens.revoke.heading": "Revocare un token";
|
|
54
|
+
readonly "tokens.revoke.body": "Revoca un token in {menuPath} non appena smetti di usarlo. Cambiare la password revoca tutti i tuoi token. Un token agisce sempre con i tuoi ruoli attuali. Se lasci l'account o il tuo utente viene eliminato, smette di funzionare.";
|
|
55
|
+
readonly "tokens.security.heading": "Sicurezza";
|
|
56
|
+
readonly "tokens.security.item1": "Tratta un token come una password. Conservalo in un archivio di segreti, mai nel codice, in un repository, in un'app o pagina web o in un log.";
|
|
57
|
+
readonly "tokens.security.item2": "Dai a ogni script il suo token, con solo gli scope di cui ha bisogno.";
|
|
58
|
+
readonly "tokens.security.item3": "Revoca i token che non usi più. Revoca subito un token se potrebbe essere trapelato.";
|
|
59
|
+
readonly "reference.description": "Riferimento API per {scopeLabel}: ogni handler con i suoi campi e un esempio.";
|
|
60
|
+
readonly "reference.requiredScope": "Scope richiesto";
|
|
61
|
+
readonly "reference.endpoint": "Endpoint";
|
|
62
|
+
readonly "reference.fields.columns": "Campo | Tipo | Obbligatorio | Descrizione";
|
|
63
|
+
readonly "reference.yes": "sì";
|
|
64
|
+
readonly "reference.no": "no";
|
|
65
|
+
readonly "reference.noFields": "Questo handler non accetta campi.";
|
|
66
|
+
readonly "reference.excluded": "Non impostabili tramite API: {fields}.";
|
|
67
|
+
readonly "reference.exampleRequest": "Richiesta di esempio";
|
|
68
|
+
readonly "reference.exampleResponse": "Risposta di esempio";
|
|
69
|
+
readonly "reference.status": "Stato: {status}";
|
|
70
|
+
readonly "events.title": "Eventi webhook";
|
|
71
|
+
readonly "events.description": "Eventi webhook: quando vengono inviati, quale scope richiedono e cosa contiene il loro payload.";
|
|
72
|
+
readonly "events.intro": "Un evento webhook segnala al tuo sistema che qualcosa è cambiato. Ogni evento ha un nome, una versione e un payload. Lo scope indicato per un evento è lo scope del token che permette di sottoscriverlo.";
|
|
73
|
+
readonly "events.delivery.heading": "Consegna";
|
|
74
|
+
readonly "events.versions.heading": "Versioni";
|
|
75
|
+
readonly "events.versions.body": "Aggiungere un campo facoltativo mantiene la versione. Una modifica incompatibile, come rimuovere o rinominare un campo o cambiarne il tipo, riceve una nuova versione.";
|
|
76
|
+
readonly "events.list.heading": "Eventi";
|
|
77
|
+
readonly "events.version": "Versione";
|
|
78
|
+
readonly "events.requiredScope": "Scope richiesto";
|
|
79
|
+
readonly "events.example": "Payload di esempio";
|
|
80
|
+
readonly "events.noFields": "Questo evento non contiene campi.";
|
|
81
|
+
readonly "events.entity.created": "È stato creato un record di tipo {entity}.";
|
|
82
|
+
readonly "events.entity.updated": "È stato aggiornato un record di tipo {entity}.";
|
|
83
|
+
readonly "events.entity.deleted": "È stato eliminato un record di tipo {entity}.";
|
|
84
|
+
};
|
|
85
|
+
readonly errorMeanings: {
|
|
86
|
+
readonly validation_error: "Il payload non corrisponde ai campi dell'handler. `details` indica i campi.";
|
|
87
|
+
readonly unauthenticated: "Non sono state inviate credenziali valide.";
|
|
88
|
+
readonly missing_token: "Manca l'header `Authorization`.";
|
|
89
|
+
readonly invalid_token: "Il token è sconosciuto, revocato o scaduto.";
|
|
90
|
+
readonly ambiguous_auth: "La richiesta conteneva sia un cookie di sessione sia un token. Invia solo uno dei due.";
|
|
91
|
+
readonly access_denied: "Al token manca lo scope per questo handler, oppure l'endpoint non accetta token.";
|
|
92
|
+
readonly feature_disabled: "Questa funzione è disattivata o non fa parte del tuo piano.";
|
|
93
|
+
readonly not_found: "Il record non esiste o non puoi vederlo.";
|
|
94
|
+
readonly conflict: "La modifica è in conflitto con lo stato attuale dei dati.";
|
|
95
|
+
readonly version_conflict: "Il record è cambiato dopo la tua lettura. Rileggilo e riprova con la nuova `version`.";
|
|
96
|
+
readonly precondition_failed: "Un campo del record non ha più il valore che la modifica si aspettava. Rileggi il record e riprova.";
|
|
97
|
+
readonly record_locked: "Un'altra modifica blocca il record. Riprova tra poco.";
|
|
98
|
+
readonly idempotent_replay: "Questa modifica è già stata applicata con la stessa chiave di idempotenza. Il primo tentativo è riuscito, quindi non inviarla di nuovo.";
|
|
99
|
+
readonly unique_violation: "Esiste già un record con questo valore.";
|
|
100
|
+
readonly unprocessable: "I dati sono validi, ma una regola di business rifiuta la modifica. `details.reason` indica la regola.";
|
|
101
|
+
readonly unconfigured: "Un'impostazione necessaria a questa funzione è ancora vuota. Configurala prima nell'app, poi riprova.";
|
|
102
|
+
readonly internal_error: "Errore imprevisto del server. Riprova più tardi.";
|
|
103
|
+
readonly member_read_timeout: "Una lettura sul server ha impiegato troppo tempo ed è stata interrotta. Riprova più tardi.";
|
|
104
|
+
readonly rate_limited: "Troppe richieste. Attendi il numero di secondi indicato dall'header `Retry-After`.";
|
|
105
|
+
readonly rate_limit_unavailable: "Il limite di frequenza è temporaneamente non disponibile e la richiesta è stata rifiutata. Riprova tra poco.";
|
|
106
|
+
readonly pat_rate_limited: "Questo token ha inviato troppe richieste in poco tempo. Attendi un momento e riprova.";
|
|
107
|
+
};
|
|
108
|
+
readonly listParameters: {
|
|
109
|
+
readonly cursor: "Posizione da `nextCursor` della pagina precedente.";
|
|
110
|
+
readonly limit: "Righe per pagina, {default} per impostazione predefinita, al massimo {max}.";
|
|
111
|
+
readonly search: "Ricerca full-text nei campi ricercabili.";
|
|
112
|
+
readonly sort: "Campo per cui ordinare.";
|
|
113
|
+
readonly sortDirection: "`asc` o `desc`.";
|
|
114
|
+
readonly offset: "Numero di righe da saltare. Per sfogliare è meglio `cursor`.";
|
|
115
|
+
readonly totalCount: "Con `true` ricevi anche `total`, il numero di righe corrispondenti.";
|
|
116
|
+
readonly includeDeleted: "Con `true` sono incluse le righe eliminate. Solo per entità con eliminazione logica.";
|
|
117
|
+
readonly onlyDeleted: "Con `true` vengono restituite solo le righe eliminate. Solo per entità con eliminazione logica, non insieme a `includeDeleted`.";
|
|
118
|
+
readonly filter: "Un filtro di campo con `field`, `op` e `value`. `op` è uno tra {ops}.";
|
|
119
|
+
readonly filters: "Più filtri di campo, ciascuno con `field`, `op` e `value`. `op` è uno tra {ops}.";
|
|
120
|
+
readonly namedFilter: "Nome di un filtro predefinito dell'entità, per esempio una coda di lavoro.";
|
|
121
|
+
readonly aggregate: "Restituisce valori aggregati invece di righe.";
|
|
122
|
+
};
|
|
123
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
export const itApiDocsTexts = {
|
|
2
|
+
text: {
|
|
3
|
+
"overview.title": "API HTTP",
|
|
4
|
+
"overview.description": "Endpoint, corpo della richiesta, risposte, codici di errore, elenchi e batch dell'API HTTP.",
|
|
5
|
+
"overview.intro": "Ogni chiamata è un POST con corpo JSON. Il campo `type` indica l'handler, `payload` contiene i suoi campi. Le pagine di riferimento elencano ogni handler con i suoi campi.",
|
|
6
|
+
"overview.endpoints.heading": "Endpoint",
|
|
7
|
+
"overview.endpoints.query": "Legge dati. Non modifica mai nulla.",
|
|
8
|
+
"overview.endpoints.write": "Modifica dati: creare, aggiornare, eliminare o un'azione specifica.",
|
|
9
|
+
"overview.endpoints.batch": "Esegue più chiamate di scrittura in una transazione.",
|
|
10
|
+
"overview.auth.heading": "Autenticazione",
|
|
11
|
+
"overview.auth.body": "Invia un token API nell'header `Authorization` come `Bearer <token>`. Le richieste con token non richiedono cookie né token CSRF. Il token stabilisce anche l'account in cui gira la richiesta, quindi non invii mai un ID di account o di tenant.",
|
|
12
|
+
"overview.body.heading": "Corpo della richiesta",
|
|
13
|
+
"overview.body.body": "`type` è il nome dell'handler, per esempio `{exampleType}`. `payload` contiene i campi del riferimento. `requestId` è facoltativo, vedi sotto. Il payload può essere annidato al massimo per {maxDepth} livelli.",
|
|
14
|
+
"overview.responses.heading": "Risposte",
|
|
15
|
+
"overview.responses.success": "Una lettura riuscita restituisce `data`. Una scrittura riuscita restituisce `isSuccess: true` e `data`.",
|
|
16
|
+
"overview.responses.error": "In caso di errore lo stato HTTP è 4xx o 5xx e il corpo contiene `error`. Le chiamate di scrittura restituiscono anche `isSuccess: false`. Valuta `error.code` e lo stato. `message` è pensato per le persone e può cambiare.",
|
|
17
|
+
"overview.errors.heading": "Codici di errore",
|
|
18
|
+
"overview.errors.columns": "Codice | Stato HTTP | Significato",
|
|
19
|
+
"overview.versions.heading": "Versioni e conflitti",
|
|
20
|
+
"overview.versions.body": "Ogni record ha una `version`. Un aggiornamento usa la `version` che hai letto per ultima. Se nel frattempo qualcuno ha modificato il record, la chiamata fallisce con 409 `version_conflict`. Rileggi il record, controlla la modifica e inviala con la nuova versione.",
|
|
21
|
+
"overview.lists.heading": "Elenchi",
|
|
22
|
+
"overview.lists.intro": "Gli handler di elenco finiscono con `:list` e accettano questi campi:",
|
|
23
|
+
"overview.lists.columns": "Campo | Tipo | Descrizione",
|
|
24
|
+
"overview.lists.response": "La risposta contiene `rows` e `nextCursor`. Per la pagina successiva invia `nextCursor` come `cursor`. Nell'ultima pagina `nextCursor` è `null`.",
|
|
25
|
+
"overview.batch.heading": "Batch",
|
|
26
|
+
"overview.batch.body": "`POST /api/batch` accetta `commands`, un elenco di chiamate di scrittura `{ type, payload }`. Vengono eseguite in una transazione: se una fallisce, nessuna ha effetto. La risposta ha allora `isSuccess: false`, l'`error` e `failedIndex`, la posizione del comando fallito contata da 0.",
|
|
27
|
+
"overview.retry.heading": "Ripetere in sicurezza",
|
|
28
|
+
"overview.retry.body": "Invia un `requestId` con le chiamate di scrittura e di batch, una stringa qualsiasi unica per ogni modifica. Se la connessione cade e invii di nuovo la stessa chiamata con lo stesso `requestId`, ricevi il primo risultato e la modifica non viene eseguita due volte.",
|
|
29
|
+
"tokens.title": "Token API",
|
|
30
|
+
"tokens.description": "Crea un token API per {appName}, scegli i suoi scope e invialo con le tue richieste.",
|
|
31
|
+
"tokens.intro": "Un token API permette a uno script o a un altro servizio di chiamare l'API di {appName} a tuo nome. I suoi scope decidono quali dati può leggere o modificare.",
|
|
32
|
+
"tokens.create.heading": "Creare un token",
|
|
33
|
+
"tokens.create.step1": "Apri {menuPath}.",
|
|
34
|
+
"tokens.create.step2": "Scegli **{createLabel}**.",
|
|
35
|
+
"tokens.create.step3": "Inserisci un nome, scegli gli scope e la scadenza e conferma con la tua password.",
|
|
36
|
+
"tokens.create.step4": "Copia il token. Inizia con `kpat_` e viene mostrato una sola volta.",
|
|
37
|
+
"tokens.expiry": "Un token scade dopo {defaultDays} giorni se non scegli un'altra scadenza. La scadenza massima possibile è di {maxDays} giorni.",
|
|
38
|
+
"tokens.use.heading": "Usare il token",
|
|
39
|
+
"tokens.use.body": "Invia il token nell'header `Authorization`. Le richieste con token non richiedono cookie né token CSRF.",
|
|
40
|
+
"tokens.scopes.heading": "Scope",
|
|
41
|
+
"tokens.scopes.intro": "Ogni scope ha due livelli. `read` consente gli handler di lettura. `write` consente tutto ciò che consente `read` più gli handler di scrittura.",
|
|
42
|
+
"tokens.scopes.columns": "Scope | Permesso | Handler",
|
|
43
|
+
"tokens.rateLimit.heading": "Limite di richieste",
|
|
44
|
+
"tokens.rateLimit": "Ogni token può inviare {max} richieste ogni {windowSeconds} secondi. Oltre, l'API risponde 429 `pat_rate_limited`.",
|
|
45
|
+
"tokens.errors.heading": "Errori",
|
|
46
|
+
"tokens.errors.columns": "Stato HTTP | Codice | Causa",
|
|
47
|
+
"tokens.errors.missing": "Manca l'header `Authorization`.",
|
|
48
|
+
"tokens.errors.invalid": "Il token è sconosciuto, revocato o scaduto.",
|
|
49
|
+
"tokens.errors.scope": "Al token manca lo scope per questo handler.",
|
|
50
|
+
"tokens.errors.route": "L'endpoint non accetta token. I token funzionano solo sugli endpoint dell'API.",
|
|
51
|
+
"tokens.errors.rate": "Troppe richieste con questo token.",
|
|
52
|
+
"tokens.errors.disabled": "I token API non fanno parte del tuo piano.",
|
|
53
|
+
"tokens.revoke.heading": "Revocare un token",
|
|
54
|
+
"tokens.revoke.body": "Revoca un token in {menuPath} non appena smetti di usarlo. Cambiare la password revoca tutti i tuoi token. Un token agisce sempre con i tuoi ruoli attuali. Se lasci l'account o il tuo utente viene eliminato, smette di funzionare.",
|
|
55
|
+
"tokens.security.heading": "Sicurezza",
|
|
56
|
+
"tokens.security.item1": "Tratta un token come una password. Conservalo in un archivio di segreti, mai nel codice, in un repository, in un'app o pagina web o in un log.",
|
|
57
|
+
"tokens.security.item2": "Dai a ogni script il suo token, con solo gli scope di cui ha bisogno.",
|
|
58
|
+
"tokens.security.item3": "Revoca i token che non usi più. Revoca subito un token se potrebbe essere trapelato.",
|
|
59
|
+
"reference.description": "Riferimento API per {scopeLabel}: ogni handler con i suoi campi e un esempio.",
|
|
60
|
+
"reference.requiredScope": "Scope richiesto",
|
|
61
|
+
"reference.endpoint": "Endpoint",
|
|
62
|
+
"reference.fields.columns": "Campo | Tipo | Obbligatorio | Descrizione",
|
|
63
|
+
"reference.yes": "sì",
|
|
64
|
+
"reference.no": "no",
|
|
65
|
+
"reference.noFields": "Questo handler non accetta campi.",
|
|
66
|
+
"reference.excluded": "Non impostabili tramite API: {fields}.",
|
|
67
|
+
"reference.exampleRequest": "Richiesta di esempio",
|
|
68
|
+
"reference.exampleResponse": "Risposta di esempio",
|
|
69
|
+
"reference.status": "Stato: {status}",
|
|
70
|
+
"events.title": "Eventi webhook",
|
|
71
|
+
"events.description": "Eventi webhook: quando vengono inviati, quale scope richiedono e cosa contiene il loro payload.",
|
|
72
|
+
"events.intro": "Un evento webhook segnala al tuo sistema che qualcosa è cambiato. Ogni evento ha un nome, una versione e un payload. Lo scope indicato per un evento è lo scope del token che permette di sottoscriverlo.",
|
|
73
|
+
"events.delivery.heading": "Consegna",
|
|
74
|
+
"events.versions.heading": "Versioni",
|
|
75
|
+
"events.versions.body": "Aggiungere un campo facoltativo mantiene la versione. Una modifica incompatibile, come rimuovere o rinominare un campo o cambiarne il tipo, riceve una nuova versione.",
|
|
76
|
+
"events.list.heading": "Eventi",
|
|
77
|
+
"events.version": "Versione",
|
|
78
|
+
"events.requiredScope": "Scope richiesto",
|
|
79
|
+
"events.example": "Payload di esempio",
|
|
80
|
+
"events.noFields": "Questo evento non contiene campi.",
|
|
81
|
+
"events.entity.created": "È stato creato un record di tipo {entity}.",
|
|
82
|
+
"events.entity.updated": "È stato aggiornato un record di tipo {entity}.",
|
|
83
|
+
"events.entity.deleted": "È stato eliminato un record di tipo {entity}.",
|
|
84
|
+
},
|
|
85
|
+
errorMeanings: {
|
|
86
|
+
validation_error: "Il payload non corrisponde ai campi dell'handler. `details` indica i campi.",
|
|
87
|
+
unauthenticated: "Non sono state inviate credenziali valide.",
|
|
88
|
+
missing_token: "Manca l'header `Authorization`.",
|
|
89
|
+
invalid_token: "Il token è sconosciuto, revocato o scaduto.",
|
|
90
|
+
ambiguous_auth: "La richiesta conteneva sia un cookie di sessione sia un token. Invia solo uno dei due.",
|
|
91
|
+
access_denied: "Al token manca lo scope per questo handler, oppure l'endpoint non accetta token.",
|
|
92
|
+
feature_disabled: "Questa funzione è disattivata o non fa parte del tuo piano.",
|
|
93
|
+
not_found: "Il record non esiste o non puoi vederlo.",
|
|
94
|
+
conflict: "La modifica è in conflitto con lo stato attuale dei dati.",
|
|
95
|
+
version_conflict: "Il record è cambiato dopo la tua lettura. Rileggilo e riprova con la nuova `version`.",
|
|
96
|
+
precondition_failed: "Un campo del record non ha più il valore che la modifica si aspettava. Rileggi il record e riprova.",
|
|
97
|
+
record_locked: "Un'altra modifica blocca il record. Riprova tra poco.",
|
|
98
|
+
idempotent_replay: "Questa modifica è già stata applicata con la stessa chiave di idempotenza. Il primo tentativo è riuscito, quindi non inviarla di nuovo.",
|
|
99
|
+
unique_violation: "Esiste già un record con questo valore.",
|
|
100
|
+
unprocessable: "I dati sono validi, ma una regola di business rifiuta la modifica. `details.reason` indica la regola.",
|
|
101
|
+
unconfigured: "Un'impostazione necessaria a questa funzione è ancora vuota. Configurala prima nell'app, poi riprova.",
|
|
102
|
+
internal_error: "Errore imprevisto del server. Riprova più tardi.",
|
|
103
|
+
member_read_timeout: "Una lettura sul server ha impiegato troppo tempo ed è stata interrotta. Riprova più tardi.",
|
|
104
|
+
rate_limited: "Troppe richieste. Attendi il numero di secondi indicato dall'header `Retry-After`.",
|
|
105
|
+
rate_limit_unavailable: "Il limite di frequenza è temporaneamente non disponibile e la richiesta è stata rifiutata. Riprova tra poco.",
|
|
106
|
+
pat_rate_limited: "Questo token ha inviato troppe richieste in poco tempo. Attendi un momento e riprova.",
|
|
107
|
+
},
|
|
108
|
+
listParameters: {
|
|
109
|
+
cursor: "Posizione da `nextCursor` della pagina precedente.",
|
|
110
|
+
limit: "Righe per pagina, {default} per impostazione predefinita, al massimo {max}.",
|
|
111
|
+
search: "Ricerca full-text nei campi ricercabili.",
|
|
112
|
+
sort: "Campo per cui ordinare.",
|
|
113
|
+
sortDirection: "`asc` o `desc`.",
|
|
114
|
+
offset: "Numero di righe da saltare. Per sfogliare è meglio `cursor`.",
|
|
115
|
+
totalCount: "Con `true` ricevi anche `total`, il numero di righe corrispondenti.",
|
|
116
|
+
includeDeleted: "Con `true` sono incluse le righe eliminate. Solo per entità con eliminazione logica.",
|
|
117
|
+
onlyDeleted: "Con `true` vengono restituite solo le righe eliminate. Solo per entità con eliminazione logica, non insieme a `includeDeleted`.",
|
|
118
|
+
filter: "Un filtro di campo con `field`, `op` e `value`. `op` è uno tra {ops}.",
|
|
119
|
+
filters: "Più filtri di campo, ciascuno con `field`, `op` e `value`. `op` è uno tra {ops}.",
|
|
120
|
+
namedFilter: "Nome di un filtro predefinito dell'entità, per esempio una coda di lavoro.",
|
|
121
|
+
aggregate: "Restituisce valori aggregati invece di righe.",
|
|
122
|
+
},
|
|
123
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { patAuthRejectHttpStatus } from "@cosmicdrift/kumiko-framework/api";
|
|
2
|
+
import type { entityListSchema } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
+
import type { FrameworkErrorCode } from "@cosmicdrift/kumiko-framework/errors";
|
|
4
|
+
export type DocumentedErrorCode = FrameworkErrorCode | keyof typeof patAuthRejectHttpStatus;
|
|
5
|
+
export type ListParameterKey = keyof typeof entityListSchema.shape;
|
|
6
|
+
export declare const structureTextKeys: readonly ["overview.title", "overview.endpoints.heading", "overview.auth.heading", "overview.body.heading", "overview.responses.heading", "overview.errors.heading", "overview.errors.columns", "overview.versions.heading", "overview.lists.heading", "overview.lists.columns", "overview.batch.heading", "overview.retry.heading", "tokens.title", "tokens.create.heading", "tokens.use.heading", "tokens.scopes.heading", "tokens.scopes.columns", "tokens.rateLimit.heading", "tokens.errors.heading", "tokens.errors.columns", "tokens.revoke.heading", "tokens.security.heading", "reference.requiredScope", "reference.endpoint", "reference.fields.columns", "reference.yes", "reference.no", "reference.exampleRequest", "reference.exampleResponse", "reference.status", "events.title", "events.delivery.heading", "events.versions.heading", "events.list.heading", "events.version", "events.requiredScope", "events.example"];
|
|
7
|
+
export declare const paragraphTextKeys: readonly ["overview.description", "overview.intro", "overview.endpoints.query", "overview.endpoints.write", "overview.endpoints.batch", "overview.auth.body", "overview.body.body", "overview.responses.success", "overview.responses.error", "overview.versions.body", "overview.lists.intro", "overview.lists.response", "overview.batch.body", "overview.retry.body", "tokens.description", "tokens.intro", "tokens.create.step1", "tokens.create.step2", "tokens.create.step3", "tokens.create.step4", "tokens.expiry", "tokens.use.body", "tokens.scopes.intro", "tokens.rateLimit", "tokens.errors.missing", "tokens.errors.invalid", "tokens.errors.scope", "tokens.errors.route", "tokens.errors.rate", "tokens.errors.disabled", "tokens.revoke.body", "tokens.security.item1", "tokens.security.item2", "tokens.security.item3", "reference.description", "reference.noFields", "reference.excluded", "events.description", "events.intro", "events.versions.body", "events.noFields", "events.entity.created", "events.entity.updated", "events.entity.deleted"];
|
|
8
|
+
export type StructureTextKey = (typeof structureTextKeys)[number];
|
|
9
|
+
export type ParagraphTextKey = (typeof paragraphTextKeys)[number];
|
|
10
|
+
export type ApiDocsTextKey = StructureTextKey | ParagraphTextKey;
|
|
11
|
+
export type ApiDocsTexts = {
|
|
12
|
+
readonly text: Readonly<Record<ApiDocsTextKey, string>>;
|
|
13
|
+
readonly errorMeanings: Readonly<Record<DocumentedErrorCode, string>>;
|
|
14
|
+
readonly listParameters: Readonly<Record<ListParameterKey, string>>;
|
|
15
|
+
};
|
|
16
|
+
export declare function placeholdersOf(template: string): ReadonlySet<string>;
|
|
17
|
+
export declare function formatApiDocsText(template: string, params?: Readonly<Record<string, string | number>>): string;
|
|
18
|
+
export declare function isParagraphTextKey(key: string): key is ParagraphTextKey;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { isOneOf } from "@cosmicdrift/kumiko-types/type-guards";
|
|
2
|
+
// Headings, column heads and short labels: the page structure, never overridable.
|
|
3
|
+
export const structureTextKeys = [
|
|
4
|
+
"overview.title",
|
|
5
|
+
"overview.endpoints.heading",
|
|
6
|
+
"overview.auth.heading",
|
|
7
|
+
"overview.body.heading",
|
|
8
|
+
"overview.responses.heading",
|
|
9
|
+
"overview.errors.heading",
|
|
10
|
+
"overview.errors.columns",
|
|
11
|
+
"overview.versions.heading",
|
|
12
|
+
"overview.lists.heading",
|
|
13
|
+
"overview.lists.columns",
|
|
14
|
+
"overview.batch.heading",
|
|
15
|
+
"overview.retry.heading",
|
|
16
|
+
"tokens.title",
|
|
17
|
+
"tokens.create.heading",
|
|
18
|
+
"tokens.use.heading",
|
|
19
|
+
"tokens.scopes.heading",
|
|
20
|
+
"tokens.scopes.columns",
|
|
21
|
+
"tokens.rateLimit.heading",
|
|
22
|
+
"tokens.errors.heading",
|
|
23
|
+
"tokens.errors.columns",
|
|
24
|
+
"tokens.revoke.heading",
|
|
25
|
+
"tokens.security.heading",
|
|
26
|
+
"reference.requiredScope",
|
|
27
|
+
"reference.endpoint",
|
|
28
|
+
"reference.fields.columns",
|
|
29
|
+
"reference.yes",
|
|
30
|
+
"reference.no",
|
|
31
|
+
"reference.exampleRequest",
|
|
32
|
+
"reference.exampleResponse",
|
|
33
|
+
"reference.status",
|
|
34
|
+
"events.title",
|
|
35
|
+
"events.delivery.heading",
|
|
36
|
+
"events.versions.heading",
|
|
37
|
+
"events.list.heading",
|
|
38
|
+
"events.version",
|
|
39
|
+
"events.requiredScope",
|
|
40
|
+
"events.example",
|
|
41
|
+
];
|
|
42
|
+
// Running text: an app may replace single paragraphs through `apiDocs.texts`.
|
|
43
|
+
export const paragraphTextKeys = [
|
|
44
|
+
"overview.description",
|
|
45
|
+
"overview.intro",
|
|
46
|
+
"overview.endpoints.query",
|
|
47
|
+
"overview.endpoints.write",
|
|
48
|
+
"overview.endpoints.batch",
|
|
49
|
+
"overview.auth.body",
|
|
50
|
+
"overview.body.body",
|
|
51
|
+
"overview.responses.success",
|
|
52
|
+
"overview.responses.error",
|
|
53
|
+
"overview.versions.body",
|
|
54
|
+
"overview.lists.intro",
|
|
55
|
+
"overview.lists.response",
|
|
56
|
+
"overview.batch.body",
|
|
57
|
+
"overview.retry.body",
|
|
58
|
+
"tokens.description",
|
|
59
|
+
"tokens.intro",
|
|
60
|
+
"tokens.create.step1",
|
|
61
|
+
"tokens.create.step2",
|
|
62
|
+
"tokens.create.step3",
|
|
63
|
+
"tokens.create.step4",
|
|
64
|
+
"tokens.expiry",
|
|
65
|
+
"tokens.use.body",
|
|
66
|
+
"tokens.scopes.intro",
|
|
67
|
+
"tokens.rateLimit",
|
|
68
|
+
"tokens.errors.missing",
|
|
69
|
+
"tokens.errors.invalid",
|
|
70
|
+
"tokens.errors.scope",
|
|
71
|
+
"tokens.errors.route",
|
|
72
|
+
"tokens.errors.rate",
|
|
73
|
+
"tokens.errors.disabled",
|
|
74
|
+
"tokens.revoke.body",
|
|
75
|
+
"tokens.security.item1",
|
|
76
|
+
"tokens.security.item2",
|
|
77
|
+
"tokens.security.item3",
|
|
78
|
+
"reference.description",
|
|
79
|
+
"reference.noFields",
|
|
80
|
+
"reference.excluded",
|
|
81
|
+
"events.description",
|
|
82
|
+
"events.intro",
|
|
83
|
+
"events.versions.body",
|
|
84
|
+
"events.noFields",
|
|
85
|
+
"events.entity.created",
|
|
86
|
+
"events.entity.updated",
|
|
87
|
+
"events.entity.deleted",
|
|
88
|
+
];
|
|
89
|
+
const PLACEHOLDER = /\{([A-Za-z][A-Za-z0-9]*)\}/g;
|
|
90
|
+
export function placeholdersOf(template) {
|
|
91
|
+
return new Set([...template.matchAll(PLACEHOLDER)].map((match) => match[1] ?? ""));
|
|
92
|
+
}
|
|
93
|
+
export function formatApiDocsText(template, params = {}) {
|
|
94
|
+
return template.replace(PLACEHOLDER, (_whole, name) => {
|
|
95
|
+
const value = params[name];
|
|
96
|
+
if (value === undefined) {
|
|
97
|
+
throw new Error(`API docs text is missing the parameter "${name}": ${template}`);
|
|
98
|
+
}
|
|
99
|
+
return String(value);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
export function isParagraphTextKey(key) {
|
|
103
|
+
return isOneOf(paragraphTextKeys, key);
|
|
104
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RegistryManifestView } from "../types.ts";
|
|
2
|
+
import type { ApiDocsModel } from "./model.ts";
|
|
3
|
+
import { type ApiDocsProblem } from "./problems.ts";
|
|
4
|
+
type UiOnlyWrite = {
|
|
5
|
+
readonly pattern: string;
|
|
6
|
+
readonly reason: string;
|
|
7
|
+
};
|
|
8
|
+
/** Write QN to the ids of the screens that trigger it. */
|
|
9
|
+
export declare function writesByScreen(registry: RegistryManifestView): ReadonlyMap<string, readonly string[]>;
|
|
10
|
+
/** UI writes that no token scope reaches, in features the docs otherwise cover. */
|
|
11
|
+
export declare function uiWriteProblems(registry: RegistryManifestView, model: ApiDocsModel, uiOnlyWrites: readonly UiOnlyWrite[]): readonly ApiDocsProblem[];
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { qnMatches } from "@cosmicdrift/kumiko-framework/api";
|
|
2
|
+
import { isPlainObject } from "@cosmicdrift/kumiko-types/type-guards";
|
|
3
|
+
import { compareIds } from "../labels.js";
|
|
4
|
+
import { sortApiDocsProblems } from "./problems.js";
|
|
5
|
+
import { isSystemOnlyHandler } from "./system-only.js";
|
|
6
|
+
function collectStrings(value, into, seen) {
|
|
7
|
+
if (typeof value === "string") {
|
|
8
|
+
into.add(value);
|
|
9
|
+
// skip: a string is a leaf, nothing to descend into
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
// skip: primitives and already visited objects add no further strings
|
|
13
|
+
if (typeof value !== "object" || value === null || seen.has(value))
|
|
14
|
+
return;
|
|
15
|
+
seen.add(value);
|
|
16
|
+
const children = Array.isArray(value) ? value : isPlainObject(value) ? Object.values(value) : [];
|
|
17
|
+
for (const child of children)
|
|
18
|
+
collectStrings(child, into, seen);
|
|
19
|
+
}
|
|
20
|
+
function featureOf(qualifiedId) {
|
|
21
|
+
return qualifiedId.split(":")[0] ?? qualifiedId;
|
|
22
|
+
}
|
|
23
|
+
// An entityEdit screen names no handler: saving runs the entity's generated create/update.
|
|
24
|
+
function entityEditWrites(screen) {
|
|
25
|
+
if (screen.type !== "entityEdit")
|
|
26
|
+
return [];
|
|
27
|
+
const feature = featureOf(screen.id);
|
|
28
|
+
const entity = screen.entity.slice(screen.entity.lastIndexOf(":") + 1);
|
|
29
|
+
return [`${feature}:write:${entity}:create`, `${feature}:write:${entity}:update`];
|
|
30
|
+
}
|
|
31
|
+
/** Write QN to the ids of the screens that trigger it. */
|
|
32
|
+
export function writesByScreen(registry) {
|
|
33
|
+
const registered = new Set(registry.getAllWriteHandlers().keys());
|
|
34
|
+
const screensOfWrite = new Map();
|
|
35
|
+
for (const [screenId, screen] of registry.getAllScreens()) {
|
|
36
|
+
const strings = new Set(entityEditWrites(screen));
|
|
37
|
+
collectStrings(screen, strings, new WeakSet());
|
|
38
|
+
for (const candidate of strings) {
|
|
39
|
+
if (!registered.has(candidate))
|
|
40
|
+
continue;
|
|
41
|
+
const screens = screensOfWrite.get(candidate) ?? new Set();
|
|
42
|
+
screens.add(screenId);
|
|
43
|
+
screensOfWrite.set(candidate, screens);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return new Map([...screensOfWrite].map(([qn, screens]) => [qn, [...screens].sort(compareIds)]));
|
|
47
|
+
}
|
|
48
|
+
/** UI writes that no token scope reaches, in features the docs otherwise cover. */
|
|
49
|
+
export function uiWriteProblems(registry, model, uiOnlyWrites) {
|
|
50
|
+
const inScope = new Set(model.handlers.map((handler) => handler.qn));
|
|
51
|
+
const coveredFeatures = new Set([...inScope].map(featureOf));
|
|
52
|
+
const usedPatterns = new Set();
|
|
53
|
+
const problems = [];
|
|
54
|
+
const writeHandlers = registry.getAllWriteHandlers();
|
|
55
|
+
for (const [qn, screens] of writesByScreen(registry)) {
|
|
56
|
+
if (inScope.has(qn) || !coveredFeatures.has(featureOf(qn)))
|
|
57
|
+
continue;
|
|
58
|
+
const handler = writeHandlers.get(qn);
|
|
59
|
+
if (handler !== undefined && isSystemOnlyHandler(handler))
|
|
60
|
+
continue;
|
|
61
|
+
const matching = uiOnlyWrites.filter((entry) => qnMatches(entry.pattern, qn));
|
|
62
|
+
for (const entry of matching)
|
|
63
|
+
usedPatterns.add(entry.pattern);
|
|
64
|
+
if (matching.length === 0)
|
|
65
|
+
problems.push({ kind: "uiWriteOutsideScopes", qn, screens });
|
|
66
|
+
}
|
|
67
|
+
for (const entry of uiOnlyWrites) {
|
|
68
|
+
if (!usedPatterns.has(entry.pattern)) {
|
|
69
|
+
problems.push({ kind: "unusedUiOnlyWrite", pattern: entry.pattern });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return sortApiDocsProblems(problems);
|
|
73
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { QueryHandlerDef, WriteHandlerDef } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
+
export declare function systemOnlyPropertyNames(jsonSchema: Record<string, unknown>): readonly string[];
|
|
3
|
+
/** `undefined` when the schema can't be expressed as JSON Schema (transforms,
|
|
4
|
+
* z.instanceof, ...) — such a handler is unusable for an agent tool call. */
|
|
5
|
+
export declare function handlerInputJsonSchema(def: QueryHandlerDef | WriteHandlerDef): Readonly<Record<string, unknown>> | undefined;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SYSTEM_ONLY_JSON_SCHEMA_KEY } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
+
import { isPlainObject } from "@cosmicdrift/kumiko-types/type-guards";
|
|
3
|
+
import * as z from "zod";
|
|
4
|
+
// Agent dispatch never runs as a system identity, so properties the engine only
|
|
5
|
+
// honors for system callers would be silently dropped — hide them from the tool.
|
|
6
|
+
export function systemOnlyPropertyNames(jsonSchema) {
|
|
7
|
+
const properties = jsonSchema["properties"];
|
|
8
|
+
if (typeof properties !== "object" || properties === null)
|
|
9
|
+
return [];
|
|
10
|
+
return Object.entries(properties)
|
|
11
|
+
.filter(([, property]) => isPlainObject(property) && property[SYSTEM_ONLY_JSON_SCHEMA_KEY] === true)
|
|
12
|
+
.map(([name]) => name);
|
|
13
|
+
}
|
|
14
|
+
function withoutSystemOnlyProperties(jsonSchema) {
|
|
15
|
+
const properties = jsonSchema["properties"];
|
|
16
|
+
if (typeof properties !== "object" || properties === null)
|
|
17
|
+
return jsonSchema;
|
|
18
|
+
const hidden = systemOnlyPropertyNames(jsonSchema);
|
|
19
|
+
if (hidden.length === 0)
|
|
20
|
+
return jsonSchema;
|
|
21
|
+
const required = jsonSchema["required"];
|
|
22
|
+
return {
|
|
23
|
+
...jsonSchema,
|
|
24
|
+
properties: Object.fromEntries(Object.entries(properties).filter(([name]) => !hidden.includes(name))),
|
|
25
|
+
...(Array.isArray(required) && { required: required.filter((name) => !hidden.includes(name)) }),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** `undefined` when the schema can't be expressed as JSON Schema (transforms,
|
|
29
|
+
* z.instanceof, ...) — such a handler is unusable for an agent tool call. */
|
|
30
|
+
export function handlerInputJsonSchema(def) {
|
|
31
|
+
try {
|
|
32
|
+
return withoutSystemOnlyProperties(z.toJSONSchema(def.schema, { io: "input" }));
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type { AgentDocGap, AgentDocGapKind } from "./agent-doc-lint.ts";
|
|
2
|
-
export { AgentDocGapKinds, findAgentDocGaps, findHandlerTranslationGaps, formatAgentDocGap, } from "./agent-doc-lint.ts";
|
|
2
|
+
export { AgentDocGapKinds, findAgentDocGaps, findDescriptionTranslationGaps, findHandlerTranslationGaps, formatAgentDocGap, } from "./agent-doc-lint.ts";
|
|
3
3
|
export { buildAgentManifest } from "./agent-manifest.ts";
|
|
4
|
+
export { type ApiDocsDiff, type ApiDocsInput, type ApiDocsLocale, type ApiDocsProblem, type ApiDocsResult, type ApiDocsSource, type ApiDocsTexts, type ApiExampleFile, ApiExampleFileSchema, apiDocsLocales, diffApiDocsOutput, formatApiDocsProblem, formatApiDocsText, generateApiDocs, INDEX_FILE, isApiDocsLocale, type NamedApiExample, type NamedWebhookExample, OPENAPI_FILE, type ResolvedApiDocsConfig, WebhookExampleFileSchema, } from "./api-docs/index.ts";
|
|
4
5
|
export { AGENT_TOOLS_FEATURE_NAME, createAgentToolsFeature } from "./feature.ts";
|
|
5
6
|
export { buildToolCatalog, OPEN_FORM_TOOL_NAME, toolNameForQn } from "./tool-catalog.ts";
|
|
6
7
|
export type { ToolCallRequest, ToolCallResult, ToolDispatcher } from "./tool-dispatch.ts";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { AgentDocGapKinds, findAgentDocGaps, findHandlerTranslationGaps, formatAgentDocGap, } from "./agent-doc-lint.js";
|
|
1
|
+
export { AgentDocGapKinds, findAgentDocGaps, findDescriptionTranslationGaps, findHandlerTranslationGaps, formatAgentDocGap, } from "./agent-doc-lint.js";
|
|
2
2
|
export { buildAgentManifest } from "./agent-manifest.js";
|
|
3
|
+
export { ApiExampleFileSchema, apiDocsLocales, diffApiDocsOutput, formatApiDocsProblem, formatApiDocsText, generateApiDocs, INDEX_FILE, isApiDocsLocale, OPENAPI_FILE, WebhookExampleFileSchema, } from "./api-docs/index.js";
|
|
3
4
|
export { AGENT_TOOLS_FEATURE_NAME, createAgentToolsFeature } from "./feature.js";
|
|
4
5
|
export { buildToolCatalog, OPEN_FORM_TOOL_NAME, toolNameForQn } from "./tool-catalog.js";
|
|
5
6
|
export { dispatchToolCall, TOOL_CALL_ERROR_CODES } from "./tool-dispatch.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { TranslationEntry, TranslationKeys } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
+
export declare function compareIds(a: string, b: string): number;
|
|
3
|
+
/** Requested locale, then English, then the first remaining locale in code-point
|
|
4
|
+
* order; `undefined` when the entry has no text at all (the key is then omitted). */
|
|
5
|
+
export declare function pickLabel(labels: Readonly<Record<string, string>>, locale: string): string | undefined;
|
|
6
|
+
/** The manifest surfaces one string per locale — a plural entry reads as its
|
|
7
|
+
* CLDR `other` form since the manifest has no `count` to select a category. */
|
|
8
|
+
export declare function entryAsLabels(entry: TranslationEntry): Readonly<Record<string, string>>;
|
|
9
|
+
/** Translation keys carry a feature prefix the manifest can't reconstruct
|
|
10
|
+
* (`showcase:entity:item:field:title`), so match on the suffix instead. The
|
|
11
|
+
* suffix must start at a `:` or `.` boundary of the key. */
|
|
12
|
+
export declare function labelsForSuffix(translations: TranslationKeys, suffix: string): Readonly<Record<string, string>>;
|
|
13
|
+
/** The labels of `fullKey` per locale, completed by locale packages that translate it
|
|
14
|
+
* under `locale-<xx>:<fullKey>` or, for `<feature>:<key>`, under `locale-<xx>:<key>`.
|
|
15
|
+
* The owner's text wins, then the locale packages in code-point order. */
|
|
16
|
+
export declare function localizedLabels(translations: TranslationKeys, fullKey: string): Readonly<Record<string, string>>;
|
|
17
|
+
/** `labelsForSuffix` with the locale-package completion of `localizedLabels`: the owner
|
|
18
|
+
* key behind the suffix is preferred over a locale package key that ends the same way. */
|
|
19
|
+
export declare function localizedLabelsForSuffix(translations: TranslationKeys, suffix: string): Readonly<Record<string, string>>;
|
|
20
|
+
/** Entity field label per locale; `field` may be a dotted path, only its last segment names the field. */
|
|
21
|
+
export declare function entityFieldLabels(translations: TranslationKeys, entity: string, field: string): Readonly<Record<string, string>>;
|
|
22
|
+
/** Screen titles live under the qualified id or, for feature-local screens, under
|
|
23
|
+
* `screen:<shortId>.title`. */
|
|
24
|
+
export declare function screenTitleLabels(translations: TranslationKeys, screenId: string): Readonly<Record<string, string>>;
|
|
25
|
+
/** `screenTitleLabels` completed by locale packages (see `localizedLabels`). */
|
|
26
|
+
export declare function localizedScreenTitleLabels(translations: TranslationKeys, screenId: string): Readonly<Record<string, string>>;
|