@medicine-wheel/storage-provider 0.15.5 → 0.15.7
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/interface.d.ts +2 -0
- package/dist/jsonl.d.ts +1 -0
- package/dist/jsonl.js +5 -0
- package/dist/neon.d.ts +1 -0
- package/dist/neon.js +3 -0
- package/package.json +2 -2
package/dist/interface.d.ts
CHANGED
|
@@ -320,6 +320,8 @@ export interface StorageProvider {
|
|
|
320
320
|
getAllCeremonies(limit?: number): Promise<CeremonyLog[]>;
|
|
321
321
|
/** Cardinality of the whole ceremony collection — see `countNodes()`. */
|
|
322
322
|
countCeremonies(): Promise<number>;
|
|
323
|
+
/** Removes one ceremony record. The route refuses while a closing, a beat or a diary entry names it. */
|
|
324
|
+
deleteCeremony(id: string): Promise<void>;
|
|
323
325
|
registerInquiryWeave(record: WeaveRecord): Promise<void>;
|
|
324
326
|
getInquiryWeave(id: string): Promise<WeaveRecord | null>;
|
|
325
327
|
listInquiryWeaves(filters?: InquiryWeaveFilters): Promise<WeaveRecord[]>;
|
package/dist/jsonl.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export declare class JsonlProvider implements StorageProvider {
|
|
|
36
36
|
getCeremoniesByType(type: CeremonyType): Promise<CeremonyLog[]>;
|
|
37
37
|
getAllCeremonies(limit?: number): Promise<CeremonyLog[]>;
|
|
38
38
|
countCeremonies(): Promise<number>;
|
|
39
|
+
deleteCeremony(id: string): Promise<void>;
|
|
39
40
|
registerInquiryWeave(record: WeaveRecord): Promise<void>;
|
|
40
41
|
getInquiryWeave(id: string): Promise<WeaveRecord | null>;
|
|
41
42
|
listInquiryWeaves(filters?: InquiryWeaveFilters): Promise<WeaveRecord[]>;
|
package/dist/jsonl.js
CHANGED
|
@@ -208,6 +208,11 @@ export class JsonlProvider {
|
|
|
208
208
|
async countCeremonies() {
|
|
209
209
|
return countJsonl(this.ceremoniesFile);
|
|
210
210
|
}
|
|
211
|
+
async deleteCeremony(id) {
|
|
212
|
+
await withWriteLock(this.ceremoniesFile, () => {
|
|
213
|
+
writeJsonl(this.ceremoniesFile, this.readCeremonies().filter((record) => record.id !== id));
|
|
214
|
+
});
|
|
215
|
+
}
|
|
211
216
|
async registerInquiryWeave(record) {
|
|
212
217
|
await this.upsertById(this.inquiryWeavesFile, record);
|
|
213
218
|
}
|
package/dist/neon.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export declare class NeonProvider implements StorageProvider {
|
|
|
46
46
|
registerDiaryEntry(record: DiaryEntryRecord): Promise<DiaryEntryRecord>;
|
|
47
47
|
getDiaryEntry(id: string): Promise<DiaryEntryRecord | null>;
|
|
48
48
|
listDiaryEntries(filters?: DiaryEntryFilters): Promise<DiaryEntryRecord[]>;
|
|
49
|
+
deleteCeremony(id: string): Promise<void>;
|
|
49
50
|
deleteDiaryEntry(id: string): Promise<void>;
|
|
50
51
|
private ensureDiaryEntriesTable;
|
|
51
52
|
registerCeremonyEvent(record: CeremonyEventRecord): Promise<CeremonyEventRecord>;
|
package/dist/neon.js
CHANGED
|
@@ -440,6 +440,9 @@ export class NeonProvider {
|
|
|
440
440
|
.filter((record) => record !== null);
|
|
441
441
|
return filterAndOrderDiaryEntries(records, filters);
|
|
442
442
|
}
|
|
443
|
+
async deleteCeremony(id) {
|
|
444
|
+
await this.db `DELETE FROM ceremonies WHERE id = ${id}`;
|
|
445
|
+
}
|
|
443
446
|
async deleteDiaryEntry(id) {
|
|
444
447
|
await this.db `DELETE FROM diary_entries WHERE id = ${id}`;
|
|
445
448
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medicine-wheel/storage-provider",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@neondatabase/serverless": "^0.10.0",
|
|
18
18
|
"@upstash/redis": "^1.34.3",
|
|
19
|
-
"@medicine-wheel/ontology-core": "^0.15.
|
|
19
|
+
"@medicine-wheel/ontology-core": "^0.15.7"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"typescript": "^5.7.0"
|