@better-giving/endowment 4.0.12 → 4.0.13
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/db.d.mts +1 -0
- package/dist/db.mjs +2 -2
- package/package.json +1 -1
- package/src/db.mts +3 -3
package/dist/db.d.mts
CHANGED
package/dist/db.mjs
CHANGED
|
@@ -152,6 +152,7 @@ export class NpoDb extends Db {
|
|
|
152
152
|
return {
|
|
153
153
|
...this.key_prog_milestone(mid, prog),
|
|
154
154
|
...data,
|
|
155
|
+
id: mid,
|
|
155
156
|
};
|
|
156
157
|
}
|
|
157
158
|
npo_med_record(npo_id, { featured /** not saved as attribute */, ...d }) {
|
|
@@ -291,13 +292,12 @@ export class NpoDb extends Db {
|
|
|
291
292
|
return this.client.send(cmd);
|
|
292
293
|
}
|
|
293
294
|
async prog_milestone_put(pid, content) {
|
|
294
|
-
const mid = crypto.randomUUID();
|
|
295
295
|
const item = this.prog_milestone_record(pid, content);
|
|
296
296
|
const cmd = new PutCommand({
|
|
297
297
|
TableName: NpoDb.name,
|
|
298
298
|
Item: item,
|
|
299
299
|
});
|
|
300
|
-
return this.client.send(cmd).then(() =>
|
|
300
|
+
return this.client.send(cmd).then(() => item.id);
|
|
301
301
|
}
|
|
302
302
|
async prog_milestone_update(pid, mid, update) {
|
|
303
303
|
const upd8 = new UpdateBuilder();
|
package/package.json
CHANGED
package/src/db.mts
CHANGED
|
@@ -206,7 +206,8 @@ export class NpoDb extends Db {
|
|
|
206
206
|
return {
|
|
207
207
|
...this.key_prog_milestone(mid, prog),
|
|
208
208
|
...data,
|
|
209
|
-
|
|
209
|
+
id: mid,
|
|
210
|
+
} satisfies IMilestone;
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
npo_med_record(
|
|
@@ -376,13 +377,12 @@ export class NpoDb extends Db {
|
|
|
376
377
|
pid: string,
|
|
377
378
|
content: IMilestoneNew
|
|
378
379
|
): Promise<string> {
|
|
379
|
-
const mid = crypto.randomUUID();
|
|
380
380
|
const item = this.prog_milestone_record(pid, content);
|
|
381
381
|
const cmd = new PutCommand({
|
|
382
382
|
TableName: NpoDb.name,
|
|
383
383
|
Item: item,
|
|
384
384
|
});
|
|
385
|
-
return this.client.send(cmd).then(() =>
|
|
385
|
+
return this.client.send(cmd).then(() => item.id);
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
async prog_milestone_update(
|