@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 CHANGED
@@ -110,6 +110,7 @@ export declare class NpoDb extends Db {
110
110
  SK: string;
111
111
  };
112
112
  prog_milestone_record(prog: string, data: IMilestoneNew): {
113
+ id: `${string}-${string}-${string}-${string}-${string}`;
113
114
  date: string;
114
115
  title: string;
115
116
  description: string;
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(() => mid);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-giving/endowment",
3
- "version": "4.0.12",
3
+ "version": "4.0.13",
4
4
  "dependencies": {
5
5
  "ksuid": "3.0.0"
6
6
  },
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(() => mid);
385
+ return this.client.send(cmd).then(() => item.id);
386
386
  }
387
387
 
388
388
  async prog_milestone_update(