@reactionary/fake 0.7.0 → 0.7.4

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.
@@ -111,7 +111,7 @@ class FakeCategoryCapability extends CategoryCapability {
111
111
  totalCount: this.topCategories.length,
112
112
  totalPages: 1
113
113
  };
114
- return success(this.factory.parseCategoryPaginatedResult(this.context, result));
114
+ return success(this.factory.parseCategoryPaginatedResult(this.context, result, _payload));
115
115
  }
116
116
  async findChildCategories(payload) {
117
117
  const items = this.childCategories.get(payload.parentId.key) || [];
@@ -122,7 +122,7 @@ class FakeCategoryCapability extends CategoryCapability {
122
122
  totalCount: items.length,
123
123
  totalPages: 1
124
124
  };
125
- return success(this.factory.parseCategoryPaginatedResult(this.context, result));
125
+ return success(this.factory.parseCategoryPaginatedResult(this.context, result, payload));
126
126
  }
127
127
  }
128
128
  __decorateClass([
@@ -8,7 +8,7 @@ class FakeCategoryFactory {
8
8
  parseCategory(_context, data) {
9
9
  return this.categorySchema.parse(data);
10
10
  }
11
- parseCategoryPaginatedResult(_context, data) {
11
+ parseCategoryPaginatedResult(_context, data, query) {
12
12
  return this.categoryPaginatedResultSchema.parse(data);
13
13
  }
14
14
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@reactionary/fake",
3
- "version": "0.7.0",
3
+ "version": "0.7.4",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./src/index.d.ts",
7
7
  "dependencies": {
8
8
  "vitest": "^4.0.9",
9
9
  "@nx/vite": "22.4.5",
10
- "@reactionary/core": "0.7.0",
10
+ "@reactionary/core": "0.7.4",
11
11
  "zod": "4.1.9",
12
12
  "@faker-js/faker": "^9.8.0"
13
13
  },
@@ -1,9 +1,9 @@
1
- import type { AnyCategoryPaginatedResultSchema, AnyCategorySchema, CategoryFactory, CategoryPaginatedResultSchema, CategorySchema, RequestContext } from '@reactionary/core';
1
+ import type { AnyCategoryPaginatedResultSchema, AnyCategorySchema, CategoryFactory, CategoryPaginatedResultSchema, CategorySchema, RequestContext, CategoryQueryForTopCategories, CategoryQueryForChildCategories } from '@reactionary/core';
2
2
  import type * as z from 'zod';
3
3
  export declare class FakeCategoryFactory<TCategorySchema extends AnyCategorySchema = typeof CategorySchema, TCategoryPaginatedSchema extends AnyCategoryPaginatedResultSchema = typeof CategoryPaginatedResultSchema> implements CategoryFactory<TCategorySchema, TCategoryPaginatedSchema> {
4
4
  readonly categorySchema: TCategorySchema;
5
5
  readonly categoryPaginatedResultSchema: TCategoryPaginatedSchema;
6
6
  constructor(categorySchema: TCategorySchema, categoryPaginatedResultSchema: TCategoryPaginatedSchema);
7
7
  parseCategory(_context: RequestContext, data: unknown): z.output<TCategorySchema>;
8
- parseCategoryPaginatedResult(_context: RequestContext, data: unknown): z.output<TCategoryPaginatedSchema>;
8
+ parseCategoryPaginatedResult(_context: RequestContext, data: unknown, query: CategoryQueryForTopCategories | CategoryQueryForChildCategories): z.output<TCategoryPaginatedSchema>;
9
9
  }