@revisium/core 2.1.0 → 2.2.0-alpha.1

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.
Files changed (172) hide show
  1. package/dist/package.json +3 -1
  2. package/dist/src/__tests__/utils/queryTest.d.ts +1 -1
  3. package/dist/src/__tests__/utils/queryTest.js +1 -1
  4. package/dist/src/__tests__/utils/queryTest.js.map +1 -1
  5. package/dist/src/api/graphql-api/graphql-api.module.js +2 -0
  6. package/dist/src/api/graphql-api/graphql-api.module.js.map +1 -1
  7. package/dist/src/api/graphql-api/row/row.resolver.d.ts +9 -11
  8. package/dist/src/api/graphql-api/row/row.resolver.js +14 -16
  9. package/dist/src/api/graphql-api/row/row.resolver.js.map +1 -1
  10. package/dist/src/api/graphql-api/table/table.resolver.d.ts +5 -3
  11. package/dist/src/api/graphql-api/table/table.resolver.js +7 -6
  12. package/dist/src/api/graphql-api/table/table.resolver.js.map +1 -1
  13. package/dist/src/api/rest-api/rest-api.module.js +2 -0
  14. package/dist/src/api/rest-api/rest-api.module.js.map +1 -1
  15. package/dist/src/api/rest-api/row/row-by-id.controller.d.ts +5 -3
  16. package/dist/src/api/rest-api/row/row-by-id.controller.js +20 -10
  17. package/dist/src/api/rest-api/row/row-by-id.controller.js.map +1 -1
  18. package/dist/src/api/rest-api/share/model/order-by.model.d.ts +21 -1
  19. package/dist/src/api/rest-api/share/model/order-by.model.js +38 -1
  20. package/dist/src/api/rest-api/share/model/order-by.model.js.map +1 -1
  21. package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.d.ts +2 -2
  22. package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.js +15 -3
  23. package/dist/src/api/rest-api/share/utils/mapToPrismaOrderBy.js.map +1 -1
  24. package/dist/src/api/rest-api/share/validators/is-valid-data-field-order.validator.d.ts +2 -0
  25. package/dist/src/api/rest-api/share/validators/is-valid-data-field-order.validator.js +30 -0
  26. package/dist/src/api/rest-api/share/validators/is-valid-data-field-order.validator.js.map +1 -0
  27. package/dist/src/api/rest-api/table/dto/get-table-rows.dto.js +4 -0
  28. package/dist/src/api/rest-api/table/dto/get-table-rows.dto.js.map +1 -1
  29. package/dist/src/api/rest-api/table/table-by-id.controller.d.ts +3 -1
  30. package/dist/src/api/rest-api/table/table-by-id.controller.js +7 -7
  31. package/dist/src/api/rest-api/table/table-by-id.controller.js.map +1 -1
  32. package/dist/src/features/draft/commands/handlers/__tests__/utils.js +6 -4
  33. package/dist/src/features/draft/commands/handlers/__tests__/utils.js.map +1 -1
  34. package/dist/src/features/draft/commands/handlers/api-base-row.handler.d.ts +4 -3
  35. package/dist/src/features/draft/commands/handlers/api-base-row.handler.js +4 -4
  36. package/dist/src/features/draft/commands/handlers/api-base-row.handler.js.map +1 -1
  37. package/dist/src/features/draft/commands/handlers/api-create-revision.handler.js +1 -1
  38. package/dist/src/features/draft/commands/handlers/api-create-revision.handler.js.map +1 -1
  39. package/dist/src/features/draft/commands/handlers/api-create-row.handler.d.ts +3 -1
  40. package/dist/src/features/draft/commands/handlers/api-create-row.handler.js +6 -3
  41. package/dist/src/features/draft/commands/handlers/api-create-row.handler.js.map +1 -1
  42. package/dist/src/features/draft/commands/handlers/api-patch-row.handler.d.ts +3 -1
  43. package/dist/src/features/draft/commands/handlers/api-patch-row.handler.js +6 -3
  44. package/dist/src/features/draft/commands/handlers/api-patch-row.handler.js.map +1 -1
  45. package/dist/src/features/draft/commands/handlers/api-rename-row.handler.d.ts +3 -1
  46. package/dist/src/features/draft/commands/handlers/api-rename-row.handler.js +6 -3
  47. package/dist/src/features/draft/commands/handlers/api-rename-row.handler.js.map +1 -1
  48. package/dist/src/features/draft/commands/handlers/api-update-row.handler.d.ts +3 -1
  49. package/dist/src/features/draft/commands/handlers/api-update-row.handler.js +6 -3
  50. package/dist/src/features/draft/commands/handlers/api-update-row.handler.js.map +1 -1
  51. package/dist/src/features/draft/commands/handlers/api-upload-file.handler.d.ts +3 -1
  52. package/dist/src/features/draft/commands/handlers/api-upload-file.handler.js +6 -3
  53. package/dist/src/features/draft/commands/handlers/api-upload-file.handler.js.map +1 -1
  54. package/dist/src/features/draft/commands/impl/api-patch-row.command.d.ts +2 -2
  55. package/dist/src/features/draft/commands/impl/api-rename-row.command.d.ts +2 -2
  56. package/dist/src/features/draft/commands/impl/api-upload-file.command.d.ts +2 -2
  57. package/dist/src/features/draft/commands/types/api-create-row.handler.types.d.ts +2 -2
  58. package/dist/src/features/draft/commands/types/api-update-row.handler.types.d.ts +2 -2
  59. package/dist/src/features/draft/draft.module.js +2 -0
  60. package/dist/src/features/draft/draft.module.js.map +1 -1
  61. package/dist/src/features/endpoint/commands/handlers/create-endpoint.handler.d.ts +2 -2
  62. package/dist/src/features/endpoint/commands/handlers/create-endpoint.handler.js +2 -2
  63. package/dist/src/features/endpoint/commands/handlers/create-endpoint.handler.js.map +1 -1
  64. package/dist/src/features/endpoint/commands/handlers/delete-endpoint.handler.js +1 -1
  65. package/dist/src/features/endpoint/commands/handlers/delete-endpoint.handler.js.map +1 -1
  66. package/dist/src/features/endpoint/commands/impl/create-endpoint.command.d.ts +2 -0
  67. package/dist/src/features/plugin/file/utils/validate-file-data-for-restore.js +1 -1
  68. package/dist/src/features/plugin/file/utils/validate-file-data-for-restore.js.map +1 -1
  69. package/dist/src/features/project/commands/handlers/delete-project.handler.js +3 -3
  70. package/dist/src/features/project/commands/handlers/delete-project.handler.js.map +1 -1
  71. package/dist/src/features/row/queries/handlers/get-row-by-id.handler.d.ts +2 -3
  72. package/dist/src/features/row/queries/handlers/get-row-by-id.handler.js.map +1 -1
  73. package/dist/src/features/row/queries/handlers/get-row.handler.d.ts +3 -4
  74. package/dist/src/features/row/queries/handlers/get-row.handler.js.map +1 -1
  75. package/dist/src/features/row/queries/handlers/get-rows.handler.d.ts +21 -5
  76. package/dist/src/features/row/queries/handlers/get-rows.handler.js +23 -20
  77. package/dist/src/features/row/queries/handlers/get-rows.handler.js.map +1 -1
  78. package/dist/src/features/row/queries/handlers/resolve-row-count-foreign-keys-by.handler.d.ts +3 -4
  79. package/dist/src/features/row/queries/handlers/resolve-row-count-foreign-keys-by.handler.js +2 -2
  80. package/dist/src/features/row/queries/handlers/resolve-row-count-foreign-keys-by.handler.js.map +1 -1
  81. package/dist/src/features/row/queries/handlers/resolve-row-count-foreign-keys-to.handler.d.ts +2 -2
  82. package/dist/src/features/row/queries/handlers/resolve-row-count-foreign-keys-to.handler.js.map +1 -1
  83. package/dist/src/features/row/queries/handlers/resolve-row-foreign-keys-by.handler.d.ts +1 -2
  84. package/dist/src/features/row/queries/handlers/resolve-row-foreign-keys-by.handler.js.map +1 -1
  85. package/dist/src/features/row/queries/handlers/resolve-row-foreign-keys-to.handler.d.ts +1 -2
  86. package/dist/src/features/row/queries/handlers/resolve-row-foreign-keys-to.handler.js.map +1 -1
  87. package/dist/src/features/row/queries/impl/get-row-by-id.query.d.ts +3 -0
  88. package/dist/src/features/row/queries/impl/get-row-by-id.query.js.map +1 -1
  89. package/dist/src/features/row/queries/impl/get-row.query.d.ts +3 -0
  90. package/dist/src/features/row/queries/impl/get-row.query.js.map +1 -1
  91. package/dist/src/features/row/queries/impl/get-rows.query.d.ts +15 -2
  92. package/dist/src/features/row/queries/impl/get-rows.query.js.map +1 -1
  93. package/dist/src/features/row/queries/impl/resolve-row-count-foreign-keys-by.query.d.ts +2 -0
  94. package/dist/src/features/row/queries/impl/resolve-row-count-foreign-keys-to.query.d.ts +2 -0
  95. package/dist/src/features/row/queries/impl/resolve-row-foreign-keys-by.query.d.ts +4 -0
  96. package/dist/src/features/row/queries/impl/resolve-row-foreign-keys-by.query.js.map +1 -1
  97. package/dist/src/features/row/queries/impl/resolve-row-foreign-keys-to.query.d.ts +4 -0
  98. package/dist/src/features/row/queries/impl/resolve-row-foreign-keys-to.query.js.map +1 -1
  99. package/dist/src/features/row/row-api.service.d.ts +13 -0
  100. package/dist/src/features/row/row-api.service.js +47 -0
  101. package/dist/src/features/row/row-api.service.js.map +1 -0
  102. package/dist/src/features/row/row.module.js +3 -1
  103. package/dist/src/features/row/row.module.js.map +1 -1
  104. package/dist/src/features/share/commands/handlers/notify-endpoints.handler.js +1 -1
  105. package/dist/src/features/share/commands/handlers/notify-endpoints.handler.js.map +1 -1
  106. package/dist/src/features/share/foreign-keys.service.d.ts +7 -4
  107. package/dist/src/features/share/foreign-keys.service.js +77 -38
  108. package/dist/src/features/share/foreign-keys.service.js.map +1 -1
  109. package/dist/src/features/share/queries/handlers/transactional/find-table-in-revision-or-throw.handler.d.ts +1 -1
  110. package/dist/src/features/share/queries/handlers/transactional/find-table-in-revision-or-throw.handler.js +3 -3
  111. package/dist/src/features/share/queries/handlers/transactional/find-table-in-revision-or-throw.handler.js.map +1 -1
  112. package/dist/src/features/table/queries/handlers/index.d.ts +1 -2
  113. package/dist/src/features/table/queries/handlers/index.js +0 -2
  114. package/dist/src/features/table/queries/handlers/index.js.map +1 -1
  115. package/dist/src/infrastructure/database/database.module.js +3 -0
  116. package/dist/src/infrastructure/database/database.module.js.map +1 -1
  117. package/dist/src/infrastructure/database/postgresql-notification.service.d.ts +7 -0
  118. package/dist/src/infrastructure/database/postgresql-notification.service.js +33 -0
  119. package/dist/src/infrastructure/database/postgresql-notification.service.js.map +1 -0
  120. package/dist/src/infrastructure/database/transaction-prisma.service.d.ts +1 -0
  121. package/dist/src/infrastructure/database/transaction-prisma.service.js +3 -0
  122. package/dist/src/infrastructure/database/transaction-prisma.service.js.map +1 -1
  123. package/dist/src/infrastructure/notification/endpoint-notification.service.d.ts +7 -7
  124. package/dist/src/infrastructure/notification/endpoint-notification.service.js +15 -15
  125. package/dist/src/infrastructure/notification/endpoint-notification.service.js.map +1 -1
  126. package/dist/src/infrastructure/notification/notification.module.js +2 -1
  127. package/dist/src/infrastructure/notification/notification.module.js.map +1 -1
  128. package/dist/src/utils/prisma-sql-generator/__tests__/shared-helpers.d.ts +16 -0
  129. package/dist/src/utils/prisma-sql-generator/__tests__/shared-helpers.js +70 -0
  130. package/dist/src/utils/prisma-sql-generator/__tests__/shared-helpers.js.map +1 -0
  131. package/dist/src/utils/prisma-sql-generator/__tests__/test-helpers.d.ts +52 -0
  132. package/dist/src/utils/prisma-sql-generator/__tests__/test-helpers.js +531 -0
  133. package/dist/src/utils/prisma-sql-generator/__tests__/test-helpers.js.map +1 -0
  134. package/dist/src/utils/prisma-sql-generator/index.d.ts +2 -0
  135. package/dist/src/{features/row/queries/types → utils/prisma-sql-generator}/index.js +5 -5
  136. package/dist/src/utils/prisma-sql-generator/index.js.map +1 -0
  137. package/dist/src/utils/prisma-sql-generator/json-path.d.ts +14 -0
  138. package/dist/src/utils/prisma-sql-generator/json-path.js +121 -0
  139. package/dist/src/utils/prisma-sql-generator/json-path.js.map +1 -0
  140. package/dist/src/utils/prisma-sql-generator/types.d.ts +105 -0
  141. package/dist/src/{features/row/queries/types/get-row.types.js → utils/prisma-sql-generator/types.js} +1 -1
  142. package/dist/src/utils/prisma-sql-generator/types.js.map +1 -0
  143. package/dist/src/utils/prisma-sql-generator/where-generator.prisma.d.ts +21 -0
  144. package/dist/src/utils/prisma-sql-generator/where-generator.prisma.js +499 -0
  145. package/dist/src/utils/prisma-sql-generator/where-generator.prisma.js.map +1 -0
  146. package/dist/tsconfig.build.tsbuildinfo +1 -1
  147. package/package.json +3 -1
  148. package/dist/src/__tests__/utils/createMocks.d.ts +0 -19
  149. package/dist/src/__tests__/utils/createMocks.js +0 -30
  150. package/dist/src/__tests__/utils/createMocks.js.map +0 -1
  151. package/dist/src/features/row/queries/types/get-row-by-id.types.d.ts +0 -2
  152. package/dist/src/features/row/queries/types/get-row-by-id.types.js +0 -3
  153. package/dist/src/features/row/queries/types/get-row-by-id.types.js.map +0 -1
  154. package/dist/src/features/row/queries/types/get-row.types.d.ts +0 -2
  155. package/dist/src/features/row/queries/types/get-row.types.js.map +0 -1
  156. package/dist/src/features/row/queries/types/get-rows.types.d.ts +0 -3
  157. package/dist/src/features/row/queries/types/get-rows.types.js +0 -3
  158. package/dist/src/features/row/queries/types/get-rows.types.js.map +0 -1
  159. package/dist/src/features/row/queries/types/index.d.ts +0 -5
  160. package/dist/src/features/row/queries/types/index.js.map +0 -1
  161. package/dist/src/features/row/queries/types/resolve-row-foreign-keys-by.types.d.ts +0 -3
  162. package/dist/src/features/row/queries/types/resolve-row-foreign-keys-by.types.js +0 -3
  163. package/dist/src/features/row/queries/types/resolve-row-foreign-keys-by.types.js.map +0 -1
  164. package/dist/src/features/row/queries/types/resolve-row-foreign-keys-to.types.d.ts +0 -3
  165. package/dist/src/features/row/queries/types/resolve-row-foreign-keys-to.types.js +0 -3
  166. package/dist/src/features/row/queries/types/resolve-row-foreign-keys-to.types.js.map +0 -1
  167. package/dist/src/features/table/queries/handlers/get-rows-by-table.handler.d.ts +0 -30
  168. package/dist/src/features/table/queries/handlers/get-rows-by-table.handler.js +0 -70
  169. package/dist/src/features/table/queries/handlers/get-rows-by-table.handler.js.map +0 -1
  170. package/dist/src/features/table/queries/impl/get-rows-by-table.query.d.ts +0 -21
  171. package/dist/src/features/table/queries/impl/get-rows-by-table.query.js +0 -10
  172. package/dist/src/features/table/queries/impl/get-rows-by-table.query.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgresql-notification.service.js","sourceRoot":"","sources":["../../../../src/infrastructure/database/postgresql-notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,qDAA2E;AAGpE,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B;IACxC,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAE7D,KAAK,CAAC,MAAM,CAAC,YAAoB,EAAE,OAAyB;QAC1D,MAAM,IAAI,CAAC,aAAa,CAAC,WAAW,CAAA;;UAE9B,YAAY;UACZ,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;;KAE5B,CAAC;IACJ,CAAC;CACF,CAAA;AAXY,sEAA6B;wCAA7B,6BAA6B;IADzC,IAAA,mBAAU,GAAE;qCAEiC,8BAAa;GAD9C,6BAA6B,CAWzC"}
