@mainsoft/agent-cms 0.6.1 → 0.10.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/CHANGELOG.md +65 -0
- package/README.md +303 -32
- package/TODO.md +72 -26
- package/UPGRADE-0.10.md +36 -0
- package/UPGRADE-0.8.md +117 -0
- package/dist/agent.cjs +39 -17
- package/dist/agent.d.cts +2 -2
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +9 -7
- package/dist/bin.js +4528 -355
- package/dist/{chunk-OQ55GEF3.js → chunk-3OPKTBEI.js} +1 -1
- package/dist/chunk-6PB4ZCHH.js +328 -0
- package/dist/chunk-7SCYDG2G.js +2943 -0
- package/dist/chunk-7WJIIJCI.js +544 -0
- package/dist/chunk-7Y6TU2UA.js +150 -0
- package/dist/{chunk-BTO42652.js → chunk-AKCXMT3X.js} +19 -24
- package/dist/{chunk-QC2M4NZY.js → chunk-BFVBHIHV.js} +72 -1
- package/dist/chunk-DSJETZT4.js +493 -0
- package/dist/{chunk-IW3D4I7Q.js → chunk-IU2SMWAM.js} +246 -4
- package/dist/{chunk-VICZ76TR.js → chunk-KAO3Z3CF.js} +43 -2
- package/dist/{chunk-CRDW6Q72.js → chunk-MA6VKJ3F.js} +87 -25
- package/dist/{chunk-6K5ZTGHQ.js → chunk-PEQY4N73.js} +16 -0
- package/dist/{chunk-DOADAH4L.js → chunk-PGV2QPIL.js} +40 -0
- package/dist/{chunk-QIUXAUQ6.js → chunk-TOZQYJFG.js} +1 -1
- package/dist/cli.cjs +4528 -355
- package/dist/cli.d.cts +19 -3
- package/dist/cli.d.ts +19 -3
- package/dist/cli.js +206 -16
- package/dist/client.cjs +72 -1
- package/dist/client.d.cts +308 -6
- package/dist/client.d.ts +308 -6
- package/dist/client.js +1 -1
- package/dist/cms-C_vkAxYV.d.cts +1537 -0
- package/dist/cms-pqJyowu1.d.ts +1537 -0
- package/dist/config.d.cts +7 -1
- package/dist/config.d.ts +7 -1
- package/dist/drizzle-repo-CviH3EX7.d.cts +146 -0
- package/dist/drizzle-repo-DWLD0rWe.d.ts +146 -0
- package/dist/errors.cjs +82 -1
- package/dist/errors.d.cts +43 -3
- package/dist/errors.d.ts +43 -3
- package/dist/errors.js +2 -2
- package/dist/frontmatter.d.cts +5 -4
- package/dist/frontmatter.d.ts +5 -4
- package/dist/http.cjs +644 -97
- package/dist/http.d.cts +59 -2
- package/dist/http.d.ts +59 -2
- package/dist/http.js +204 -14
- package/dist/index.cjs +3759 -575
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +226 -30
- package/dist/markdown.cjs +89 -25
- package/dist/markdown.d.cts +57 -3
- package/dist/markdown.d.ts +57 -3
- package/dist/markdown.js +5 -1
- package/dist/mcp.cjs +319 -39
- package/dist/mcp.d.cts +15 -4
- package/dist/mcp.d.ts +15 -4
- package/dist/mcp.js +14 -9
- package/dist/messages/en.cjs +40 -0
- package/dist/messages/en.js +1 -1
- package/dist/messages/ko.cjs +40 -0
- package/dist/messages/ko.js +40 -0
- package/dist/registry/cms-audit.json +1 -1
- package/dist/registry/cms-doc-editor.json +15 -4
- package/dist/registry/cms-doc-list.json +2 -1
- package/dist/registry/cms-files.json +29 -0
- package/dist/registry/cms-lib.json +3 -3
- package/dist/registry/cms-media-picker.json +29 -0
- package/dist/registry/cms-media.json +28 -0
- package/dist/registry/cms-preview-comments.json +24 -0
- package/dist/registry/cms-releases.json +28 -0
- package/dist/registry/cms-shell.json +2 -2
- package/dist/registry/cms-trash.json +24 -0
- package/dist/registry/cms-versions.json +2 -1
- package/dist/registry/registry.json +163 -3
- package/dist/storage-s3.cjs +168 -0
- package/dist/storage-s3.d.cts +53 -0
- package/dist/storage-s3.d.ts +53 -0
- package/dist/storage-s3.js +143 -0
- package/dist/storage.cjs +373 -0
- package/dist/storage.d.cts +183 -0
- package/dist/storage.d.ts +183 -0
- package/dist/storage.js +49 -0
- package/dist/tables.cjs +251 -3
- package/dist/tables.d.cts +4965 -681
- package/dist/tables.d.ts +4965 -681
- package/dist/tables.js +14 -2
- package/dist/tools.cjs +331 -20
- package/dist/tools.d.cts +54 -7
- package/dist/tools.d.ts +54 -7
- package/dist/tools.js +16 -7
- package/dist/types.cjs +99 -1
- package/dist/types.d.cts +205 -5
- package/dist/types.d.ts +205 -5
- package/dist/types.js +5 -3
- package/package.json +32 -22
- package/dist/ai.cjs +0 -555
- package/dist/ai.d.cts +0 -48
- package/dist/ai.d.ts +0 -48
- package/dist/ai.js +0 -73
- package/dist/chunk-52NUUZC7.js +0 -1446
- package/dist/chunk-IGL2V6US.js +0 -324
- package/dist/chunk-QQV6VLYJ.js +0 -204
- package/dist/cms-BPp01z-8.d.ts +0 -411
- package/dist/cms-D6D89-qZ.d.cts +0 -411
- package/dist/drizzle-repo-B1rt7r4j.d.ts +0 -90
- package/dist/drizzle-repo-Cn-kL2FK.d.cts +0 -90
- package/dist/repo-BWI2Pkrv.d.ts +0 -162
- package/dist/repo-CeDxUxO6.d.cts +0 -162
package/dist/repo-BWI2Pkrv.d.ts
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { CmsDoc, DocStatus, CmsVersion, ReviewMark, KeyScope, CmsKey, AuditEntry } from './types.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Storage behind the CMS. `cms.ts` holds every rule (states, access, versions,
|
|
5
|
-
* validation) and talks only to this interface, so the rules are tested
|
|
6
|
-
* against `MemoryRepo` and run in production on `DrizzleRepo`.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
type DocPatch = Partial<Omit<CmsDoc, "id" | "collection" | "createdAt">>;
|
|
10
|
-
type NewDoc = Omit<CmsDoc, "id" | "createdAt" | "updatedAt" | "republishedAt" | "autosave"> & {
|
|
11
|
-
id?: string;
|
|
12
|
-
createdAt?: string;
|
|
13
|
-
updatedAt?: string;
|
|
14
|
-
republishedAt?: string | null;
|
|
15
|
-
autosave?: CmsDoc["autosave"];
|
|
16
|
-
};
|
|
17
|
-
type StoredVersion = Omit<CmsVersion, "published">;
|
|
18
|
-
type NewVersion = Omit<CmsVersion, "id" | "createdAt" | "published" | "reviewed" | "changed"> & {
|
|
19
|
-
createdAt?: string;
|
|
20
|
-
changed?: CmsVersion["changed"];
|
|
21
|
-
};
|
|
22
|
-
interface KeyRow extends CmsKey {
|
|
23
|
-
hash: string;
|
|
24
|
-
createdBy: string | null;
|
|
25
|
-
}
|
|
26
|
-
interface AuditQuery {
|
|
27
|
-
/** Entries strictly older than this cursor (from the previous page). */
|
|
28
|
-
before?: string | null;
|
|
29
|
-
limit: number;
|
|
30
|
-
action?: string;
|
|
31
|
-
outcome?: AuditEntry["outcome"];
|
|
32
|
-
actorKind?: AuditEntry["actorKind"];
|
|
33
|
-
}
|
|
34
|
-
interface CmsRepo {
|
|
35
|
-
/** Run `fn` atomically (one DB transaction). */
|
|
36
|
-
tx<T>(fn: (repo: CmsRepo) => Promise<T>): Promise<T>;
|
|
37
|
-
findDoc(collection: string, slug: string): Promise<CmsDoc | null>;
|
|
38
|
-
findDocById(id: string): Promise<CmsDoc | null>;
|
|
39
|
-
listDocs(filter: {
|
|
40
|
-
collection?: string;
|
|
41
|
-
statuses?: DocStatus[];
|
|
42
|
-
published?: boolean;
|
|
43
|
-
}): Promise<CmsDoc[]>;
|
|
44
|
-
insertDoc(doc: NewDoc): Promise<CmsDoc>;
|
|
45
|
-
/** Returns null when `expectedVersion` is given and the row moved on. */
|
|
46
|
-
updateDoc(id: string, patch: DocPatch, expectedVersion?: number): Promise<CmsDoc | null>;
|
|
47
|
-
deleteDoc(id: string): Promise<void>;
|
|
48
|
-
insertVersion(v: NewVersion): Promise<void>;
|
|
49
|
-
listVersions(documentId: string): Promise<StoredVersion[]>;
|
|
50
|
-
getVersion(documentId: string, version: number): Promise<StoredVersion | null>;
|
|
51
|
-
setVersionReviewed(documentId: string, version: number, reviewed: ReviewMark[]): Promise<void>;
|
|
52
|
-
/** Delete all but the newest `keep` versions, never one in `protect`. */
|
|
53
|
-
pruneVersions(documentId: string, keep: number, protect: number[]): Promise<void>;
|
|
54
|
-
insertKey(k: {
|
|
55
|
-
name: string;
|
|
56
|
-
prefix: string;
|
|
57
|
-
hash: string;
|
|
58
|
-
scopes: KeyScope[];
|
|
59
|
-
collections: string[] | null;
|
|
60
|
-
createdBy: string | null;
|
|
61
|
-
expiresAt: string | null;
|
|
62
|
-
}): Promise<KeyRow>;
|
|
63
|
-
listKeys(): Promise<KeyRow[]>;
|
|
64
|
-
findKeyByHash(hash: string): Promise<KeyRow | null>;
|
|
65
|
-
touchKey(id: string, at: string): Promise<void>;
|
|
66
|
-
revokeKey(id: string, at: string): Promise<boolean>;
|
|
67
|
-
addHits(documentIds: string[], day: string, source: string): Promise<void>;
|
|
68
|
-
/** Hits per document since `sinceDay` (inclusive); only documents of `collection` when given. */
|
|
69
|
-
hitCounts(sinceDay: string, collection?: string): Promise<Map<string, number>>;
|
|
70
|
-
insertAudit(e: Omit<AuditEntry, "id">): Promise<void>;
|
|
71
|
-
/** Newest first. */
|
|
72
|
-
listAudit(q: AuditQuery): Promise<AuditEntry[]>;
|
|
73
|
-
/** Changes whenever any document changes (for cross-process index refresh). */
|
|
74
|
-
changeStamp(): Promise<string>;
|
|
75
|
-
getMeta(key: string): Promise<unknown>;
|
|
76
|
-
setMeta(key: string, value: unknown): Promise<void>;
|
|
77
|
-
}
|
|
78
|
-
/** In-memory repo for tests and examples. Starts at the current schema version. */
|
|
79
|
-
declare class MemoryRepo implements CmsRepo {
|
|
80
|
-
docs: Map<string, CmsDoc>;
|
|
81
|
-
versions: StoredVersion[];
|
|
82
|
-
keys: KeyRow[];
|
|
83
|
-
hits: Map<string, number>;
|
|
84
|
-
audit: AuditEntry[];
|
|
85
|
-
meta: Map<string, unknown>;
|
|
86
|
-
private seq;
|
|
87
|
-
private id;
|
|
88
|
-
tx<T>(fn: (repo: CmsRepo) => Promise<T>): Promise<T>;
|
|
89
|
-
findDoc(collection: string, slug: string): Promise<CmsDoc | null>;
|
|
90
|
-
findDocById(id: string): Promise<CmsDoc | null>;
|
|
91
|
-
listDocs(f: {
|
|
92
|
-
collection?: string;
|
|
93
|
-
statuses?: DocStatus[];
|
|
94
|
-
published?: boolean;
|
|
95
|
-
}): Promise<CmsDoc[]>;
|
|
96
|
-
insertDoc(doc: NewDoc): Promise<CmsDoc>;
|
|
97
|
-
updateDoc(id: string, patch: DocPatch, expectedVersion?: number): Promise<CmsDoc | null>;
|
|
98
|
-
deleteDoc(id: string): Promise<void>;
|
|
99
|
-
insertVersion(v: NewVersion): Promise<void>;
|
|
100
|
-
listVersions(documentId: string): Promise<StoredVersion[]>;
|
|
101
|
-
getVersion(documentId: string, version: number): Promise<StoredVersion | null>;
|
|
102
|
-
setVersionReviewed(documentId: string, version: number, reviewed: ReviewMark[]): Promise<void>;
|
|
103
|
-
pruneVersions(documentId: string, keep: number, protect: number[]): Promise<void>;
|
|
104
|
-
insertKey(k: {
|
|
105
|
-
name: string;
|
|
106
|
-
prefix: string;
|
|
107
|
-
hash: string;
|
|
108
|
-
scopes: KeyScope[];
|
|
109
|
-
collections: string[] | null;
|
|
110
|
-
createdBy: string | null;
|
|
111
|
-
expiresAt: string | null;
|
|
112
|
-
}): Promise<{
|
|
113
|
-
hash: string;
|
|
114
|
-
createdBy: string | null;
|
|
115
|
-
id: string;
|
|
116
|
-
name: string;
|
|
117
|
-
prefix: string;
|
|
118
|
-
scopes: KeyScope[];
|
|
119
|
-
collections: string[] | null;
|
|
120
|
-
lastUsedAt: string | null;
|
|
121
|
-
revokedAt: string | null;
|
|
122
|
-
expiresAt: string | null;
|
|
123
|
-
createdAt: string;
|
|
124
|
-
}>;
|
|
125
|
-
listKeys(): Promise<{
|
|
126
|
-
hash: string;
|
|
127
|
-
createdBy: string | null;
|
|
128
|
-
id: string;
|
|
129
|
-
name: string;
|
|
130
|
-
prefix: string;
|
|
131
|
-
scopes: KeyScope[];
|
|
132
|
-
collections: string[] | null;
|
|
133
|
-
lastUsedAt: string | null;
|
|
134
|
-
revokedAt: string | null;
|
|
135
|
-
expiresAt: string | null;
|
|
136
|
-
createdAt: string;
|
|
137
|
-
}[]>;
|
|
138
|
-
findKeyByHash(hash: string): Promise<{
|
|
139
|
-
hash: string;
|
|
140
|
-
createdBy: string | null;
|
|
141
|
-
id: string;
|
|
142
|
-
name: string;
|
|
143
|
-
prefix: string;
|
|
144
|
-
scopes: KeyScope[];
|
|
145
|
-
collections: string[] | null;
|
|
146
|
-
lastUsedAt: string | null;
|
|
147
|
-
revokedAt: string | null;
|
|
148
|
-
expiresAt: string | null;
|
|
149
|
-
createdAt: string;
|
|
150
|
-
} | null>;
|
|
151
|
-
touchKey(id: string, at: string): Promise<void>;
|
|
152
|
-
revokeKey(id: string, at: string): Promise<boolean>;
|
|
153
|
-
addHits(ids: string[], day: string, source: string): Promise<void>;
|
|
154
|
-
hitCounts(sinceDay: string, collection?: string): Promise<Map<string, number>>;
|
|
155
|
-
insertAudit(e: Omit<AuditEntry, "id">): Promise<void>;
|
|
156
|
-
listAudit(q: AuditQuery): Promise<AuditEntry[]>;
|
|
157
|
-
changeStamp(): Promise<string>;
|
|
158
|
-
getMeta(key: string): Promise<{} | null>;
|
|
159
|
-
setMeta(key: string, value: unknown): Promise<void>;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export { type AuditQuery as A, type CmsRepo as C, type DocPatch as D, type KeyRow as K, MemoryRepo as M, type NewDoc as N, type StoredVersion as S, type NewVersion as a };
|
package/dist/repo-CeDxUxO6.d.cts
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { CmsDoc, DocStatus, CmsVersion, ReviewMark, KeyScope, CmsKey, AuditEntry } from './types.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Storage behind the CMS. `cms.ts` holds every rule (states, access, versions,
|
|
5
|
-
* validation) and talks only to this interface, so the rules are tested
|
|
6
|
-
* against `MemoryRepo` and run in production on `DrizzleRepo`.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
type DocPatch = Partial<Omit<CmsDoc, "id" | "collection" | "createdAt">>;
|
|
10
|
-
type NewDoc = Omit<CmsDoc, "id" | "createdAt" | "updatedAt" | "republishedAt" | "autosave"> & {
|
|
11
|
-
id?: string;
|
|
12
|
-
createdAt?: string;
|
|
13
|
-
updatedAt?: string;
|
|
14
|
-
republishedAt?: string | null;
|
|
15
|
-
autosave?: CmsDoc["autosave"];
|
|
16
|
-
};
|
|
17
|
-
type StoredVersion = Omit<CmsVersion, "published">;
|
|
18
|
-
type NewVersion = Omit<CmsVersion, "id" | "createdAt" | "published" | "reviewed" | "changed"> & {
|
|
19
|
-
createdAt?: string;
|
|
20
|
-
changed?: CmsVersion["changed"];
|
|
21
|
-
};
|
|
22
|
-
interface KeyRow extends CmsKey {
|
|
23
|
-
hash: string;
|
|
24
|
-
createdBy: string | null;
|
|
25
|
-
}
|
|
26
|
-
interface AuditQuery {
|
|
27
|
-
/** Entries strictly older than this cursor (from the previous page). */
|
|
28
|
-
before?: string | null;
|
|
29
|
-
limit: number;
|
|
30
|
-
action?: string;
|
|
31
|
-
outcome?: AuditEntry["outcome"];
|
|
32
|
-
actorKind?: AuditEntry["actorKind"];
|
|
33
|
-
}
|
|
34
|
-
interface CmsRepo {
|
|
35
|
-
/** Run `fn` atomically (one DB transaction). */
|
|
36
|
-
tx<T>(fn: (repo: CmsRepo) => Promise<T>): Promise<T>;
|
|
37
|
-
findDoc(collection: string, slug: string): Promise<CmsDoc | null>;
|
|
38
|
-
findDocById(id: string): Promise<CmsDoc | null>;
|
|
39
|
-
listDocs(filter: {
|
|
40
|
-
collection?: string;
|
|
41
|
-
statuses?: DocStatus[];
|
|
42
|
-
published?: boolean;
|
|
43
|
-
}): Promise<CmsDoc[]>;
|
|
44
|
-
insertDoc(doc: NewDoc): Promise<CmsDoc>;
|
|
45
|
-
/** Returns null when `expectedVersion` is given and the row moved on. */
|
|
46
|
-
updateDoc(id: string, patch: DocPatch, expectedVersion?: number): Promise<CmsDoc | null>;
|
|
47
|
-
deleteDoc(id: string): Promise<void>;
|
|
48
|
-
insertVersion(v: NewVersion): Promise<void>;
|
|
49
|
-
listVersions(documentId: string): Promise<StoredVersion[]>;
|
|
50
|
-
getVersion(documentId: string, version: number): Promise<StoredVersion | null>;
|
|
51
|
-
setVersionReviewed(documentId: string, version: number, reviewed: ReviewMark[]): Promise<void>;
|
|
52
|
-
/** Delete all but the newest `keep` versions, never one in `protect`. */
|
|
53
|
-
pruneVersions(documentId: string, keep: number, protect: number[]): Promise<void>;
|
|
54
|
-
insertKey(k: {
|
|
55
|
-
name: string;
|
|
56
|
-
prefix: string;
|
|
57
|
-
hash: string;
|
|
58
|
-
scopes: KeyScope[];
|
|
59
|
-
collections: string[] | null;
|
|
60
|
-
createdBy: string | null;
|
|
61
|
-
expiresAt: string | null;
|
|
62
|
-
}): Promise<KeyRow>;
|
|
63
|
-
listKeys(): Promise<KeyRow[]>;
|
|
64
|
-
findKeyByHash(hash: string): Promise<KeyRow | null>;
|
|
65
|
-
touchKey(id: string, at: string): Promise<void>;
|
|
66
|
-
revokeKey(id: string, at: string): Promise<boolean>;
|
|
67
|
-
addHits(documentIds: string[], day: string, source: string): Promise<void>;
|
|
68
|
-
/** Hits per document since `sinceDay` (inclusive); only documents of `collection` when given. */
|
|
69
|
-
hitCounts(sinceDay: string, collection?: string): Promise<Map<string, number>>;
|
|
70
|
-
insertAudit(e: Omit<AuditEntry, "id">): Promise<void>;
|
|
71
|
-
/** Newest first. */
|
|
72
|
-
listAudit(q: AuditQuery): Promise<AuditEntry[]>;
|
|
73
|
-
/** Changes whenever any document changes (for cross-process index refresh). */
|
|
74
|
-
changeStamp(): Promise<string>;
|
|
75
|
-
getMeta(key: string): Promise<unknown>;
|
|
76
|
-
setMeta(key: string, value: unknown): Promise<void>;
|
|
77
|
-
}
|
|
78
|
-
/** In-memory repo for tests and examples. Starts at the current schema version. */
|
|
79
|
-
declare class MemoryRepo implements CmsRepo {
|
|
80
|
-
docs: Map<string, CmsDoc>;
|
|
81
|
-
versions: StoredVersion[];
|
|
82
|
-
keys: KeyRow[];
|
|
83
|
-
hits: Map<string, number>;
|
|
84
|
-
audit: AuditEntry[];
|
|
85
|
-
meta: Map<string, unknown>;
|
|
86
|
-
private seq;
|
|
87
|
-
private id;
|
|
88
|
-
tx<T>(fn: (repo: CmsRepo) => Promise<T>): Promise<T>;
|
|
89
|
-
findDoc(collection: string, slug: string): Promise<CmsDoc | null>;
|
|
90
|
-
findDocById(id: string): Promise<CmsDoc | null>;
|
|
91
|
-
listDocs(f: {
|
|
92
|
-
collection?: string;
|
|
93
|
-
statuses?: DocStatus[];
|
|
94
|
-
published?: boolean;
|
|
95
|
-
}): Promise<CmsDoc[]>;
|
|
96
|
-
insertDoc(doc: NewDoc): Promise<CmsDoc>;
|
|
97
|
-
updateDoc(id: string, patch: DocPatch, expectedVersion?: number): Promise<CmsDoc | null>;
|
|
98
|
-
deleteDoc(id: string): Promise<void>;
|
|
99
|
-
insertVersion(v: NewVersion): Promise<void>;
|
|
100
|
-
listVersions(documentId: string): Promise<StoredVersion[]>;
|
|
101
|
-
getVersion(documentId: string, version: number): Promise<StoredVersion | null>;
|
|
102
|
-
setVersionReviewed(documentId: string, version: number, reviewed: ReviewMark[]): Promise<void>;
|
|
103
|
-
pruneVersions(documentId: string, keep: number, protect: number[]): Promise<void>;
|
|
104
|
-
insertKey(k: {
|
|
105
|
-
name: string;
|
|
106
|
-
prefix: string;
|
|
107
|
-
hash: string;
|
|
108
|
-
scopes: KeyScope[];
|
|
109
|
-
collections: string[] | null;
|
|
110
|
-
createdBy: string | null;
|
|
111
|
-
expiresAt: string | null;
|
|
112
|
-
}): Promise<{
|
|
113
|
-
hash: string;
|
|
114
|
-
createdBy: string | null;
|
|
115
|
-
id: string;
|
|
116
|
-
name: string;
|
|
117
|
-
prefix: string;
|
|
118
|
-
scopes: KeyScope[];
|
|
119
|
-
collections: string[] | null;
|
|
120
|
-
lastUsedAt: string | null;
|
|
121
|
-
revokedAt: string | null;
|
|
122
|
-
expiresAt: string | null;
|
|
123
|
-
createdAt: string;
|
|
124
|
-
}>;
|
|
125
|
-
listKeys(): Promise<{
|
|
126
|
-
hash: string;
|
|
127
|
-
createdBy: string | null;
|
|
128
|
-
id: string;
|
|
129
|
-
name: string;
|
|
130
|
-
prefix: string;
|
|
131
|
-
scopes: KeyScope[];
|
|
132
|
-
collections: string[] | null;
|
|
133
|
-
lastUsedAt: string | null;
|
|
134
|
-
revokedAt: string | null;
|
|
135
|
-
expiresAt: string | null;
|
|
136
|
-
createdAt: string;
|
|
137
|
-
}[]>;
|
|
138
|
-
findKeyByHash(hash: string): Promise<{
|
|
139
|
-
hash: string;
|
|
140
|
-
createdBy: string | null;
|
|
141
|
-
id: string;
|
|
142
|
-
name: string;
|
|
143
|
-
prefix: string;
|
|
144
|
-
scopes: KeyScope[];
|
|
145
|
-
collections: string[] | null;
|
|
146
|
-
lastUsedAt: string | null;
|
|
147
|
-
revokedAt: string | null;
|
|
148
|
-
expiresAt: string | null;
|
|
149
|
-
createdAt: string;
|
|
150
|
-
} | null>;
|
|
151
|
-
touchKey(id: string, at: string): Promise<void>;
|
|
152
|
-
revokeKey(id: string, at: string): Promise<boolean>;
|
|
153
|
-
addHits(ids: string[], day: string, source: string): Promise<void>;
|
|
154
|
-
hitCounts(sinceDay: string, collection?: string): Promise<Map<string, number>>;
|
|
155
|
-
insertAudit(e: Omit<AuditEntry, "id">): Promise<void>;
|
|
156
|
-
listAudit(q: AuditQuery): Promise<AuditEntry[]>;
|
|
157
|
-
changeStamp(): Promise<string>;
|
|
158
|
-
getMeta(key: string): Promise<{} | null>;
|
|
159
|
-
setMeta(key: string, value: unknown): Promise<void>;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export { type AuditQuery as A, type CmsRepo as C, type DocPatch as D, type KeyRow as K, MemoryRepo as M, type NewDoc as N, type StoredVersion as S, type NewVersion as a };
|