adula 2.0.0 → 2.2.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/README.md +149 -18
- package/build/agent/AGENTS.template.md +4 -4
- package/build/agent/capabilities.md +22 -11
- package/build/agent/skills/adula-frontend-design/SKILL.md +1 -1
- package/build/agent/skills/idea-review/SKILL.md +2 -2
- package/build/commands/adula_outbox.d.ts +10 -0
- package/build/commands/adula_outbox.js +11 -0
- package/build/commands/adula_restore_reconcile.d.ts +10 -0
- package/build/commands/adula_restore_reconcile.js +34 -0
- package/build/commands/adula_runtime_health.d.ts +10 -0
- package/build/commands/adula_runtime_health.js +27 -0
- package/build/commands/adula_uploads_prune.d.ts +10 -0
- package/build/commands/adula_uploads_prune.js +16 -0
- package/build/commands/app.d.ts +10 -0
- package/build/commands/app.js +64 -0
- package/build/commands/backup_create.d.ts +11 -0
- package/build/commands/backup_create.js +99 -0
- package/build/commands/backup_restore_files.d.ts +11 -0
- package/build/commands/backup_restore_files.js +44 -0
- package/build/commands/backup_restore_test.d.ts +12 -0
- package/build/commands/backup_restore_test.js +185 -0
- package/build/commands/backup_services.d.ts +31 -0
- package/build/commands/backup_services.js +6 -0
- package/build/commands/backup_verify.d.ts +9 -0
- package/build/commands/backup_verify.js +59 -0
- package/build/commands/backup_verify_snapshot.d.ts +10 -0
- package/build/commands/backup_verify_snapshot.js +37 -0
- package/build/commands/client.d.ts +16 -0
- package/build/commands/client.js +71 -0
- package/build/commands/doctor.js +4 -1
- package/build/commands/install.d.ts +8 -0
- package/build/commands/install.js +63 -45
- package/build/commands/main.d.ts +3 -2
- package/build/commands/main.js +26 -0
- package/build/commands/module_add.js +4 -20
- package/build/commands/resource.d.ts +2 -0
- package/build/commands/resource.js +12 -3
- package/build/commands/resource_migration.d.ts +15 -0
- package/build/commands/resource_migration.js +72 -0
- package/build/commands/resource_snapshot.d.ts +2 -0
- package/build/commands/resource_snapshot.js +3 -0
- package/build/commands/sla_evaluate.d.ts +14 -0
- package/build/commands/sla_evaluate.js +16 -0
- package/build/commands/ui.js +5 -3
- package/build/commands/ui_css.d.ts +9 -0
- package/build/commands/ui_css.js +19 -0
- package/build/commands/upgrade.d.ts +1 -1
- package/build/commands/upgrade.js +1 -1
- package/build/configure.js +1 -1
- package/build/database/migrations/1770000000020_two_factor.d.ts +5 -0
- package/build/database/migrations/1770000000020_two_factor.js +10 -0
- package/build/database/migrations/1770000000041_import_modes.d.ts +5 -0
- package/build/database/migrations/1770000000041_import_modes.js +10 -0
- package/build/database/migrations/1770000000042_sync_jobs.d.ts +5 -0
- package/build/database/migrations/1770000000042_sync_jobs.js +10 -0
- package/build/database/migrations/1770000000043_notification_channels.d.ts +5 -0
- package/build/database/migrations/1770000000043_notification_channels.js +10 -0
- package/build/database/migrations/1770000000044_channel_confirmations.d.ts +5 -0
- package/build/database/migrations/1770000000044_channel_confirmations.js +10 -0
- package/build/database/migrations/1770000000045_import_leases.d.ts +5 -0
- package/build/database/migrations/1770000000045_import_leases.js +10 -0
- package/build/database/migrations/1770000000046_workflow_delegation_sla.d.ts +5 -0
- package/build/database/migrations/1770000000046_workflow_delegation_sla.js +10 -0
- package/build/database/migrations/1770000000049_print_templates.d.ts +5 -0
- package/build/database/migrations/1770000000049_print_templates.js +10 -0
- package/build/index.d.ts +56 -10
- package/build/index.js +34 -6
- package/build/providers/adula_provider.d.ts +2 -0
- package/build/providers/adula_provider.js +7 -0
- package/build/src/admin/contracts.js +1 -1
- package/build/src/admin/controller.d.ts +14 -1
- package/build/src/admin/controller.js +77 -13
- package/build/src/admin/errors.d.ts +32 -0
- package/build/src/admin/errors.js +63 -1
- package/build/src/admin/presentation.d.ts +21 -2
- package/build/src/admin/resource/editor.d.ts +59 -0
- package/build/src/admin/resource/editor.js +323 -0
- package/build/src/admin/resource/export.d.ts +37 -0
- package/build/src/admin/resource/export.js +181 -0
- package/build/src/admin/resource/lifecycle.d.ts +21 -0
- package/build/src/admin/resource/lifecycle.js +91 -0
- package/build/src/admin/resource/query.d.ts +100 -0
- package/build/src/admin/resource/query.js +508 -0
- package/build/src/admin/resource/read.d.ts +106 -0
- package/build/src/admin/resource/read.js +327 -0
- package/build/src/admin/resource/shared.d.ts +77 -0
- package/build/src/admin/resource/shared.js +222 -0
- package/build/src/admin/resource/trash.d.ts +10 -0
- package/build/src/admin/resource/trash.js +56 -0
- package/build/src/admin/resource/write.d.ts +57 -0
- package/build/src/admin/resource/write.js +574 -0
- package/build/src/admin/resource_service.d.ts +66 -193
- package/build/src/admin/resource_service.js +69 -1345
- package/build/src/attachments/attachment_service.d.ts +46 -2
- package/build/src/attachments/attachment_service.js +96 -4
- package/build/src/auth/conditions.d.ts +5 -0
- package/build/src/auth/conditions.js +26 -3
- package/build/src/auth/sql.js +17 -5
- package/build/src/auth/two_factor.d.ts +96 -0
- package/build/src/auth/two_factor.js +259 -0
- package/build/src/collaboration/assignments.d.ts +36 -1
- package/build/src/collaboration/assignments.js +132 -66
- package/build/src/collaboration/record_collaboration.d.ts +2 -3
- package/build/src/collaboration/record_collaboration.js +19 -16
- package/build/src/collaboration/shared.d.ts +16 -0
- package/build/src/collaboration/shared.js +21 -0
- package/build/src/commands/app_scaffold.d.ts +72 -0
- package/build/src/commands/app_scaffold.js +285 -0
- package/build/src/commands/capabilities.js +34 -8
- package/build/src/commands/doctor.d.ts +14 -2
- package/build/src/commands/doctor.js +50 -5
- package/build/src/commands/gap_report.d.ts +1 -1
- package/build/src/commands/gap_report.js +2 -2
- package/build/src/commands/generator.d.ts +37 -1
- package/build/src/commands/generator.js +61 -18
- package/build/src/commands/snapshot.d.ts +10 -13
- package/build/src/commands/snapshot.js +31 -14
- package/build/src/commands/source_markers.d.ts +10 -0
- package/build/src/commands/source_markers.js +29 -0
- package/build/src/core/activity.d.ts +2 -0
- package/build/src/core/activity.js +7 -1
- package/build/src/core/administrators.d.ts +38 -0
- package/build/src/core/administrators.js +129 -0
- package/build/src/core/html_sanitizer.d.ts +20 -0
- package/build/src/core/html_sanitizer.js +261 -0
- package/build/src/core/like.d.ts +5 -0
- package/build/src/core/like.js +5 -0
- package/build/src/core/lookups.d.ts +80 -0
- package/build/src/core/lookups.js +319 -0
- package/build/src/core/message_templates.d.ts +7 -2
- package/build/src/core/message_templates.js +72 -11
- package/build/src/core/module_seed.js +2 -1
- package/build/src/core/notification_channels.d.ts +235 -0
- package/build/src/core/notification_channels.js +660 -0
- package/build/src/core/roles.js +2 -2
- package/build/src/core/saved_views.d.ts +8 -1
- package/build/src/core/saved_views.js +36 -2
- package/build/src/core/sequences.d.ts +32 -0
- package/build/src/core/sequences.js +97 -0
- package/build/src/core/settings.d.ts +5 -0
- package/build/src/core/settings.js +19 -2
- package/build/src/core/template_language.d.ts +61 -0
- package/build/src/core/template_language.js +141 -0
- package/build/src/core/ui_preferences.d.ts +4 -0
- package/build/src/core/ui_preferences.js +4 -1
- package/build/src/core/user_invitations.d.ts +5 -1
- package/build/src/core/user_invitations.js +7 -1
- package/build/src/core/users.js +1 -1
- package/build/src/database/calendar_days.d.ts +19 -0
- package/build/src/database/calendar_days.js +36 -0
- package/build/src/database/schema.d.ts +155 -2
- package/build/src/database/schema.js +531 -59
- package/build/src/database/schema_diff.d.ts +56 -0
- package/build/src/database/schema_diff.js +157 -0
- package/build/src/events/record_mutation.d.ts +2 -1
- package/build/src/events/record_mutation.js +1 -0
- package/build/src/integrations/api_client.d.ts +37 -0
- package/build/src/integrations/api_client.js +552 -0
- package/build/src/integrations/import_adapters.d.ts +37 -0
- package/build/src/integrations/import_adapters.js +35 -0
- package/build/src/integrations/imports.d.ts +118 -16
- package/build/src/integrations/imports.js +406 -73
- package/build/src/integrations/openapi.d.ts +3 -1
- package/build/src/integrations/openapi.js +454 -31
- package/build/src/integrations/outbound.d.ts +51 -0
- package/build/src/integrations/outbound.js +195 -0
- package/build/src/integrations/print.d.ts +21 -1
- package/build/src/integrations/print.js +63 -21
- package/build/src/integrations/print_templates.d.ts +216 -0
- package/build/src/integrations/print_templates.js +1015 -0
- package/build/src/integrations/sync_jobs.d.ts +139 -0
- package/build/src/integrations/sync_jobs.js +416 -0
- package/build/src/integrations/webhooks.d.ts +12 -12
- package/build/src/integrations/webhooks.js +34 -43
- package/build/src/languages/ar.d.ts +11 -0
- package/build/src/languages/ar.js +336 -0
- package/build/src/languages/ar_ui.d.ts +332 -0
- package/build/src/languages/ar_ui.js +333 -0
- package/build/src/languages/catalog.d.ts +66 -0
- package/build/src/languages/catalog.js +152 -0
- package/build/src/languages/en.d.ts +7 -0
- package/build/src/languages/en.js +330 -0
- package/build/src/languages/en_ui.d.ts +3 -0
- package/build/src/languages/en_ui.js +328 -0
- package/build/src/languages/validation.d.ts +26 -0
- package/build/src/languages/validation.js +60 -0
- package/build/src/lists/bulk_actions.d.ts +89 -0
- package/build/src/lists/bulk_actions.js +268 -0
- package/build/src/lists/dashboards.d.ts +96 -0
- package/build/src/lists/dashboards.js +241 -0
- package/build/src/mcp/tools.js +1 -1
- package/build/src/resource/define_resource.d.ts +18 -1
- package/build/src/resource/define_resource.js +205 -18
- package/build/src/resource/definition.d.ts +44 -0
- package/build/src/resource/definition.js +171 -0
- package/build/src/resource/registry.js +15 -4
- package/build/src/resource/types.d.ts +304 -16
- package/build/src/resource/values.d.ts +56 -1
- package/build/src/resource/values.js +237 -5
- package/build/src/services/settings.d.ts +2 -0
- package/build/src/services/settings.js +5 -1
- package/build/src/upgrade/legacy.js +2 -2
- package/build/src/workflows/calendar.d.ts +9 -0
- package/build/src/workflows/calendar.js +44 -0
- package/build/src/workflows/define_workflow.d.ts +48 -3
- package/build/src/workflows/define_workflow.js +57 -13
- package/build/src/workflows/delegations.d.ts +93 -0
- package/build/src/workflows/delegations.js +287 -0
- package/build/src/workflows/engine.d.ts +69 -4
- package/build/src/workflows/engine.js +441 -83
- package/build/src/workflows/sla.d.ts +15 -0
- package/build/src/workflows/sla.js +8 -0
- package/build/stubs/resource_contract.txt +12 -1
- package/package.json +5 -2
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { resourceSchema, } from './schema.js';
|
|
2
|
+
import { fieldSnapshot } from '../commands/snapshot.js';
|
|
3
|
+
/** varchar(n) lengths may be widened by hand; only the base type is compared. */
|
|
4
|
+
const comparable = (type) => type.replace(/^character varying\(\d+\)$/, 'character varying');
|
|
5
|
+
async function liveColumns(db, table) {
|
|
6
|
+
const result = await db.raw(`SELECT a.attname AS name, format_type(a.atttypid, a.atttypmod) AS type,
|
|
7
|
+
a.attnotnull AS not_null
|
|
8
|
+
FROM pg_attribute a
|
|
9
|
+
WHERE a.attrelid = to_regclass(?) AND a.attnum > 0 AND NOT a.attisdropped`, [table]);
|
|
10
|
+
return new Map(result.rows.map((row) => [
|
|
11
|
+
row.name,
|
|
12
|
+
{ type: row.type, notNull: row.not_null },
|
|
13
|
+
]));
|
|
14
|
+
}
|
|
15
|
+
async function liveUniqueIndexes(db, table) {
|
|
16
|
+
const result = await db.raw(`SELECT i.relname AS name, pg_get_expr(x.indpred, x.indrelid) AS predicate,
|
|
17
|
+
array_agg(a.attname::text ORDER BY k.ord) AS columns
|
|
18
|
+
FROM pg_index x
|
|
19
|
+
JOIN pg_class i ON i.oid = x.indexrelid
|
|
20
|
+
CROSS JOIN LATERAL unnest(x.indkey) WITH ORDINALITY AS k(attnum, ord)
|
|
21
|
+
JOIN pg_attribute a ON a.attrelid = x.indrelid AND a.attnum = k.attnum
|
|
22
|
+
WHERE x.indrelid = to_regclass(?) AND x.indisunique
|
|
23
|
+
GROUP BY x.indexrelid, i.relname, x.indpred, x.indrelid`, [table]);
|
|
24
|
+
return result.rows.map((row) => ({
|
|
25
|
+
name: row.name,
|
|
26
|
+
predicate: row.predicate ?? '',
|
|
27
|
+
key: [...row.columns].sort().join(','),
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
async function exists(db, table) {
|
|
31
|
+
const result = await db.raw('SELECT to_regclass(?) IS NOT NULL AS present', [table]);
|
|
32
|
+
return Boolean(result.rows[0]?.present);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Compares the live table (resolved through the connection's search_path) with what the
|
|
36
|
+
* definition expects: missing columns, different types, NOT NULL columns the definition
|
|
37
|
+
* lets be empty, missing unique indexes (by column set, whatever their name), unique
|
|
38
|
+
* indexes that still count cancelled documents and missing join tables. Nothing is changed.
|
|
39
|
+
*/
|
|
40
|
+
export async function schemaDrift(db, resource) {
|
|
41
|
+
const expected = resourceSchema(resource);
|
|
42
|
+
const drift = {
|
|
43
|
+
table: expected.table,
|
|
44
|
+
missingTable: false,
|
|
45
|
+
missingColumns: [],
|
|
46
|
+
wrongTypes: [],
|
|
47
|
+
notNullColumns: [],
|
|
48
|
+
missingUnique: [],
|
|
49
|
+
staleUnique: [],
|
|
50
|
+
missingJoinTables: [],
|
|
51
|
+
};
|
|
52
|
+
if (!(await exists(db, expected.table)))
|
|
53
|
+
return { ...drift, missingTable: true };
|
|
54
|
+
const columns = await liveColumns(db, expected.table);
|
|
55
|
+
for (const column of expected.columns) {
|
|
56
|
+
const actual = columns.get(column.name);
|
|
57
|
+
if (actual === undefined) {
|
|
58
|
+
drift.missingColumns.push(column);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (comparable(actual.type) !== comparable(column.type))
|
|
62
|
+
drift.wrongTypes.push({ column: column.name, expected: column.type, actual: actual.type });
|
|
63
|
+
if (column.field !== null && column.nullable && actual.notNull)
|
|
64
|
+
drift.notNullColumns.push(column.name);
|
|
65
|
+
}
|
|
66
|
+
const unique = await liveUniqueIndexes(db, expected.table);
|
|
67
|
+
for (const index of expected.unique) {
|
|
68
|
+
const key = [...index.columns].sort().join(',');
|
|
69
|
+
const matches = unique.filter((live) => live.key === key);
|
|
70
|
+
if (!matches.length)
|
|
71
|
+
drift.missingUnique.push(index);
|
|
72
|
+
else if (index.excludeCancelled)
|
|
73
|
+
// Only AdulaJS's own partial indexes over live rows are recreated; a hand-made
|
|
74
|
+
// index or constraint without that predicate is left to its author.
|
|
75
|
+
for (const live of matches)
|
|
76
|
+
if (/\bdeleted_at IS NULL\b/.test(live.predicate) && !/\bdoc_status\b/.test(live.predicate))
|
|
77
|
+
drift.staleUnique.push({ index: live.name, expected: index });
|
|
78
|
+
}
|
|
79
|
+
for (const join of expected.joinTables)
|
|
80
|
+
if (!(await exists(db, join.table)))
|
|
81
|
+
drift.missingJoinTables.push(join);
|
|
82
|
+
return drift;
|
|
83
|
+
}
|
|
84
|
+
/** Whether a drift needs nothing. */
|
|
85
|
+
export function inSync(drift) {
|
|
86
|
+
return !drift.wrongTypes.length && !migratable(drift) && !drift.missingTable;
|
|
87
|
+
}
|
|
88
|
+
/** Whether adula:resource:migration has something to write for a drift. */
|
|
89
|
+
export function migratable(drift) {
|
|
90
|
+
return (!drift.missingTable &&
|
|
91
|
+
Boolean(drift.missingColumns.length ||
|
|
92
|
+
drift.notNullColumns.length ||
|
|
93
|
+
drift.missingUnique.length ||
|
|
94
|
+
drift.staleUnique.length ||
|
|
95
|
+
drift.missingJoinTables.length));
|
|
96
|
+
}
|
|
97
|
+
/** One line per difference, for adula:doctor and adula:resource:migration. */
|
|
98
|
+
export function describeDrift(drift) {
|
|
99
|
+
if (drift.missingTable)
|
|
100
|
+
return [`${drift.table}: table is missing`];
|
|
101
|
+
return [
|
|
102
|
+
...drift.missingColumns.map((column) => `${drift.table}.${column.name}: column is missing`),
|
|
103
|
+
...drift.wrongTypes.map((entry) => `${drift.table}.${entry.column}: type is ${entry.actual}, expected ${entry.expected}`),
|
|
104
|
+
...drift.notNullColumns.map((column) => `${drift.table}.${column}: column is NOT NULL, but the definition lets it be empty (optional or visibleWhen)`),
|
|
105
|
+
...drift.missingUnique.map((index) => `${drift.table}: unique index on (${index.columns.join(', ')}) is missing`),
|
|
106
|
+
...drift.staleUnique.map((entry) => `${drift.table}: unique index ${entry.index} on (${entry.expected.columns.join(', ')}) still counts cancelled documents`),
|
|
107
|
+
...drift.missingJoinTables.map((join) => `${join.table}: join table of ${drift.table}.${join.field} is missing`),
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The migration content for a drift: snapshots of the fields whose column or join table
|
|
112
|
+
* is missing, the missing unique indexes not created with those fields, and the relaxing
|
|
113
|
+
* changes (NOT NULL dropped, unique indexes recreated without cancelled documents). Wrong
|
|
114
|
+
* types are never changed and NOT NULL is never added automatically; they need a
|
|
115
|
+
* hand-written migration.
|
|
116
|
+
*/
|
|
117
|
+
export function resourceAddition(resource, drift) {
|
|
118
|
+
const fields = {};
|
|
119
|
+
for (const column of drift.missingColumns)
|
|
120
|
+
if (column.field)
|
|
121
|
+
fields[column.field] = fieldSnapshot(resource.fields[column.field]);
|
|
122
|
+
for (const join of drift.missingJoinTables)
|
|
123
|
+
fields[join.field] = fieldSnapshot(resource.fields[join.field]);
|
|
124
|
+
const unique = drift.missingUnique
|
|
125
|
+
.filter((index) => !(index.fields.length === 1 && index.fields[0] in fields))
|
|
126
|
+
.map((index) => index.columns);
|
|
127
|
+
const recreateUnique = drift.staleUnique.map((entry) => ({
|
|
128
|
+
index: entry.index,
|
|
129
|
+
columns: entry.expected.columns,
|
|
130
|
+
}));
|
|
131
|
+
return {
|
|
132
|
+
...(drift.notNullColumns.length ? { dropNotNull: [...drift.notNullColumns] } : {}),
|
|
133
|
+
...(Object.keys(fields).length ? { fields } : {}),
|
|
134
|
+
...(unique.length ? { unique } : {}),
|
|
135
|
+
...(recreateUnique.length ? { recreateUnique } : {}),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
/** The source of a migration that applies `addition` with alterResourceTable. */
|
|
139
|
+
export function additionMigrationSource(name, addition) {
|
|
140
|
+
return `import { BaseSchema } from '@adonisjs/lucid/schema'
|
|
141
|
+
import { alterResourceTable } from 'adula'
|
|
142
|
+
|
|
143
|
+
// Generated by \`node ace adula:resource:migration ${name}\`: what the database lacked and
|
|
144
|
+
// relaxing changes only (NOT NULL dropped, unique indexes no longer counting cancelled documents).
|
|
145
|
+
// Immutable once it has run; later definition changes get a new migration.
|
|
146
|
+
export default class extends BaseSchema {
|
|
147
|
+
async up() {
|
|
148
|
+
await alterResourceTable(this.db.getWriteClient(), '${name}', ${JSON.stringify(addition, null, 2)
|
|
149
|
+
.split('\n')
|
|
150
|
+
.join('\n ')})
|
|
151
|
+
}
|
|
152
|
+
async down() {
|
|
153
|
+
throw new Error('Use an expand/contract migration or restore a backup')
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
`;
|
|
157
|
+
}
|
|
@@ -13,7 +13,8 @@ export declare function recordMutation(trx: Knex.Transaction, mutation: {
|
|
|
13
13
|
actorId: number;
|
|
14
14
|
/** The administrator acting as actorId, when impersonating. */
|
|
15
15
|
impersonatorId?: number;
|
|
16
|
-
action
|
|
16
|
+
/** A resource action, or `restore` of a soft-deleted record (ADR 046). */
|
|
17
|
+
action: Action | 'restore';
|
|
17
18
|
fields: string[];
|
|
18
19
|
/** Before/after values of the changed fields; read back per viewer's field access. */
|
|
19
20
|
changes?: FieldChange[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A typed API client generated from the OpenAPI document of openApiDocument(): one
|
|
3
|
+
* self-contained TypeScript module (no imports, no DOM or Node types) holding the
|
|
4
|
+
* per-resource record and input types and a small fetch-based runtime. The document
|
|
5
|
+
* is usually actor-filtered, so the client describes exactly what one token may use.
|
|
6
|
+
*/
|
|
7
|
+
type Schema = Record<string, unknown>;
|
|
8
|
+
/** The parts of an OpenAPI 3.1 document the generator reads (openApiDocument's output). */
|
|
9
|
+
export type ApiClientDocument = {
|
|
10
|
+
info?: {
|
|
11
|
+
title?: string;
|
|
12
|
+
version?: string;
|
|
13
|
+
};
|
|
14
|
+
servers?: {
|
|
15
|
+
url: string;
|
|
16
|
+
}[];
|
|
17
|
+
paths: Record<string, Record<string, unknown>>;
|
|
18
|
+
components?: {
|
|
19
|
+
schemas?: Record<string, Schema>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type ApiClientOptions = {
|
|
23
|
+
/** Default server for createAdulaClient when no baseUrl is passed; the document's server otherwise. */
|
|
24
|
+
baseUrl?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* One self-contained TypeScript module for the API the document describes: record and
|
|
28
|
+
* input interfaces per resource, the Resources map and createAdulaClient().
|
|
29
|
+
*/
|
|
30
|
+
export declare function apiClientSource(document: ApiClientDocument, options?: ApiClientOptions): string;
|
|
31
|
+
/** The same client as a declaration file: the types plus the runtime signatures. */
|
|
32
|
+
export declare function apiClientDeclarations(document: ApiClientDocument): string;
|
|
33
|
+
/** The clients/<name> directory of a system: its package name without scope, in kebab-case. */
|
|
34
|
+
export declare function apiClientName(packageName: unknown): string;
|
|
35
|
+
/** README.md written next to a generated client by adula:client. */
|
|
36
|
+
export declare function apiClientReadme(name: string, document: ApiClientDocument): string;
|
|
37
|
+
export {};
|