@@ -7,6 +7,7 @@ export declare class TransactionPrismaService {
7
7
  constructor(prismaService: PrismaService);
8
8
  getTransaction(): TransactionPrismaClient;
9
9
  getTransactionUnsafe(): TransactionPrismaClient | undefined;
10
+ getTransactionOrPrisma(): TransactionPrismaClient;
10
11
  run<T>(handler: (...rest: unknown[]) => Promise<T>, options?: {
11
12
  maxWait?: number;
12
13
  timeout?: number;
@@ -29,6 +29,9 @@ let TransactionPrismaService = class TransactionPrismaService {
29
29
  const transactionInCurrentContext = this.asyncLocalStorage.getStore();
30
30
  return transactionInCurrentContext?.$prisma;
31
31
  }
32
+ getTransactionOrPrisma() {
33
+ return this.getTransactionUnsafe() ?? this.prismaService;
34
+ }
32
35
  run(handler, options) {
33
36
  return this.prismaService.$transaction(async ($prisma) => {
34
37
  return this.asyncLocalStorage.run({ $prisma }, handler);
@@ -1 +1 @@
1
- {"version":3,"file":"transaction-prisma.service.js","sourceRoot":"","sources":["../../../../src/infrastructure/database/transaction-prisma.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0E;AAE1E,6CAAgD;AAChD,qDAA2E;AAIpE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAKnC,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAJxC,sBAAiB,GAAG,IAAI,+BAAiB,EAEtD,CAAC;IAEuD,CAAC;IAEtD,cAAc;QACnB,MAAM,2BAA2B,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;QAEtE,IAAI,CAAC,2BAA2B,EAAE,OAAO,EAAE,CAAC;YAC1C,MAAM,IAAI,qCAA4B,CACpC,kKAAkK,CACnK,CAAC;QACJ,CAAC;QAED,OAAO,2BAA2B,CAAC,OAAO,CAAC;IAC7C,CAAC;IAEM,oBAAoB;QACzB,MAAM,2BAA2B,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;QAEtE,OAAO,2BAA2B,EAAE,OAAO,CAAC;IAC9C,CAAC;IAEM,GAAG,CACR,OAA2C,EAC3C,OAIC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YACvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;QAC1D,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC;CACF,CAAA;AArCY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAMiC,8BAAa;GAL9C,wBAAwB,CAqCpC"}
1
+ {"version":3,"file":"transaction-prisma.service.js","sourceRoot":"","sources":["../../../../src/infrastructure/database/transaction-prisma.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0E;AAE1E,6CAAgD;AAChD,qDAA2E;AAIpE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAKnC,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;QAJxC,sBAAiB,GAAG,IAAI,+BAAiB,EAEtD,CAAC;IAEuD,CAAC;IAEtD,cAAc;QACnB,MAAM,2BAA2B,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;QAEtE,IAAI,CAAC,2BAA2B,EAAE,OAAO,EAAE,CAAC;YAC1C,MAAM,IAAI,qCAA4B,CACpC,kKAAkK,CACnK,CAAC;QACJ,CAAC;QAED,OAAO,2BAA2B,CAAC,OAAO,CAAC;IAC7C,CAAC;IAEM,oBAAoB;QACzB,MAAM,2BAA2B,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;QAEtE,OAAO,2BAA2B,EAAE,OAAO,CAAC;IAC9C,CAAC;IAEM,sBAAsB;QAC3B,OAAO,IAAI,CAAC,oBAAoB,EAAE,IAAI,IAAI,CAAC,aAAa,CAAC;IAC3D,CAAC;IAEM,GAAG,CACR,OAA2C,EAC3C,OAIC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YACvD,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;QAC1D,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC;CACF,CAAA;AAzCY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAMiC,8BAAa;GAL9C,wBAAwB,CAyCpC"}
@@ -1,10 +1,10 @@
1
- import { EndpointType } from '@prisma/client';
2
- import { NotificationClient } from '../../infrastructure/notification/notification-client.interface';
1
+ import { PostgresqlNotificationService } from '../../infrastructure/database/postgresql-notification.service';
3
2
  export declare class EndpointNotificationService {
4
- private readonly client;
3
+ private readonly postgresqlNotificationService;
5
4
  private readonly logger;
6
- constructor(client: NotificationClient);
7
- create(endpointId: string): void;
8
- update(endpointId: string): void;
9
- delete(endpointId: string, endpointType: EndpointType): void;
5
+ constructor(postgresqlNotificationService: PostgresqlNotificationService);
6
+ create(endpointId: string): Promise<void>;
7
+ update(endpointId: string): Promise<void>;
8
+ delete(endpointId: string): Promise<void>;
9
+ private postgresqlNotification;
10
10
  }
@@ -8,38 +8,38 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
11
  var EndpointNotificationService_1;
15
12
  Object.defineProperty(exports, "__esModule", { value: true });
16
13
  exports.EndpointNotificationService = void 0;
17
14
  const common_1 = require("@nestjs/common");
15
+ const postgresql_notification_service_1 = require("../database/postgresql-notification.service");
18
16
  let EndpointNotificationService = EndpointNotificationService_1 = class EndpointNotificationService {
19
- constructor(client) {
20
- this.client = client;
17
+ constructor(postgresqlNotificationService) {
18
+ this.postgresqlNotificationService = postgresqlNotificationService;
21
19
  this.logger = new common_1.Logger(EndpointNotificationService_1.name);
22
20
  }
23
- create(endpointId) {
21
+ async create(endpointId) {
24
22
  this.logger.log(`endpoint_created id=${endpointId}`);
25
- this.client.emit('endpoint_created', endpointId);
23
+ await this.postgresqlNotification('created', endpointId);
26
24
  }
27
- update(endpointId) {
25
+ async update(endpointId) {
28
26
  this.logger.log(`endpoint_updated id=${endpointId}`);
29
- this.client.emit('endpoint_updated', endpointId);
27
+ await this.postgresqlNotification('updated', endpointId);
28
+ }
29
+ async delete(endpointId) {
30
+ this.logger.log(`endpoint_deleted id=${endpointId}`);
31
+ await this.postgresqlNotification('deleted', endpointId);
30
32
  }
31
- delete(endpointId, endpointType) {
32
- this.logger.log(`endpoint_deleted id=${endpointId} type=${endpointType}`);
33
- this.client.emit('endpoint_deleted', {
33
+ postgresqlNotification(action, endpointId) {
34
+ return this.postgresqlNotificationService.notify('endpoint_changes', {
35
+ action,
34
36
  endpointId,
35
- endpointType,
36
37
  });
37
38
  }
38
39
  };
39
40
  exports.EndpointNotificationService = EndpointNotificationService;
40
41
  exports.EndpointNotificationService = EndpointNotificationService = EndpointNotificationService_1 = __decorate([
41
42
  (0, common_1.Injectable)(),
42
- __param(0, (0, common_1.Inject)('ENDPOINT_MICROSERVICE')),
43
- __metadata("design:paramtypes", [Object])
43
+ __metadata("design:paramtypes", [postgresql_notification_service_1.PostgresqlNotificationService])
44
44
  ], EndpointNotificationService);
45
45
  //# sourceMappingURL=endpoint-notification.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint-notification.service.js","sourceRoot":"","sources":["../../../../src/infrastructure/notification/endpoint-notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA4D;AAKrD,IAAM,2BAA2B,mCAAjC,MAAM,2BAA2B;IAGtC,YAEE,MAA2C;QAA1B,WAAM,GAAN,MAAM,CAAoB;QAJ5B,WAAM,GAAG,IAAI,eAAM,CAAC,6BAA2B,CAAC,IAAI,CAAC,CAAC;IAKpE,CAAC;IAEG,MAAM,CAAC,UAAkB;QAC9B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAS,kBAAkB,EAAE,UAAU,CAAC,CAAC;IAC3D,CAAC;IAEM,MAAM,CAAC,UAAkB;QAC9B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAS,kBAAkB,EAAE,UAAU,CAAC,CAAC;IAC3D,CAAC;IAEM,MAAM,CAAC,UAAkB,EAAE,YAA0B;QAC1D,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uBAAuB,UAAU,SAAS,YAAY,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,kBAAkB,EAClB;YACE,UAAU;YACV,YAAY;SACb,CACF,CAAC;IACJ,CAAC;CACF,CAAA;AA5BY,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,eAAM,EAAC,uBAAuB,CAAC,CAAA;;GAJvB,2BAA2B,CA4BvC"}
1
+ {"version":3,"file":"endpoint-notification.service.js","sourceRoot":"","sources":["../../../../src/infrastructure/notification/endpoint-notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,iGAA4G;AAGrG,IAAM,2BAA2B,mCAAjC,MAAM,2BAA2B;IAGtC,YACmB,6BAA4D;QAA5D,kCAA6B,GAA7B,6BAA6B,CAA+B;QAH9D,WAAM,GAAG,IAAI,eAAM,CAAC,6BAA2B,CAAC,IAAI,CAAC,CAAC;IAIpE,CAAC;IAEG,KAAK,CAAC,MAAM,CAAC,UAAkB;QACpC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;QACrD,MAAM,IAAI,CAAC,sBAAsB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC3D,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,UAAkB;QACpC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;QACrD,MAAM,IAAI,CAAC,sBAAsB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC3D,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,UAAkB;QACpC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uBAAuB,UAAU,EAAE,CAAC,CAAC;QACrD,MAAM,IAAI,CAAC,sBAAsB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC3D,CAAC;IAEO,sBAAsB,CAAC,MAAc,EAAE,UAAkB;QAC/D,OAAO,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC,kBAAkB,EAAE;YACnE,MAAM;YACN,UAAU;SACX,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA5BY,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,mBAAU,GAAE;qCAKuC,+DAA6B;GAJpE,2BAA2B,CA4BvC"}
@@ -12,6 +12,7 @@ const config_1 = require("@nestjs/config");
12
12
  const event_emitter_1 = require("@nestjs/event-emitter");
13
13
  const microservices_1 = require("@nestjs/microservices");
14
14
  const app_mode_1 = require("../../app-mode");
15
+ const database_module_1 = require("../database/database.module");
15
16
  const endpoint_notification_service_1 = require("./endpoint-notification.service");
16
17
  const in_memory_notification_client_1 = require("./in-memory-notification-client");
17
18
  const redis_notification_client_1 = require("./redis-notification-client");
@@ -20,7 +21,7 @@ let NotificationModule = class NotificationModule {
20
21
  exports.NotificationModule = NotificationModule;
21
22
  exports.NotificationModule = NotificationModule = __decorate([
22
23
  (0, common_1.Module)({
23
- imports: [config_1.ConfigModule, event_emitter_1.EventEmitterModule.forRoot()],
24
+ imports: [config_1.ConfigModule, database_module_1.DatabaseModule, event_emitter_1.EventEmitterModule.forRoot()],
24
25
  providers: [
25
26
  {
26
27
  provide: 'ENDPOINT_MICROSERVICE',
@@ -1 +1 @@
1
- {"version":3,"file":"notification.module.js","sourceRoot":"","sources":["../../../../src/infrastructure/notification/notification.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA6D;AAC7D,yDAA0E;AAC1E,yDAAsE;AACtE,6CAA6D;AAC7D,mFAA4G;AAC5G,mFAA2G;AAC3G,2EAAoG;AAmC7F,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,gDAAkB;6BAAlB,kBAAkB;IAjC9B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,qBAAY,EAAE,kCAAkB,CAAC,OAAO,EAAE,CAAC;QACrD,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,uBAAuB;gBAChC,UAAU,EAAE,KAAK,EACf,aAA4B,EAC5B,OAAsB,EACtB,UAAsB,EACtB,EAAE;oBACF,IAAI,UAAU,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;wBACnC,OAAO,IAAI,0DAA0B,CAAC,OAAO,CAAC,CAAC;oBACjD,CAAC;oBAED,MAAM,IAAI,GAAG,aAAa,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;oBACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,CAAC;oBAErE,MAAM,MAAM,GAAG,kCAAkB,CAAC,MAAM,CAAC;wBACvC,SAAS,EAAE,yBAAS,CAAC,KAAK;wBAC1B,OAAO,EAAE;4BACP,IAAI;4BACJ,IAAI;yBACL;qBACF,CAAC,CAAC;oBAEH,OAAO,IAAI,mDAAuB,CAAC,MAAM,CAAC,CAAC;gBAC7C,CAAC;gBACD,MAAM,EAAE,CAAC,sBAAa,EAAE,6BAAa,EAAE,4BAAiB,CAAC;aAC1D;YACD,2DAA2B;SAC5B;QACD,OAAO,EAAE,CAAC,2DAA2B,CAAC;KACvC,CAAC;GACW,kBAAkB,CAAG"}
1
+ {"version":3,"file":"notification.module.js","sourceRoot":"","sources":["../../../../src/infrastructure/notification/notification.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA6D;AAC7D,yDAA0E;AAC1E,yDAAsE;AACtE,6CAA6D;AAC7D,iEAA6E;AAC7E,mFAA4G;AAC5G,mFAA2G;AAC3G,2EAAoG;AAmC7F,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,gDAAkB;6BAAlB,kBAAkB;IAjC9B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,qBAAY,EAAE,gCAAc,EAAE,kCAAkB,CAAC,OAAO,EAAE,CAAC;QACrE,SAAS,EAAE;YACT;gBACE,OAAO,EAAE,uBAAuB;gBAChC,UAAU,EAAE,KAAK,EACf,aAA4B,EAC5B,OAAsB,EACtB,UAAsB,EACtB,EAAE;oBACF,IAAI,UAAU,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;wBACnC,OAAO,IAAI,0DAA0B,CAAC,OAAO,CAAC,CAAC;oBACjD,CAAC;oBAED,MAAM,IAAI,GAAG,aAAa,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;oBACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,CAAC;oBAErE,MAAM,MAAM,GAAG,kCAAkB,CAAC,MAAM,CAAC;wBACvC,SAAS,EAAE,yBAAS,CAAC,KAAK;wBAC1B,OAAO,EAAE;4BACP,IAAI;4BACJ,IAAI;yBACL;qBACF,CAAC,CAAC;oBAEH,OAAO,IAAI,mDAAuB,CAAC,MAAM,CAAC,CAAC;gBAC7C,CAAC;gBACD,MAAM,EAAE,CAAC,sBAAa,EAAE,6BAAa,EAAE,4BAAiB,CAAC;aAC1D;YACD,2DAA2B;SAC5B;QACD,OAAO,EAAE,CAAC,2DAA2B,CAAC;KACvC,CAAC;GACW,kBAAkB,CAAG"}
@@ -0,0 +1,16 @@
1
+ import { Prisma } from '@prisma/client';
2
+ export declare function runPrismaOrmRows(prisma: any, { tableVersionId, where, orderBy, take, skip, }: {
3
+ tableVersionId: string;
4
+ where?: any;
5
+ orderBy?: any;
6
+ take?: number;
7
+ skip?: number;
8
+ }): Promise<any>;
9
+ export declare function runViaPrismaRaw(prisma: any, sqlNode: Prisma.Sql): Promise<any[]>;
10
+ export declare function compareByIds(prismaRows: any[], rawRows: any[]): void;
11
+ export declare function compareExactly(prismaRows: any[], rawRows: any[]): void;
12
+ export declare function validateSqlStructure(query: Prisma.Sql): {
13
+ sql: string;
14
+ params: unknown[];
15
+ };
16
+ export declare function testPagination(prisma: any, tableVersionId: string, generator: any, options: any): Promise<void>;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runPrismaOrmRows = runPrismaOrmRows;
4
+ exports.runViaPrismaRaw = runViaPrismaRaw;
5
+ exports.compareByIds = compareByIds;
6
+ exports.compareExactly = compareExactly;
7
+ exports.validateSqlStructure = validateSqlStructure;
8
+ exports.testPagination = testPagination;
9
+ async function runPrismaOrmRows(prisma, { tableVersionId, where, orderBy, take = 50, skip = 0, }) {
10
+ return prisma.table
11
+ .findUniqueOrThrow({ where: { versionId: tableVersionId } })
12
+ .rows({ take, skip, orderBy, where });
13
+ }
14
+ async function runViaPrismaRaw(prisma, sqlNode) {
15
+ return prisma.$queryRaw(sqlNode);
16
+ }
17
+ function compareByIds(prismaRows, rawRows) {
18
+ expect(rawRows.length).toBe(prismaRows.length);
19
+ if (!rawRows.length)
20
+ return;
21
+ const prismaIds = prismaRows
22
+ .map((r) => r.id)
23
+ .slice()
24
+ .sort();
25
+ const rawIds = rawRows
26
+ .map((r) => r.id)
27
+ .slice()
28
+ .sort();
29
+ expect(rawIds).toEqual(prismaIds);
30
+ }
31
+ function compareExactly(prismaRows, rawRows) {
32
+ expect(rawRows.length).toBe(prismaRows.length);
33
+ if (!rawRows.length)
34
+ return;
35
+ const prismaIds = prismaRows.map((r) => r.id);
36
+ const rawIds = rawRows.map((r) => r.id);
37
+ expect(rawIds).toEqual(prismaIds);
38
+ }
39
+ function validateSqlStructure(query) {
40
+ const sql = query.inspect().sql;
41
+ expect(sql).toContain('SELECT');
42
+ expect(sql).toContain('FROM "Row" r');
43
+ expect(sql).toContain('INNER JOIN "_RowToTable" rt');
44
+ expect(sql).toContain('WHERE rt."B" =');
45
+ expect(sql).toContain('ORDER BY');
46
+ expect(sql).toContain('LIMIT');
47
+ expect(sql).toContain('OFFSET');
48
+ const params = query.inspect().values;
49
+ expect(Array.isArray(params)).toBe(true);
50
+ return { sql, params };
51
+ }
52
+ async function testPagination(prisma, tableVersionId, generator, options) {
53
+ const scenarios = [
54
+ { take: 5, skip: 0 },
55
+ { take: 5, skip: 5 },
56
+ { take: 10, skip: 0 },
57
+ { take: 50, skip: 0 },
58
+ ];
59
+ for (const scenario of scenarios) {
60
+ const testOptions = { ...options, ...scenario };
61
+ const prismaResult = await runPrismaOrmRows(prisma, {
62
+ tableVersionId,
63
+ ...testOptions,
64
+ });
65
+ const query = generator.generateGetRowsQueryPrisma(tableVersionId, testOptions);
66
+ const rawResult = await runViaPrismaRaw(prisma, query);
67
+ compareByIds(prismaResult, rawResult);
68
+ }
69
+ }
70
+ //# sourceMappingURL=shared-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-helpers.js","sourceRoot":"","sources":["../../../../../src/utils/prisma-sql-generator/__tests__/shared-helpers.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,52 @@
1
+ import { PrismaService } from '../../../infrastructure/database/prisma.service';
2
+ export interface TestRow {
3
+ id: string;
4
+ data?: any;
5
+ [key: string]: any;
6
+ }
7
+ export declare function createTableWithJsonData(prismaService: PrismaService): Promise<{
8
+ table: {
9
+ id: string;
10
+ createdId: string;
11
+ createdAt: Date;
12
+ versionId: string;
13
+ readonly: boolean;
14
+ updatedAt: Date;
15
+ system: boolean;
16
+ };
17
+ }>;
18
+ export declare function createTableWithStringData(prismaService: PrismaService): Promise<{
19
+ table: {
20
+ id: string;
21
+ createdId: string;
22
+ createdAt: Date;
23
+ versionId: string;
24
+ readonly: boolean;
25
+ updatedAt: Date;
26
+ system: boolean;
27
+ };
28
+ }>;
29
+ export declare function createTableWithDateData(prismaService: PrismaService): Promise<{
30
+ table: {
31
+ id: string;
32
+ createdId: string;
33
+ createdAt: Date;
34
+ versionId: string;
35
+ readonly: boolean;
36
+ updatedAt: Date;
37
+ system: boolean;
38
+ };
39
+ baseDate: Date;
40
+ dates: Date[];
41
+ }>;
42
+ export declare function createTableWithComplexJsonData(prismaService: PrismaService): Promise<{
43
+ table: {
44
+ id: string;
45
+ createdId: string;
46
+ createdAt: Date;
47
+ versionId: string;
48
+ readonly: boolean;
49
+ updatedAt: Date;
50
+ system: boolean;
51
+ };
52
+ }>;