@chevre/domain 28.0.0-alpha.35 → 28.0.0-alpha.37

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.
@@ -1,6 +1,6 @@
1
1
  import type { Connection } from 'mongoose';
2
2
  import { factory } from '../factory';
3
- type IFindParams = Pick<factory.accountTitle.ISearchConditions, 'codeValue' | 'limit' | 'name' | 'page' | 'project' | 'sort' | 'additionalProperty' | 'inCodeSet'>;
3
+ type IFindParams = Pick<factory.accountTitle.ISearchConditions, 'codeValue' | 'limit' | 'name' | 'page' | 'project' | 'additionalProperty' | 'inCodeSet'>;
4
4
  /**
5
5
  * 細目管理リポジトリ
6
6
  */
@@ -27,12 +27,23 @@ export declare class AdminAccountTitleRepo {
27
27
  }): Promise<{
28
28
  id: string;
29
29
  }>;
30
- findAccountTitles(params: IFindParams): Promise<Pick<factory.accountTitle.IAccountTitle, 'codeValue' | 'name' | 'project' | 'typeOf'>[]>;
30
+ findAccountTitles(params: IFindParams): Promise<(Pick<factory.accountTitle.IAccountTitle, 'codeValue' | 'name' | 'additionalProperty'> & {
31
+ inCodeSet: {
32
+ codeValue: string;
33
+ name?: string;
34
+ inCodeSet: {
35
+ codeValue: string;
36
+ name?: string;
37
+ };
38
+ };
39
+ })[]>;
31
40
  deleteAccountTitleByCodeValue(params: {
32
41
  projectId: string;
33
42
  codeValue: string;
34
43
  accountTitleCategoryCode: string;
35
44
  accountTitleSetCode: string;
36
- }): Promise<void>;
45
+ }): Promise<{
46
+ id: string;
47
+ }>;
37
48
  }
38
49
  export {};
@@ -173,7 +173,6 @@ class AdminAccountTitleRepo {
173
173
  codeValue: '$codeValue',
174
174
  name: '$name'
175
175
  },
176
- inDefinedTermSet: '$hasCategoryCode.inDefinedTermSet'
177
176
  },
178
177
  additionalProperty: '$hasCategoryCode.hasCategoryCode.additionalProperty'
179
178
  }
@@ -207,6 +206,7 @@ class AdminAccountTitleRepo {
207
206
  if (doc === null) {
208
207
  throw new factory_1.factory.errors.NotFound(accountTitle_1.modelName);
209
208
  }
209
+ return { id: doc.id };
210
210
  }
211
211
  }
212
212
  exports.AdminAccountTitleRepo = AdminAccountTitleRepo;
@@ -24,7 +24,7 @@ export declare class AdminAccountTitleCategoryRepo {
24
24
  updateAccountTitleCategory(params: Pick<factory.accountTitle.IAccountTitle, 'codeValue' | 'name' | 'project'>): Promise<{
25
25
  id: string;
26
26
  }>;
27
- findAccountTitleCategories(params: IFindParams): Promise<Pick<factory.accountTitle.IAccountTitle, 'codeValue' | 'name' | 'project' | 'typeOf'>[]>;
27
+ findAccountTitleCategories(params: IFindParams): Promise<Pick<factory.accountTitle.IAccountTitle, 'codeValue' | 'name'>[]>;
28
28
  deleteAccountTitleCategoryByCodeValue(params: {
29
29
  projectId: string;
30
30
  codeValue: string;
@@ -94,15 +94,13 @@ class AdminAccountTitleCategoryRepo {
94
94
  _id: 0,
95
95
  codeValue: 1,
96
96
  name: 1,
97
- project: 1,
98
- typeOf: 1
99
97
  });
100
98
  if (typeof params.limit === 'number' && typeof params.page === 'number') {
101
99
  query.limit(params.limit)
102
100
  .skip(params.limit * (params.page - 1));
103
101
  }
104
102
  if (typeof params.sort?.codeValue === 'number') {
105
- query.sort({ params: params.sort.codeValue });
103
+ query.sort({ codeValue: params.sort.codeValue });
106
104
  }
107
105
  return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
108
106
  .lean()
@@ -1,6 +1,6 @@
1
1
  import type { Connection } from 'mongoose';
2
2
  import { factory } from '../factory';
3
- type IFindParams = Pick<factory.accountTitle.ISearchConditions, 'codeValue' | 'limit' | 'name' | 'page' | 'project' | 'sort'> & {
3
+ type IFindParams = Pick<factory.accountTitle.ISearchConditions, 'codeValue' | 'limit' | 'name' | 'page' | 'project'> & {
4
4
  inCodeSet?: {
5
5
  codeValue?: string | {
6
6
  $eq?: string;
@@ -35,6 +35,8 @@ export declare class AdminAccountTitleSetRepo {
35
35
  projectId: string;
36
36
  accountTitleCategoryCode: string;
37
37
  codeValue: string;
38
- }): Promise<void>;
38
+ }): Promise<{
39
+ id: string;
40
+ }>;
39
41
  }
40
42
  export {};
@@ -143,6 +143,7 @@ class AdminAccountTitleSetRepo {
143
143
  if (doc === null) {
144
144
  throw new factory_1.factory.errors.NotFound(accountTitle_1.modelName);
145
145
  }
146
+ return { id: doc.id };
146
147
  }
147
148
  }
148
149
  exports.AdminAccountTitleSetRepo = AdminAccountTitleSetRepo;
package/package.json CHANGED
@@ -88,5 +88,5 @@
88
88
  "postversion": "git push origin --tags",
89
89
  "prepublishOnly": "npm run clean && npm run build"
90
90
  },
91
- "version": "28.0.0-alpha.35"
91
+ "version": "28.0.0-alpha.37"
92
92
  }