@dnax/core 0.70.8 → 0.71.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/app/hono.ts CHANGED
@@ -385,15 +385,26 @@ function HonoInstance(): typeof app {
385
385
  responseAuth
386
386
  ) {
387
387
  rest.activity.save({
388
- collection: collection,
389
- data: {
390
- data: body,
388
+ operation: {
389
+ status: "done",
390
+ type: "authCollection",
391
+ target: collection,
392
+ user: sessionStorage().get().state?.user,
393
+ role: sessionStorage().get().role,
394
+ state: sessionStorage().get().state,
395
+ transaction: false,
396
+ internal: false,
397
+ uuid: sessionStorage().get()?.uuid || "",
398
+ payload: {
399
+ input: body,
400
+ data: body,
401
+ },
402
+ auth: true,
403
+ performedBy: {
404
+ user: sessionStorage().get().state?.user,
405
+ role: sessionStorage().get()?.role || "",
406
+ },
391
407
  },
392
- action: "authCollection",
393
- auth: true,
394
- transaction: false,
395
- role: sessionStorage().get().role || null,
396
- user: sessionStorage().get().state?.user,
397
408
  state: sessionStorage().get().state,
398
409
  uuid: sessionStorage().get().uuid,
399
410
  ip:
@@ -410,16 +421,29 @@ function HonoInstance(): typeof app {
410
421
  });
411
422
  } else {
412
423
  rest.activity.save({
413
- collection: collection,
414
- data: {
415
- data: body,
424
+ operation: {
425
+ status: "failed",
426
+ type: "authCollection",
427
+ target: collection,
428
+ user: sessionStorage().get().state?.user,
429
+ role: sessionStorage().get().role,
430
+ state: sessionStorage().get().state,
431
+ transaction: false,
432
+ internal: false,
433
+ uuid: sessionStorage().get()?.uuid || "",
434
+ payload: {
435
+ input: body,
436
+ data: body,
437
+ },
438
+ auth: true,
439
+ performedBy: {
440
+ user: sessionStorage().get().state?.user,
441
+ role: sessionStorage().get()?.role || "",
442
+ },
416
443
  },
417
- transaction: false,
418
- action: "authCollection",
419
- auth: false,
420
- user: sessionStorage().get().state?.user,
444
+
421
445
  state: sessionStorage().get().state,
422
- role: sessionStorage().get().role || null,
446
+
423
447
  uuid: sessionStorage().get().uuid,
424
448
  ip:
425
449
  c.req.raw.headers?.get("CF-Connecting-IP") ||
@@ -83,6 +83,7 @@ const omitUpdate = [
83
83
  type activityInput = {
84
84
  collection?: string;
85
85
  operation: {
86
+ status?: "done" | "failed";
86
87
  uuid: string;
87
88
  type: string;
88
89
  auth?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.70.8",
3
+ "version": "0.71.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {},