@dnax/core 0.54.0 → 0.54.2

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
@@ -368,11 +368,14 @@ function HonoInstance(): typeof app {
368
368
  rest.activity.save({
369
369
  collection: collection,
370
370
  data: {
371
- input: body,
371
+ data: body,
372
372
  },
373
373
  action: "authCollection",
374
374
  auth: true,
375
+ transaction: false,
376
+ role: sessionStorage().get().role || null,
375
377
  user: sessionStorage().get().state?.user,
378
+ state: sessionStorage().get().state,
376
379
  ip:
377
380
  c.req.raw.headers?.get("CF-Connecting-IP") ||
378
381
  c.req.raw.headers?.get("x-forwarded-for") ||
@@ -389,11 +392,14 @@ function HonoInstance(): typeof app {
389
392
  rest.activity.save({
390
393
  collection: collection,
391
394
  data: {
392
- input: body,
395
+ data: body,
393
396
  },
397
+ transaction: false,
394
398
  action: "authCollection",
395
399
  auth: false,
396
400
  user: sessionStorage().get().state?.user,
401
+ state: sessionStorage().get().state,
402
+ role: sessionStorage().get().role || null,
397
403
  ip:
398
404
  c.req.raw.headers?.get("CF-Connecting-IP") ||
399
405
  c.req.raw.headers?.get("x-forwarded-for") ||
@@ -88,11 +88,21 @@ class useRest {
88
88
  save?: (activity: {
89
89
  collection?: string;
90
90
  data: {
91
- input: any;
91
+ update?: any;
92
+ data?: any;
93
+ input?: any;
94
+ filter?: any;
95
+ ids?: string[];
96
+ id?: string;
92
97
  };
93
98
  action: string;
94
99
  ip?: string;
95
100
  user?: object;
101
+ state?: object;
102
+ transaction?: boolean;
103
+ internal?: boolean;
104
+ auth?: boolean;
105
+ role?: string | null | undefined;
96
106
  }) => Promise<any>;
97
107
  list?: (filter?: {
98
108
  $match: {};
@@ -2041,7 +2051,7 @@ const restActivity = {
2041
2051
  }
2042
2052
  ) => {
2043
2053
  return await tenant.database.db
2044
- ?.collection("___activity__")
2054
+ ?.collection("_activity_")
2045
2055
  .insertOne(
2046
2056
  toBson({
2047
2057
  ip: activity?.ip,
@@ -2051,6 +2061,7 @@ const restActivity = {
2051
2061
  collection: activity?.collection,
2052
2062
  auth: activity?.auth ?? false,
2053
2063
  createdAt: moment().format(),
2064
+ internal: activity?.internal ?? false,
2054
2065
  updatedAt: moment().format(),
2055
2066
  user: activity?.user,
2056
2067
  state: activity?.state,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.54.0",
3
+ "version": "0.54.2",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {