@dnax/core 0.71.0 → 0.72.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
@@ -402,7 +402,7 @@ function HonoInstance(): typeof app {
402
402
  auth: true,
403
403
  performedBy: {
404
404
  user: sessionStorage().get().state?.user,
405
- role: sessionStorage().get()?.role || "",
405
+ role: sessionStorage().get()?.role!,
406
406
  },
407
407
  },
408
408
  state: sessionStorage().get().state,
@@ -438,7 +438,7 @@ function HonoInstance(): typeof app {
438
438
  auth: true,
439
439
  performedBy: {
440
440
  user: sessionStorage().get().state?.user,
441
- role: sessionStorage().get()?.role || "",
441
+ role: sessionStorage().get()?.role || null,
442
442
  },
443
443
  },
444
444
 
@@ -97,7 +97,7 @@ type activityInput = {
97
97
  timestamp?: Date;
98
98
  performedBy?: {
99
99
  user?: object;
100
- role?: string;
100
+ role?: string | null;
101
101
  };
102
102
  payload?: {
103
103
  update?: any;
@@ -156,7 +156,12 @@ class useRest {
156
156
  client: this.#tenant.searchEngine?.meilisearch?.client!,
157
157
  };
158
158
  this.activity = {
159
- aggregate: async (pipeline: Array<object>) => {
159
+ aggregate: async (
160
+ pipeline: Array<object>,
161
+ options?: {
162
+ cleanDeep?: boolean;
163
+ }
164
+ ) => {
160
165
  return await restActivity.aggregate(this.#tenant, pipeline);
161
166
  },
162
167
  save: async (activityInput: activityInput) => {
@@ -2613,7 +2618,12 @@ const restActivity = {
2613
2618
  $skip?: number;
2614
2619
  }
2615
2620
  ) => {},
2616
- aggregate: async (tenant: Tenant, pipeline: Array<object>): Promise<any> => {
2621
+ aggregate: async (
2622
+ tenant: Tenant,
2623
+ pipeline: Array<object>,
2624
+ options?: { cleanDeep?: boolean }
2625
+ ): Promise<any> => {
2626
+ pipeline = options?.cleanDeep ? cleanDeep(pipeline) : pipeline;
2617
2627
  return await tenant.database.db
2618
2628
  ?.collection("_activity_")
2619
2629
  .aggregate(toBson(pipeline), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.71.0",
3
+ "version": "0.72.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {},