@application-kit/audit-log 0.1.2 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @application-kit/audit-log
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Patch Changes
6
+
7
+ - df7cdd0: Клиент сортирует листинг только по полям, которые листинг объявил, а `CursorPaginator` берёт имя колонки из метаданных entity и отклоняет неизвестное поле ошибкой `InvalidSortFieldError` (400) до обращения к базе данных. **Ломающее:** потребителю — заменить позиционные параметры `getListByCursor` после `mapper` объектом `{ paginator, sortableFields, filters, sorting, estimateTotal }`, в `sortableFields` перечислить поля, по которым разрешено сортировать.
8
+ - Updated dependencies [df7cdd0]
9
+ - @application-kit/typeorm@0.12.0
10
+ - @application-kit/graphql@0.12.0
11
+ - @application-kit/transaction-outbox@0.12.0
12
+ - @application-kit/authorization@0.12.0
13
+
3
14
  ## 0.1.2
4
15
 
5
16
  ### Patch Changes
@@ -36,7 +36,7 @@ let AuditRecordRepository = class AuditRecordRepository {
36
36
  .execute();
37
37
  }
38
38
  async list(paginator, sorting, filters) {
39
- return (0, typeorm_1.getListByCursor)(audit_record_entity_js_1.AuditRecordEntity, this.repository.createQueryBuilder('auditRecord'), (entities) => entities.map((entity) => this.mapper.toDto(entity)), paginator, filters, sorting);
39
+ return (0, typeorm_1.getListByCursor)(audit_record_entity_js_1.AuditRecordEntity, this.repository.createQueryBuilder('auditRecord'), (entities) => entities.map((entity) => this.mapper.toDto(entity)), { filters, paginator, sortableFields: ['createdAt'], sorting });
40
40
  }
41
41
  };
42
42
  exports.AuditRecordRepository = AuditRecordRepository;
@@ -33,7 +33,7 @@ let AuditRecordRepository = class AuditRecordRepository {
33
33
  .execute();
34
34
  }
35
35
  async list(paginator, sorting, filters) {
36
- return getListByCursor(AuditRecordEntity, this.repository.createQueryBuilder('auditRecord'), (entities) => entities.map((entity) => this.mapper.toDto(entity)), paginator, filters, sorting);
36
+ return getListByCursor(AuditRecordEntity, this.repository.createQueryBuilder('auditRecord'), (entities) => entities.map((entity) => this.mapper.toDto(entity)), { filters, paginator, sortableFields: ['createdAt'], sorting });
37
37
  }
38
38
  };
39
39
  AuditRecordRepository = __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@application-kit/audit-log",
3
- "version": "0.1.2",
3
+ "version": "0.12.0",
4
4
  "description": "Журнал аудита для NestJS: append-only таблица с триггерами, запись из событий, чтение через GraphQL, факты запроса для outbox; роли, действия и гранты приносит приложение",
5
5
  "keywords": [
6
6
  "audit-log",
@@ -66,13 +66,13 @@
66
66
  "test:unit": "vitest run"
67
67
  },
68
68
  "dependencies": {
69
- "@application-kit/authorization": "^0.5.1",
70
- "@application-kit/graphql": "^0.8.1",
71
- "@application-kit/transaction-outbox": "^0.4.2",
72
- "@application-kit/typeorm": "^0.5.3"
69
+ "@application-kit/authorization": "^0.12.0",
70
+ "@application-kit/graphql": "^0.12.0",
71
+ "@application-kit/transaction-outbox": "^0.12.0",
72
+ "@application-kit/typeorm": "^0.12.0"
73
73
  },
74
74
  "devDependencies": {
75
- "@application-kit/testing": "^0.10.5",
75
+ "@application-kit/testing": "^0.10.6",
76
76
  "@casl/ability": "^7.0.1",
77
77
  "@libs-for-dev/nestjs-ddd-library": "1.5.0",
78
78
  "@libs-for-dev/typeorm-plural-naming-strategy": "^1.4.0",