@xxmachina/common 19.0.0-preview.2 → 19.0.0-preview.21

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 (581) hide show
  1. package/_shared/meta/index.d.ts +1 -0
  2. package/_shared/meta/redis/redis.repository.d.ts +6 -3
  3. package/auth/auth.service.d.ts +3 -0
  4. package/azure-auth/auth.service.d.ts +3 -0
  5. package/domain/builder/command/command.builder.d.ts +1 -2
  6. package/domain/builder/command-action/command-action.builder.d.ts +1 -1
  7. package/domain/builder/index.d.ts +4 -0
  8. package/domain/builder/screen-item/screen-item.builder.d.ts +2 -2
  9. package/domain/index.d.ts +2 -1
  10. package/domain/models/index.d.ts +8 -2
  11. package/domain/models/links/index.d.ts +1 -0
  12. package/{domain/invoice → domain-invoice}/builders/email/email.builder.d.ts +1 -1
  13. package/domain-invoice/builders/index.d.ts +3 -0
  14. package/{domain/invoice → domain-invoice}/builders/message/message.builder.d.ts +1 -1
  15. package/{domain/invoice → domain-invoice}/builders/title/title.builder.d.ts +1 -1
  16. package/domain-invoice/index.d.ts +3 -0
  17. package/{domain/invoice → domain-invoice}/models/backoffice/invoice.d.ts +1 -1
  18. package/{domain/invoice → domain-invoice}/models/backoffice/order.d.ts +1 -1
  19. package/{domain/invoice → domain-invoice}/models/backoffice/partner.d.ts +1 -1
  20. package/{domain → domain-invoice}/resolvers/invoice.resolver.d.ts +1 -1
  21. package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs +20 -0
  22. package/fesm2022/xxmachina-common-_shared-auth-passports-anonymous.mjs.map +1 -0
  23. package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs +41 -0
  24. package/fesm2022/xxmachina-common-_shared-auth-passports-firebase.mjs.map +1 -0
  25. package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs +34 -0
  26. package/fesm2022/xxmachina-common-_shared-auth-passports-internal.mjs.map +1 -0
  27. package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs +49 -0
  28. package/fesm2022/xxmachina-common-_shared-auth-passports-msal.mjs.map +1 -0
  29. package/fesm2022/xxmachina-common-_shared-auth.mjs +25 -0
  30. package/fesm2022/xxmachina-common-_shared-auth.mjs.map +1 -0
  31. package/fesm2022/xxmachina-common-_shared-meta-redis.mjs +99 -0
  32. package/fesm2022/xxmachina-common-_shared-meta-redis.mjs.map +1 -0
  33. package/fesm2022/xxmachina-common-_shared-meta.mjs +26 -0
  34. package/fesm2022/xxmachina-common-_shared-meta.mjs.map +1 -0
  35. package/fesm2022/xxmachina-common-auth.mjs +17 -0
  36. package/fesm2022/xxmachina-common-auth.mjs.map +1 -0
  37. package/fesm2022/xxmachina-common-azure-auth.mjs +160 -0
  38. package/fesm2022/xxmachina-common-azure-auth.mjs.map +1 -0
  39. package/{domain/builder/screen-item/screen-item.builder.js → fesm2022/xxmachina-common-domain-builder-screen-item.mjs} +10 -11
  40. package/fesm2022/xxmachina-common-domain-builder-screen-item.mjs.map +1 -0
  41. package/fesm2022/xxmachina-common-domain-builder.mjs +470 -0
  42. package/fesm2022/xxmachina-common-domain-builder.mjs.map +1 -0
  43. package/fesm2022/xxmachina-common-domain-invoice-builders.mjs +70 -0
  44. package/fesm2022/xxmachina-common-domain-invoice-builders.mjs.map +1 -0
  45. package/fesm2022/xxmachina-common-domain-invoice-models.mjs +427 -0
  46. package/fesm2022/xxmachina-common-domain-invoice-models.mjs.map +1 -0
  47. package/fesm2022/xxmachina-common-domain-invoice-resolvers.mjs +39 -0
  48. package/fesm2022/xxmachina-common-domain-invoice-resolvers.mjs.map +1 -0
  49. package/fesm2022/xxmachina-common-domain-invoice.mjs +8 -0
  50. package/fesm2022/xxmachina-common-domain-invoice.mjs.map +1 -0
  51. package/fesm2022/xxmachina-common-domain-models.mjs +783 -0
  52. package/fesm2022/xxmachina-common-domain-models.mjs.map +1 -0
  53. package/fesm2022/xxmachina-common-domain.mjs +7 -0
  54. package/fesm2022/xxmachina-common-domain.mjs.map +1 -0
  55. package/fesm2022/xxmachina-common-infra-converters-google.mjs +36 -0
  56. package/fesm2022/xxmachina-common-infra-converters-google.mjs.map +1 -0
  57. package/fesm2022/xxmachina-common-infra-external-data-connect.mjs +13 -0
  58. package/fesm2022/xxmachina-common-infra-external-data-connect.mjs.map +1 -0
  59. package/fesm2022/xxmachina-common-infra-external-quick-js.mjs +44 -0
  60. package/fesm2022/xxmachina-common-infra-external-quick-js.mjs.map +1 -0
  61. package/fesm2022/xxmachina-common-infra-external-resend.mjs +10 -0
  62. package/fesm2022/xxmachina-common-infra-external-resend.mjs.map +1 -0
  63. package/fesm2022/xxmachina-common-infra-external.mjs +36 -0
  64. package/fesm2022/xxmachina-common-infra-external.mjs.map +1 -0
  65. package/fesm2022/xxmachina-common-infra-query-firestore.mjs +34 -0
  66. package/fesm2022/xxmachina-common-infra-query-firestore.mjs.map +1 -0
  67. package/fesm2022/xxmachina-common-infra-query-hasura.mjs +20 -0
  68. package/fesm2022/xxmachina-common-infra-query-hasura.mjs.map +1 -0
  69. package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs +18 -0
  70. package/fesm2022/xxmachina-common-infra-repository-dataconnect.mjs.map +1 -0
  71. package/fesm2022/xxmachina-common-infra-repository-firestore.mjs +74 -0
  72. package/fesm2022/xxmachina-common-infra-repository-firestore.mjs.map +1 -0
  73. package/fesm2022/xxmachina-common-infra-repository-hasura.mjs +41 -0
  74. package/fesm2022/xxmachina-common-infra-repository-hasura.mjs.map +1 -0
  75. package/fesm2022/xxmachina-common-infra-repository-notion.mjs +112 -0
  76. package/fesm2022/xxmachina-common-infra-repository-notion.mjs.map +1 -0
  77. package/fesm2022/xxmachina-common-infra.mjs +377 -0
  78. package/fesm2022/xxmachina-common-infra.mjs.map +1 -0
  79. package/fesm2022/xxmachina-common-stores-firestore.mjs +33 -0
  80. package/fesm2022/xxmachina-common-stores-firestore.mjs.map +1 -0
  81. package/fesm2022/xxmachina-common-stores-hasura.mjs +32 -0
  82. package/fesm2022/xxmachina-common-stores-hasura.mjs.map +1 -0
  83. package/fesm2022/xxmachina-common-stores.mjs +16 -0
  84. package/fesm2022/xxmachina-common-stores.mjs.map +1 -0
  85. package/fesm2022/xxmachina-common-usecase-assistant.mjs +67 -0
  86. package/fesm2022/xxmachina-common-usecase-assistant.mjs.map +1 -0
  87. package/fesm2022/xxmachina-common-usecase-database.mjs +95 -0
  88. package/fesm2022/xxmachina-common-usecase-database.mjs.map +1 -0
  89. package/fesm2022/xxmachina-common-usecase-graphql.mjs +51 -0
  90. package/fesm2022/xxmachina-common-usecase-graphql.mjs.map +1 -0
  91. package/fesm2022/xxmachina-common-usecase-invoice.mjs +67 -0
  92. package/fesm2022/xxmachina-common-usecase-invoice.mjs.map +1 -0
  93. package/fesm2022/xxmachina-common-usecase-link.mjs +26 -0
  94. package/fesm2022/xxmachina-common-usecase-link.mjs.map +1 -0
  95. package/fesm2022/xxmachina-common-usecase-order.mjs +29 -0
  96. package/fesm2022/xxmachina-common-usecase-order.mjs.map +1 -0
  97. package/fesm2022/xxmachina-common-usecase-project.mjs +35 -0
  98. package/fesm2022/xxmachina-common-usecase-project.mjs.map +1 -0
  99. package/fesm2022/xxmachina-common-usecase-spec.mjs +45 -0
  100. package/fesm2022/xxmachina-common-usecase-spec.mjs.map +1 -0
  101. package/fesm2022/xxmachina-common-usecase.mjs +198 -0
  102. package/fesm2022/xxmachina-common-usecase.mjs.map +1 -0
  103. package/{utils/crypto.js → fesm2022/xxmachina-common-utils-crypto.mjs} +10 -12
  104. package/fesm2022/xxmachina-common-utils-crypto.mjs.map +1 -0
  105. package/{utils/extract-display-fields.js → fesm2022/xxmachina-common-utils.mjs} +7 -4
  106. package/fesm2022/xxmachina-common-utils.mjs.map +1 -0
  107. package/fesm2022/xxmachina-common.mjs +6 -0
  108. package/fesm2022/xxmachina-common.mjs.map +1 -0
  109. package/index.d.ts +1 -0
  110. package/{infrastructure → infra}/converters/google/google.converter.d.ts +4 -1
  111. package/{infrastructure → infra}/external/external.config.d.ts +2 -2
  112. package/{infrastructure → infra}/external/external.service.d.ts +4 -1
  113. package/{infrastructure → infra}/external/quick-js/quick-js.service.d.ts +3 -0
  114. package/infra/external/resend/resend.service.d.ts +2 -0
  115. package/{infrastructure → infra}/external/resend/resend.service.impl.d.ts +4 -8
  116. package/{infrastructure → infra}/infrastructure.config.d.ts +5 -5
  117. package/{infrastructure → infra}/infrastructure.service.d.ts +3 -0
  118. package/infra/query/firestore/index.d.ts +2 -0
  119. package/{infrastructure → infra}/query/firestore/query/query.query.d.ts +3 -0
  120. package/{infrastructure → infra}/query/firestore/resource/resource.query.d.ts +3 -0
  121. package/infra/query/hasura/index.d.ts +1 -0
  122. package/infra/query/hasura/resource/resource.query.d.ts +6 -0
  123. package/infra/repository/dataconnect/index.d.ts +2 -0
  124. package/{infrastructure → infra}/repository/dataconnect/invoice/invoice.repository.impl.d.ts +4 -1
  125. package/{infrastructure → infra}/repository/dataconnect/order/order.repository.impl.d.ts +4 -1
  126. package/infra/repository/firestore/firestore.repository.d.ts +8 -0
  127. package/infra/repository/firestore/index.d.ts +3 -0
  128. package/infra/repository/firestore/link/google/google.repository.d.ts +10 -0
  129. package/infra/repository/firestore/link/link.repository.d.ts +8 -0
  130. package/{infrastructure → infra}/repository/firestore/query/query.repository.d.ts +4 -1
  131. package/{infrastructure → infra}/repository/firestore/resource/resource.repository.d.ts +4 -1
  132. package/infra/repository/hasura/index.d.ts +2 -0
  133. package/{infrastructure → infra}/repository/hasura/query/query.repository.d.ts +3 -0
  134. package/{infrastructure → infra}/repository/hasura/resource/resource.repository.d.ts +3 -0
  135. package/{infrastructure → infra}/repository/notion/contract/contract.repository.d.ts +4 -1
  136. package/infra/repository/notion/index.d.ts +6 -0
  137. package/{infrastructure → infra}/repository/notion/invoice/invoice.repository.d.ts +4 -1
  138. package/{infrastructure → infra}/repository/notion/notion.repository.d.ts +3 -0
  139. package/{infrastructure → infra}/repository/notion/order/order.repository.d.ts +4 -1
  140. package/{infrastructure → infra}/repository/notion/partner/partner.repository.d.ts +4 -1
  141. package/{infrastructure → infra}/repository/redis/operator/operator.repository.d.ts +3 -0
  142. package/{infrastructure → infra}/repository/redis/project/project.repository.d.ts +3 -0
  143. package/{infrastructure → infra}/repository/redis/redis.service.d.ts +3 -0
  144. package/{infrastructure → infra}/repository/redis/spec/spec.repository.d.ts +5 -3
  145. package/infra/repository/redis/system/system.repository.d.ts +6 -0
  146. package/{infrastructure → infra}/repository/repository.config.d.ts +4 -4
  147. package/{infrastructure → infra}/repository/repository.service.d.ts +3 -0
  148. package/package.json +199 -13
  149. package/stores/firestore/firestore.store.d.ts +12 -0
  150. package/stores/firestore/index.d.ts +1 -0
  151. package/stores/hasura/hasura.store.d.ts +12 -0
  152. package/stores/hasura/index.d.ts +1 -0
  153. package/stores/index.d.ts +4 -28
  154. package/usecase/assistant/assistant.service.d.ts +4 -1
  155. package/usecase/database/database.service.d.ts +3 -0
  156. package/usecase/graphql/graphql.service.d.ts +3 -0
  157. package/usecase/invoice/invoice.service.d.ts +9 -13
  158. package/usecase/link/link.service.d.ts +5 -2
  159. package/usecase/order/order.service.d.ts +5 -2
  160. package/usecase/project/project.service.d.ts +4 -1
  161. package/usecase/spec/spec.service.d.ts +4 -1
  162. package/usecase/usecase.service.d.ts +3 -0
  163. package/utils/crypto/index.d.ts +1 -0
  164. package/README.md +0 -11
  165. package/_shared/auth/auth.module.js +0 -22
  166. package/_shared/auth/auth.module.js.map +0 -1
  167. package/_shared/auth/index.js +0 -5
  168. package/_shared/auth/index.js.map +0 -1
  169. package/_shared/auth/passports/anonymous/anonymous.strategy.js +0 -19
  170. package/_shared/auth/passports/anonymous/anonymous.strategy.js.map +0 -1
  171. package/_shared/auth/passports/anonymous/index.js +0 -5
  172. package/_shared/auth/passports/anonymous/index.js.map +0 -1
  173. package/_shared/auth/passports/firebase/firebase.guard.js +0 -23
  174. package/_shared/auth/passports/firebase/firebase.guard.js.map +0 -1
  175. package/_shared/auth/passports/firebase/firebase.strategy.js +0 -22
  176. package/_shared/auth/passports/firebase/firebase.strategy.js.map +0 -1
  177. package/_shared/auth/passports/firebase/index.js +0 -6
  178. package/_shared/auth/passports/firebase/index.js.map +0 -1
  179. package/_shared/auth/passports/internal/index.js +0 -5
  180. package/_shared/auth/passports/internal/index.js.map +0 -1
  181. package/_shared/auth/passports/internal/internal.strategy.js +0 -33
  182. package/_shared/auth/passports/internal/internal.strategy.js.map +0 -1
  183. package/_shared/auth/passports/msal/index.js +0 -6
  184. package/_shared/auth/passports/msal/index.js.map +0 -1
  185. package/_shared/auth/passports/msal/msal.guard.js +0 -13
  186. package/_shared/auth/passports/msal/msal.guard.js.map +0 -1
  187. package/_shared/auth/passports/msal/msal.strategy.js +0 -43
  188. package/_shared/auth/passports/msal/msal.strategy.js.map +0 -1
  189. package/_shared/meta/decorators.js +0 -25
  190. package/_shared/meta/decorators.js.map +0 -1
  191. package/_shared/meta/redis/index.js +0 -6
  192. package/_shared/meta/redis/index.js.map +0 -1
  193. package/_shared/meta/redis/redis.config.js +0 -10
  194. package/_shared/meta/redis/redis.config.js.map +0 -1
  195. package/_shared/meta/redis/redis.repository.js +0 -108
  196. package/_shared/meta/redis/redis.repository.js.map +0 -1
  197. package/auth/auth.service.js +0 -12
  198. package/auth/auth.service.js.map +0 -1
  199. package/auth/index.js +0 -5
  200. package/auth/index.js.map +0 -1
  201. package/azure-auth/auth.di.js +0 -56
  202. package/azure-auth/auth.di.js.map +0 -1
  203. package/azure-auth/auth.service.js +0 -115
  204. package/azure-auth/auth.service.js.map +0 -1
  205. package/azure-auth/index.js +0 -6
  206. package/azure-auth/index.js.map +0 -1
  207. package/domain/builder/command/command.builder.js +0 -30
  208. package/domain/builder/command/command.builder.js.map +0 -1
  209. package/domain/builder/command/index.js +0 -5
  210. package/domain/builder/command/index.js.map +0 -1
  211. package/domain/builder/command-action/command-action.builder.js +0 -139
  212. package/domain/builder/command-action/command-action.builder.js.map +0 -1
  213. package/domain/builder/command-action/index.js +0 -5
  214. package/domain/builder/command-action/index.js.map +0 -1
  215. package/domain/builder/er/er.builder.js +0 -112
  216. package/domain/builder/er/er.builder.js.map +0 -1
  217. package/domain/builder/er/index.js +0 -5
  218. package/domain/builder/er/index.js.map +0 -1
  219. package/domain/builder/screen-item/index.js +0 -5
  220. package/domain/builder/screen-item/index.js.map +0 -1
  221. package/domain/builder/screen-item/screen-item.builder.js.map +0 -1
  222. package/domain/index.js +0 -5
  223. package/domain/index.js.map +0 -1
  224. package/domain/invoice/builders/email/email.builder.js +0 -29
  225. package/domain/invoice/builders/email/email.builder.js.map +0 -1
  226. package/domain/invoice/builders/email/index.js +0 -5
  227. package/domain/invoice/builders/email/index.js.map +0 -1
  228. package/domain/invoice/builders/message/index.js +0 -5
  229. package/domain/invoice/builders/message/index.js.map +0 -1
  230. package/domain/invoice/builders/message/message.builder.js +0 -43
  231. package/domain/invoice/builders/message/message.builder.js.map +0 -1
  232. package/domain/invoice/builders/title/index.js +0 -5
  233. package/domain/invoice/builders/title/index.js.map +0 -1
  234. package/domain/invoice/builders/title/title.builder.js +0 -11
  235. package/domain/invoice/builders/title/title.builder.js.map +0 -1
  236. package/domain/invoice/models/backoffice/contract.js +0 -50
  237. package/domain/invoice/models/backoffice/contract.js.map +0 -1
  238. package/domain/invoice/models/backoffice/index.js +0 -9
  239. package/domain/invoice/models/backoffice/index.js.map +0 -1
  240. package/domain/invoice/models/backoffice/invoice-mail.js +0 -7
  241. package/domain/invoice/models/backoffice/invoice-mail.js.map +0 -1
  242. package/domain/invoice/models/backoffice/invoice.js +0 -91
  243. package/domain/invoice/models/backoffice/invoice.js.map +0 -1
  244. package/domain/invoice/models/backoffice/order.js +0 -157
  245. package/domain/invoice/models/backoffice/order.js.map +0 -1
  246. package/domain/invoice/models/backoffice/partner.js +0 -96
  247. package/domain/invoice/models/backoffice/partner.js.map +0 -1
  248. package/domain/invoice/models/index.js +0 -5
  249. package/domain/invoice/models/index.js.map +0 -1
  250. package/domain/models/agent/assistant.js +0 -31
  251. package/domain/models/agent/assistant.js.map +0 -1
  252. package/domain/models/agent/index.js +0 -5
  253. package/domain/models/agent/index.js.map +0 -1
  254. package/domain/models/bookmarklet/bookmarklet.js +0 -34
  255. package/domain/models/bookmarklet/bookmarklet.js.map +0 -1
  256. package/domain/models/bookmarklet/index.js +0 -5
  257. package/domain/models/bookmarklet/index.js.map +0 -1
  258. package/domain/models/calendar-utils.d.ts +0 -5
  259. package/domain/models/calendar-utils.js +0 -43
  260. package/domain/models/calendar-utils.js.map +0 -1
  261. package/domain/models/command/command.helper.js +0 -14
  262. package/domain/models/command/command.helper.js.map +0 -1
  263. package/domain/models/command/command.js +0 -40
  264. package/domain/models/command/command.js.map +0 -1
  265. package/domain/models/command/index.js +0 -6
  266. package/domain/models/command/index.js.map +0 -1
  267. package/domain/models/database/database.js +0 -7
  268. package/domain/models/database/database.js.map +0 -1
  269. package/domain/models/database/index.js +0 -5
  270. package/domain/models/database/index.js.map +0 -1
  271. package/domain/models/endpoint/endpoint.helper.js +0 -21
  272. package/domain/models/endpoint/endpoint.helper.js.map +0 -1
  273. package/domain/models/endpoint/index.js +0 -5
  274. package/domain/models/endpoint/index.js.map +0 -1
  275. package/domain/models/index.js +0 -12
  276. package/domain/models/index.js.map +0 -1
  277. package/domain/models/links/google/google.js +0 -47
  278. package/domain/models/links/google/google.js.map +0 -1
  279. package/domain/models/links/google/index.js +0 -5
  280. package/domain/models/links/google/index.js.map +0 -1
  281. package/domain/models/openapi/index.js +0 -6
  282. package/domain/models/openapi/index.js.map +0 -1
  283. package/domain/models/openapi/openapi.js +0 -87
  284. package/domain/models/openapi/openapi.js.map +0 -1
  285. package/domain/models/openapi/openapi.schema.js +0 -3
  286. package/domain/models/openapi/openapi.schema.js.map +0 -1
  287. package/domain/models/operators/assistancts/base.js +0 -13
  288. package/domain/models/operators/assistancts/base.js.map +0 -1
  289. package/domain/models/operators/assistancts/index.js +0 -5
  290. package/domain/models/operators/assistancts/index.js.map +0 -1
  291. package/domain/models/operators/base.js +0 -10
  292. package/domain/models/operators/base.js.map +0 -1
  293. package/domain/models/operators/index.js +0 -8
  294. package/domain/models/operators/index.js.map +0 -1
  295. package/domain/models/operators/systems/base.js +0 -3
  296. package/domain/models/operators/systems/base.js.map +0 -1
  297. package/domain/models/operators/systems/graphql.js +0 -3
  298. package/domain/models/operators/systems/graphql.js.map +0 -1
  299. package/domain/models/operators/systems/index.js +0 -7
  300. package/domain/models/operators/systems/index.js.map +0 -1
  301. package/domain/models/operators/systems/rest.js +0 -3
  302. package/domain/models/operators/systems/rest.js.map +0 -1
  303. package/domain/models/operators/workflows/index.js +0 -5
  304. package/domain/models/operators/workflows/index.js.map +0 -1
  305. package/domain/models/operators/workflows/workflow.js +0 -3
  306. package/domain/models/operators/workflows/workflow.js.map +0 -1
  307. package/domain/models/project.js +0 -9
  308. package/domain/models/project.js.map +0 -1
  309. package/domain/models/query/index.js +0 -6
  310. package/domain/models/query/index.js.map +0 -1
  311. package/domain/models/query/query.helper.js +0 -172
  312. package/domain/models/query/query.helper.js.map +0 -1
  313. package/domain/models/query/query.js +0 -122
  314. package/domain/models/query/query.js.map +0 -1
  315. package/domain/models/resource/index.js +0 -6
  316. package/domain/models/resource/index.js.map +0 -1
  317. package/domain/models/resource/resource.helper.js +0 -16
  318. package/domain/models/resource/resource.helper.js.map +0 -1
  319. package/domain/models/resource/resource.js +0 -73
  320. package/domain/models/resource/resource.js.map +0 -1
  321. package/domain/models/scheduler/index.js +0 -5
  322. package/domain/models/scheduler/index.js.map +0 -1
  323. package/domain/models/scheduler/schedule.js +0 -89
  324. package/domain/models/scheduler/schedule.js.map +0 -1
  325. package/domain/models/screen-item/index.js +0 -5
  326. package/domain/models/screen-item/index.js.map +0 -1
  327. package/domain/models/screen-item/screen-item.js +0 -3
  328. package/domain/models/screen-item/screen-item.js.map +0 -1
  329. package/domain/models/spec.js +0 -3
  330. package/domain/models/spec.js.map +0 -1
  331. package/domain/resolvers/index.js +0 -5
  332. package/domain/resolvers/index.js.map +0 -1
  333. package/domain/resolvers/invoice.resolver.js +0 -31
  334. package/domain/resolvers/invoice.resolver.js.map +0 -1
  335. package/infrastructure/converters/bookmarklet/bookmarklet.converter.d.ts +0 -0
  336. package/infrastructure/converters/bookmarklet/bookmarklet.converter.js +0 -1
  337. package/infrastructure/converters/bookmarklet/bookmarklet.converter.js.map +0 -1
  338. package/infrastructure/converters/google/google.converter.js +0 -27
  339. package/infrastructure/converters/google/google.converter.js.map +0 -1
  340. package/infrastructure/converters/google/index.js +0 -5
  341. package/infrastructure/converters/google/index.js.map +0 -1
  342. package/infrastructure/external/data-connect/data-connect.service.impl.d.ts +0 -7
  343. package/infrastructure/external/data-connect/data-connect.service.impl.js +0 -20
  344. package/infrastructure/external/data-connect/data-connect.service.impl.js.map +0 -1
  345. package/infrastructure/external/data-connect/data-connect.service.js +0 -11
  346. package/infrastructure/external/data-connect/data-connect.service.js.map +0 -1
  347. package/infrastructure/external/data-connect/index.js +0 -5
  348. package/infrastructure/external/data-connect/index.js.map +0 -1
  349. package/infrastructure/external/external.config.js +0 -13
  350. package/infrastructure/external/external.config.js.map +0 -1
  351. package/infrastructure/external/external.service.js +0 -23
  352. package/infrastructure/external/external.service.js.map +0 -1
  353. package/infrastructure/external/index.js +0 -6
  354. package/infrastructure/external/index.js.map +0 -1
  355. package/infrastructure/external/quick-js/index.js +0 -5
  356. package/infrastructure/external/quick-js/index.js.map +0 -1
  357. package/infrastructure/external/quick-js/quick-js.service.js +0 -44
  358. package/infrastructure/external/quick-js/quick-js.service.js.map +0 -1
  359. package/infrastructure/external/resend/index.js +0 -5
  360. package/infrastructure/external/resend/index.js.map +0 -1
  361. package/infrastructure/external/resend/resend.service.d.ts +0 -9
  362. package/infrastructure/external/resend/resend.service.impl.js +0 -27
  363. package/infrastructure/external/resend/resend.service.impl.js.map +0 -1
  364. package/infrastructure/external/resend/resend.service.js +0 -6
  365. package/infrastructure/external/resend/resend.service.js.map +0 -1
  366. package/infrastructure/index.js +0 -6
  367. package/infrastructure/index.js.map +0 -1
  368. package/infrastructure/infrastructure.config.js +0 -12
  369. package/infrastructure/infrastructure.config.js.map +0 -1
  370. package/infrastructure/infrastructure.service.js +0 -20
  371. package/infrastructure/infrastructure.service.js.map +0 -1
  372. package/infrastructure/query/firestore/query/index.js +0 -5
  373. package/infrastructure/query/firestore/query/index.js.map +0 -1
  374. package/infrastructure/query/firestore/query/query.query.js +0 -20
  375. package/infrastructure/query/firestore/query/query.query.js.map +0 -1
  376. package/infrastructure/query/firestore/resource/index.js +0 -5
  377. package/infrastructure/query/firestore/resource/index.js.map +0 -1
  378. package/infrastructure/query/firestore/resource/resource.query.js +0 -20
  379. package/infrastructure/query/firestore/resource/resource.query.js.map +0 -1
  380. package/infrastructure/query/hasura/resource/index.js +0 -5
  381. package/infrastructure/query/hasura/resource/index.js.map +0 -1
  382. package/infrastructure/query/hasura/resource/resource.query.d.ts +0 -3
  383. package/infrastructure/query/hasura/resource/resource.query.js +0 -14
  384. package/infrastructure/query/hasura/resource/resource.query.js.map +0 -1
  385. package/infrastructure/repository/dataconnect/invoice/index.js +0 -5
  386. package/infrastructure/repository/dataconnect/invoice/index.js.map +0 -1
  387. package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js +0 -54
  388. package/infrastructure/repository/dataconnect/invoice/invoice.repository.impl.js.map +0 -1
  389. package/infrastructure/repository/dataconnect/invoice/invoice.repository.js +0 -11
  390. package/infrastructure/repository/dataconnect/invoice/invoice.repository.js.map +0 -1
  391. package/infrastructure/repository/dataconnect/order/index.js +0 -5
  392. package/infrastructure/repository/dataconnect/order/index.js.map +0 -1
  393. package/infrastructure/repository/dataconnect/order/order.repository.impl.js +0 -74
  394. package/infrastructure/repository/dataconnect/order/order.repository.impl.js.map +0 -1
  395. package/infrastructure/repository/dataconnect/order/order.repository.js +0 -11
  396. package/infrastructure/repository/dataconnect/order/order.repository.js.map +0 -1
  397. package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.d.ts +0 -6
  398. package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js +0 -20
  399. package/infrastructure/repository/firestore/bookmarklet/bookmarklet.repository.js.map +0 -1
  400. package/infrastructure/repository/firestore/bookmarklet/index.d.ts +0 -1
  401. package/infrastructure/repository/firestore/bookmarklet/index.js +0 -5
  402. package/infrastructure/repository/firestore/bookmarklet/index.js.map +0 -1
  403. package/infrastructure/repository/firestore/firestore.repository.d.ts +0 -7
  404. package/infrastructure/repository/firestore/firestore.repository.js +0 -20
  405. package/infrastructure/repository/firestore/firestore.repository.js.map +0 -1
  406. package/infrastructure/repository/firestore/index.d.ts +0 -1
  407. package/infrastructure/repository/firestore/index.js +0 -5
  408. package/infrastructure/repository/firestore/index.js.map +0 -1
  409. package/infrastructure/repository/firestore/link/google/google.repository.d.ts +0 -7
  410. package/infrastructure/repository/firestore/link/google/google.repository.js +0 -19
  411. package/infrastructure/repository/firestore/link/google/google.repository.js.map +0 -1
  412. package/infrastructure/repository/firestore/link/google/index.js +0 -5
  413. package/infrastructure/repository/firestore/link/google/index.js.map +0 -1
  414. package/infrastructure/repository/firestore/link/index.js +0 -5
  415. package/infrastructure/repository/firestore/link/index.js.map +0 -1
  416. package/infrastructure/repository/firestore/link/link.repository.d.ts +0 -5
  417. package/infrastructure/repository/firestore/link/link.repository.js +0 -17
  418. package/infrastructure/repository/firestore/link/link.repository.js.map +0 -1
  419. package/infrastructure/repository/firestore/query/index.js +0 -5
  420. package/infrastructure/repository/firestore/query/index.js.map +0 -1
  421. package/infrastructure/repository/firestore/query/query.repository.js +0 -20
  422. package/infrastructure/repository/firestore/query/query.repository.js.map +0 -1
  423. package/infrastructure/repository/firestore/resource/index.js +0 -5
  424. package/infrastructure/repository/firestore/resource/index.js.map +0 -1
  425. package/infrastructure/repository/firestore/resource/resource.repository.js +0 -20
  426. package/infrastructure/repository/firestore/resource/resource.repository.js.map +0 -1
  427. package/infrastructure/repository/hasura/query/index.js +0 -5
  428. package/infrastructure/repository/hasura/query/index.js.map +0 -1
  429. package/infrastructure/repository/hasura/query/query.repository.js +0 -23
  430. package/infrastructure/repository/hasura/query/query.repository.js.map +0 -1
  431. package/infrastructure/repository/hasura/resource/index.js +0 -5
  432. package/infrastructure/repository/hasura/resource/index.js.map +0 -1
  433. package/infrastructure/repository/hasura/resource/resource.repository.js +0 -23
  434. package/infrastructure/repository/hasura/resource/resource.repository.js.map +0 -1
  435. package/infrastructure/repository/index.js +0 -6
  436. package/infrastructure/repository/index.js.map +0 -1
  437. package/infrastructure/repository/notion/contract/contract.config.js +0 -10
  438. package/infrastructure/repository/notion/contract/contract.config.js.map +0 -1
  439. package/infrastructure/repository/notion/contract/contract.repository.js +0 -22
  440. package/infrastructure/repository/notion/contract/contract.repository.js.map +0 -1
  441. package/infrastructure/repository/notion/contract/index.js +0 -6
  442. package/infrastructure/repository/notion/contract/index.js.map +0 -1
  443. package/infrastructure/repository/notion/index.d.ts +0 -2
  444. package/infrastructure/repository/notion/index.js +0 -6
  445. package/infrastructure/repository/notion/index.js.map +0 -1
  446. package/infrastructure/repository/notion/invoice/index.js +0 -6
  447. package/infrastructure/repository/notion/invoice/index.js.map +0 -1
  448. package/infrastructure/repository/notion/invoice/invoice.config.js +0 -10
  449. package/infrastructure/repository/notion/invoice/invoice.config.js.map +0 -1
  450. package/infrastructure/repository/notion/invoice/invoice.repository.js +0 -22
  451. package/infrastructure/repository/notion/invoice/invoice.repository.js.map +0 -1
  452. package/infrastructure/repository/notion/notion.config.js +0 -18
  453. package/infrastructure/repository/notion/notion.config.js.map +0 -1
  454. package/infrastructure/repository/notion/notion.repository.js +0 -26
  455. package/infrastructure/repository/notion/notion.repository.js.map +0 -1
  456. package/infrastructure/repository/notion/order/index.js +0 -5
  457. package/infrastructure/repository/notion/order/index.js.map +0 -1
  458. package/infrastructure/repository/notion/order/order.config.js +0 -10
  459. package/infrastructure/repository/notion/order/order.config.js.map +0 -1
  460. package/infrastructure/repository/notion/order/order.repository.js +0 -22
  461. package/infrastructure/repository/notion/order/order.repository.js.map +0 -1
  462. package/infrastructure/repository/notion/partner/index.js +0 -6
  463. package/infrastructure/repository/notion/partner/index.js.map +0 -1
  464. package/infrastructure/repository/notion/partner/partner.config.js +0 -10
  465. package/infrastructure/repository/notion/partner/partner.config.js.map +0 -1
  466. package/infrastructure/repository/notion/partner/partner.repository.js +0 -22
  467. package/infrastructure/repository/notion/partner/partner.repository.js.map +0 -1
  468. package/infrastructure/repository/redis/index.js +0 -6
  469. package/infrastructure/repository/redis/index.js.map +0 -1
  470. package/infrastructure/repository/redis/operator/index.js +0 -5
  471. package/infrastructure/repository/redis/operator/index.js.map +0 -1
  472. package/infrastructure/repository/redis/operator/operator.repository.js +0 -17
  473. package/infrastructure/repository/redis/operator/operator.repository.js.map +0 -1
  474. package/infrastructure/repository/redis/project/index.js +0 -5
  475. package/infrastructure/repository/redis/project/index.js.map +0 -1
  476. package/infrastructure/repository/redis/project/project.repository.js +0 -33
  477. package/infrastructure/repository/redis/project/project.repository.js.map +0 -1
  478. package/infrastructure/repository/redis/redis.config.js +0 -10
  479. package/infrastructure/repository/redis/redis.config.js.map +0 -1
  480. package/infrastructure/repository/redis/redis.service.js +0 -22
  481. package/infrastructure/repository/redis/redis.service.js.map +0 -1
  482. package/infrastructure/repository/redis/spec/index.js +0 -5
  483. package/infrastructure/repository/redis/spec/index.js.map +0 -1
  484. package/infrastructure/repository/redis/spec/spec.repository.js +0 -94
  485. package/infrastructure/repository/redis/spec/spec.repository.js.map +0 -1
  486. package/infrastructure/repository/redis/system/index.js +0 -5
  487. package/infrastructure/repository/redis/system/index.js.map +0 -1
  488. package/infrastructure/repository/redis/system/system.repository.d.ts +0 -3
  489. package/infrastructure/repository/redis/system/system.repository.js +0 -15
  490. package/infrastructure/repository/redis/system/system.repository.js.map +0 -1
  491. package/infrastructure/repository/repository.config.js +0 -12
  492. package/infrastructure/repository/repository.config.js.map +0 -1
  493. package/infrastructure/repository/repository.service.js +0 -20
  494. package/infrastructure/repository/repository.service.js.map +0 -1
  495. package/stores/index.js +0 -66
  496. package/stores/index.js.map +0 -1
  497. package/usecase/assistant/assistant.service.js +0 -72
  498. package/usecase/assistant/assistant.service.js.map +0 -1
  499. package/usecase/assistant/index.js +0 -5
  500. package/usecase/assistant/index.js.map +0 -1
  501. package/usecase/database/database.service.js +0 -103
  502. package/usecase/database/database.service.js.map +0 -1
  503. package/usecase/database/index.js +0 -5
  504. package/usecase/database/index.js.map +0 -1
  505. package/usecase/graphql/graphql.service.js +0 -49
  506. package/usecase/graphql/graphql.service.js.map +0 -1
  507. package/usecase/graphql/index.js +0 -5
  508. package/usecase/graphql/index.js.map +0 -1
  509. package/usecase/index.js +0 -5
  510. package/usecase/index.js.map +0 -1
  511. package/usecase/invoice/index.js +0 -5
  512. package/usecase/invoice/index.js.map +0 -1
  513. package/usecase/invoice/invoice.service.js +0 -69
  514. package/usecase/invoice/invoice.service.js.map +0 -1
  515. package/usecase/link/index.js +0 -5
  516. package/usecase/link/index.js.map +0 -1
  517. package/usecase/link/link.service.js +0 -20
  518. package/usecase/link/link.service.js.map +0 -1
  519. package/usecase/order/index.js +0 -5
  520. package/usecase/order/index.js.map +0 -1
  521. package/usecase/order/order.service.js +0 -27
  522. package/usecase/order/order.service.js.map +0 -1
  523. package/usecase/project/index.js +0 -5
  524. package/usecase/project/index.js.map +0 -1
  525. package/usecase/project/project.service.js +0 -37
  526. package/usecase/project/project.service.js.map +0 -1
  527. package/usecase/spec/index.js +0 -5
  528. package/usecase/spec/index.js.map +0 -1
  529. package/usecase/spec/spec.service.js +0 -49
  530. package/usecase/spec/spec.service.js.map +0 -1
  531. package/usecase/usecase.service.js +0 -24
  532. package/usecase/usecase.service.js.map +0 -1
  533. package/utils/crypto.js.map +0 -1
  534. package/utils/extract-display-fields.js.map +0 -1
  535. package/utils/index.js +0 -5
  536. package/utils/index.js.map +0 -1
  537. /package/{domain/invoice → domain-invoice}/builders/email/index.d.ts +0 -0
  538. /package/{domain/invoice → domain-invoice}/builders/message/index.d.ts +0 -0
  539. /package/{domain/invoice → domain-invoice}/builders/title/index.d.ts +0 -0
  540. /package/{domain/invoice → domain-invoice}/models/backoffice/contract.d.ts +0 -0
  541. /package/{domain/invoice → domain-invoice}/models/backoffice/index.d.ts +0 -0
  542. /package/{domain/invoice → domain-invoice}/models/backoffice/invoice-mail.d.ts +0 -0
  543. /package/{domain/invoice → domain-invoice}/models/index.d.ts +0 -0
  544. /package/{domain → domain-invoice}/resolvers/index.d.ts +0 -0
  545. /package/{infrastructure → infra}/converters/google/index.d.ts +0 -0
  546. /package/{infrastructure → infra}/external/data-connect/data-connect.service.d.ts +0 -0
  547. /package/{infrastructure → infra}/external/data-connect/index.d.ts +0 -0
  548. /package/{infrastructure → infra}/external/index.d.ts +0 -0
  549. /package/{infrastructure → infra}/external/quick-js/index.d.ts +0 -0
  550. /package/{infrastructure → infra}/external/resend/index.d.ts +0 -0
  551. /package/{infrastructure → infra}/index.d.ts +0 -0
  552. /package/{infrastructure → infra}/query/firestore/query/index.d.ts +0 -0
  553. /package/{infrastructure → infra}/query/firestore/resource/index.d.ts +0 -0
  554. /package/{infrastructure → infra}/query/hasura/resource/index.d.ts +0 -0
  555. /package/{infrastructure → infra}/repository/dataconnect/invoice/index.d.ts +0 -0
  556. /package/{infrastructure → infra}/repository/dataconnect/invoice/invoice.repository.d.ts +0 -0
  557. /package/{infrastructure → infra}/repository/dataconnect/order/index.d.ts +0 -0
  558. /package/{infrastructure → infra}/repository/dataconnect/order/order.repository.d.ts +0 -0
  559. /package/{infrastructure → infra}/repository/firestore/link/google/index.d.ts +0 -0
  560. /package/{infrastructure → infra}/repository/firestore/link/index.d.ts +0 -0
  561. /package/{infrastructure → infra}/repository/firestore/query/index.d.ts +0 -0
  562. /package/{infrastructure → infra}/repository/firestore/resource/index.d.ts +0 -0
  563. /package/{infrastructure → infra}/repository/hasura/query/index.d.ts +0 -0
  564. /package/{infrastructure → infra}/repository/hasura/resource/index.d.ts +0 -0
  565. /package/{infrastructure → infra}/repository/index.d.ts +0 -0
  566. /package/{infrastructure → infra}/repository/notion/contract/contract.config.d.ts +0 -0
  567. /package/{infrastructure → infra}/repository/notion/contract/index.d.ts +0 -0
  568. /package/{infrastructure → infra}/repository/notion/invoice/index.d.ts +0 -0
  569. /package/{infrastructure → infra}/repository/notion/invoice/invoice.config.d.ts +0 -0
  570. /package/{infrastructure → infra}/repository/notion/notion.config.d.ts +0 -0
  571. /package/{infrastructure → infra}/repository/notion/order/index.d.ts +0 -0
  572. /package/{infrastructure → infra}/repository/notion/order/order.config.d.ts +0 -0
  573. /package/{infrastructure → infra}/repository/notion/partner/index.d.ts +0 -0
  574. /package/{infrastructure → infra}/repository/notion/partner/partner.config.d.ts +0 -0
  575. /package/{infrastructure → infra}/repository/redis/index.d.ts +0 -0
  576. /package/{infrastructure → infra}/repository/redis/operator/index.d.ts +0 -0
  577. /package/{infrastructure → infra}/repository/redis/project/index.d.ts +0 -0
  578. /package/{infrastructure → infra}/repository/redis/redis.config.d.ts +0 -0
  579. /package/{infrastructure → infra}/repository/redis/spec/index.d.ts +0 -0
  580. /package/{infrastructure → infra}/repository/redis/system/index.d.ts +0 -0
  581. /package/utils/{crypto.d.ts → crypto/crypto.d.ts} +0 -0
@@ -0,0 +1,112 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, Injectable } from '@angular/core';
3
+ import { NotionRepository as NotionRepository$1, createConverter, NOTION_ACCESS_TOKEN, provideNotionConfig as provideNotionConfig$1 } from '@nx-ddd/notion';
4
+ import { Contract, Invoice, Order, Partner } from '@xxmachina/common/domain-invoice';
5
+
6
+ const CONTRACT_CONFIG = new InjectionToken('CONTRACT_CONFIG');
7
+ function provideContractConfig(config) {
8
+ return { provide: CONTRACT_CONFIG, useValue: config };
9
+ }
10
+
11
+ class ContractRepository extends NotionRepository$1 {
12
+ converter = createConverter(Contract);
13
+ config = inject(CONTRACT_CONFIG);
14
+ accessToken = inject(NOTION_ACCESS_TOKEN);
15
+ databaseId = this.config.databaseId;
16
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ContractRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
17
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ContractRepository, providedIn: 'root' });
18
+ }
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ContractRepository, decorators: [{
20
+ type: Injectable,
21
+ args: [{ providedIn: 'root' }]
22
+ }] });
23
+
24
+ const INVOICE_CONFIG = new InjectionToken('Invoice Config');
25
+ function provideInvoiceConfig(config) {
26
+ return { provide: INVOICE_CONFIG, useValue: config };
27
+ }
28
+
29
+ class InvoiceRepository extends NotionRepository$1 {
30
+ converter = createConverter(Invoice);
31
+ config = inject(INVOICE_CONFIG);
32
+ accessToken = inject(NOTION_ACCESS_TOKEN);
33
+ databaseId = this.config.databaseId;
34
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: InvoiceRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
35
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: InvoiceRepository, providedIn: 'root' });
36
+ }
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: InvoiceRepository, decorators: [{
38
+ type: Injectable,
39
+ args: [{ providedIn: 'root' }]
40
+ }] });
41
+
42
+ const ORDER_CONFIG = new InjectionToken('ORDER_CONFIG');
43
+ function provideOrderConfig(config) {
44
+ return { provide: ORDER_CONFIG, useValue: config };
45
+ }
46
+
47
+ class OrderRepository extends NotionRepository$1 {
48
+ converter = createConverter(Order);
49
+ config = inject(ORDER_CONFIG);
50
+ accessToken = inject(NOTION_ACCESS_TOKEN);
51
+ databaseId = this.config.databaseId;
52
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OrderRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
53
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OrderRepository, providedIn: 'root' });
54
+ }
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OrderRepository, decorators: [{
56
+ type: Injectable,
57
+ args: [{ providedIn: 'root' }]
58
+ }] });
59
+
60
+ const PARTNER_CONFIG = new InjectionToken('PARTNER_CONFIG');
61
+ function providePartnerConfig(config) {
62
+ return { provide: PARTNER_CONFIG, useValue: config };
63
+ }
64
+
65
+ class PartnerRepository extends NotionRepository$1 {
66
+ converter = createConverter(Partner);
67
+ config = inject(PARTNER_CONFIG);
68
+ accessToken = inject(NOTION_ACCESS_TOKEN);
69
+ databaseId = this.config.databaseId;
70
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PartnerRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
71
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PartnerRepository, providedIn: 'root' });
72
+ }
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PartnerRepository, decorators: [{
74
+ type: Injectable,
75
+ args: [{ providedIn: 'root' }]
76
+ }] });
77
+
78
+ function provideNotionConfig(config) {
79
+ return [
80
+ provideContractConfig(config.contract),
81
+ provideInvoiceConfig(config.invoice),
82
+ provideOrderConfig(config.order),
83
+ providePartnerConfig(config.partner),
84
+ provideNotionConfig$1({ accessToken: config.accessToken }),
85
+ ];
86
+ }
87
+
88
+ class NotionRepository {
89
+ contract;
90
+ invoice;
91
+ order;
92
+ partner;
93
+ constructor(contract, invoice, order, partner) {
94
+ this.contract = contract;
95
+ this.invoice = invoice;
96
+ this.order = order;
97
+ this.partner = partner;
98
+ }
99
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NotionRepository, deps: [{ token: ContractRepository }, { token: InvoiceRepository }, { token: OrderRepository }, { token: PartnerRepository }], target: i0.ɵɵFactoryTarget.Injectable });
100
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NotionRepository, providedIn: 'root' });
101
+ }
102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NotionRepository, decorators: [{
103
+ type: Injectable,
104
+ args: [{ providedIn: 'root' }]
105
+ }], ctorParameters: () => [{ type: ContractRepository }, { type: InvoiceRepository }, { type: OrderRepository }, { type: PartnerRepository }] });
106
+
107
+ /**
108
+ * Generated bundle index. Do not edit.
109
+ */
110
+
111
+ export { CONTRACT_CONFIG, ContractRepository, INVOICE_CONFIG, InvoiceRepository, NotionRepository, OrderRepository, PARTNER_CONFIG, PartnerRepository, provideContractConfig, provideInvoiceConfig, provideNotionConfig, providePartnerConfig };
112
+ //# sourceMappingURL=xxmachina-common-infra-repository-notion.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xxmachina-common-infra-repository-notion.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/contract/contract.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/contract/contract.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/invoice/invoice.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/invoice/invoice.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/order/order.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/order/order.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/partner/partner.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/partner/partner.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/notion.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/notion.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/xxmachina-common-infra-repository-notion.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport interface ContractConfig {\n databaseId: string;\n}\n\nexport const CONTRACT_CONFIG = new InjectionToken<ContractConfig>('CONTRACT_CONFIG');\n\nexport function provideContractConfig(config: ContractConfig) {\n return { provide: CONTRACT_CONFIG, useValue: config };\n}\n","import { Injectable, inject } from \"@angular/core\";\nimport { NOTION_ACCESS_TOKEN, NotionRepository, createConverter } from \"@nx-ddd/notion\";\nimport { Contract } from \"@xxmachina/common/domain-invoice\";\nimport { CONTRACT_CONFIG } from \"./contract.config\";\n\n@Injectable({providedIn: 'root'})\nexport class ContractRepository extends NotionRepository<Contract> {\n protected converter = createConverter(Contract);\n protected config = inject(CONTRACT_CONFIG);\n protected accessToken = inject(NOTION_ACCESS_TOKEN);\n protected databaseId = this.config.databaseId;\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport interface InvoiceConfig {\n databaseId: string;\n}\n\nexport const INVOICE_CONFIG = new InjectionToken<InvoiceConfig>('Invoice Config');\n\nexport function provideInvoiceConfig(config: InvoiceConfig) {\n return { provide: INVOICE_CONFIG, useValue: config };\n}\n","import { inject, Injectable } from \"@angular/core\";\nimport { NOTION_ACCESS_TOKEN, NotionRepository, createConverter } from \"@nx-ddd/notion\";\nimport { Invoice } from \"@xxmachina/common/domain-invoice\";\nimport { INVOICE_CONFIG } from \"./invoice.config\";\n\n@Injectable({providedIn: 'root'})\nexport class InvoiceRepository extends NotionRepository<Invoice> {\n protected converter = createConverter(Invoice);\n protected config = inject(INVOICE_CONFIG);\n protected accessToken = inject(NOTION_ACCESS_TOKEN);\n protected databaseId = this.config.databaseId;\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport interface OrderConfig {\n databaseId: string;\n}\n\nexport const ORDER_CONFIG = new InjectionToken<OrderConfig>('ORDER_CONFIG');\n\nexport function provideOrderConfig(config: OrderConfig) {\n return { provide: ORDER_CONFIG, useValue: config };\n}\n","import { inject, Injectable } from \"@angular/core\";\nimport { NOTION_ACCESS_TOKEN, NotionRepository, createConverter } from \"@nx-ddd/notion\";\nimport { Order } from \"@xxmachina/common/domain-invoice\";\nimport { ORDER_CONFIG } from \"./order.config\";\n\n@Injectable({providedIn: 'root'})\nexport class OrderRepository extends NotionRepository<Order> {\n protected converter = createConverter(Order);\n protected config = inject(ORDER_CONFIG);\n protected accessToken = inject(NOTION_ACCESS_TOKEN);\n protected databaseId = this.config.databaseId;\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport interface PartnerConfig {\n databaseId: string;\n}\n\nexport const PARTNER_CONFIG = new InjectionToken<PartnerConfig>('PARTNER_CONFIG');\n\nexport function providePartnerConfig(config: PartnerConfig) {\n return { provide: PARTNER_CONFIG, useValue: config };\n}\n","import { inject, Injectable } from \"@angular/core\";\nimport { NOTION_ACCESS_TOKEN, NotionRepository, createConverter } from \"@nx-ddd/notion\";\nimport { Partner } from \"@xxmachina/common/domain-invoice\";\nimport { PARTNER_CONFIG } from \"./partner.config\";\n\n@Injectable({providedIn: 'root'})\nexport class PartnerRepository extends NotionRepository<Partner> {\n protected converter = createConverter(Partner);\n protected config = inject(PARTNER_CONFIG);\n protected accessToken = inject(NOTION_ACCESS_TOKEN);\n protected databaseId = this.config.databaseId;\n}\n","import { ContractConfig, provideContractConfig } from \"./contract\";\nimport { InvoiceConfig, provideInvoiceConfig } from \"./invoice\";\nimport { provideOrderConfig } from \"./order/order.config\";\nimport { PartnerConfig, providePartnerConfig } from \"./partner\";\nimport { provideNotionConfig as _provideNotionConfig } from \"@nx-ddd/notion\";\n\nexport interface NotionConfig {\n accessToken: string;\n contract: ContractConfig;\n invoice: InvoiceConfig\n order: any;\n partner: PartnerConfig;\n}\n\nexport function provideNotionConfig(config: NotionConfig) {\n return [\n provideContractConfig(config.contract),\n provideInvoiceConfig(config.invoice),\n provideOrderConfig(config.order),\n providePartnerConfig(config.partner),\n _provideNotionConfig({accessToken: config.accessToken }),\n ];\n}\n","import { Injectable } from \"@angular/core\";\nimport { ContractRepository } from \"./contract\";\nimport { InvoiceRepository } from \"./invoice\";\nimport { OrderRepository } from \"./order\";\nimport { PartnerRepository } from \"./partner\";\n\n@Injectable({providedIn: 'root'})\nexport class NotionRepository {\n constructor(\n public contract: ContractRepository,\n public invoice: InvoiceRepository,\n public order: OrderRepository,\n public partner: PartnerRepository,\n ) {}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NotionRepository","_provideNotionConfig","i1.ContractRepository","i2.InvoiceRepository","i3.OrderRepository","i4.PartnerRepository"],"mappings":";;;;;MAMa,eAAe,GAAG,IAAI,cAAc,CAAiB,iBAAiB;AAE7E,SAAU,qBAAqB,CAAC,MAAsB,EAAA;IAC1D,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,EAAE;AACvD;;ACJM,MAAO,kBAAmB,SAAQA,kBAA0B,CAAA;AACtD,IAAA,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC;AACrC,IAAA,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;AAChC,IAAA,WAAW,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACzC,IAAA,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU;uGAJlC,kBAAkB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cADN,MAAM,EAAA,CAAA;;2FAClB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM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,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC;AACpC,QAAA,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC;AAChC,QAAA,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC;QACpCC,qBAAoB,CAAC,EAAC,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC;KACzD;AACH;;MCfa,gBAAgB,CAAA;AAElB,IAAA,QAAA;AACA,IAAA,OAAA;AACA,IAAA,KAAA;AACA,IAAA,OAAA;AAJT,IAAA,WAAA,CACS,QAA4B,EAC5B,OAA0B,EAC1B,KAAsB,EACtB,OAA0B,EAAA;QAH1B,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACR,IAAO,CAAA,OAAA,GAAP,OAAO;QACP,IAAK,CAAA,KAAA,GAAL,KAAK;QACL,IAAO,CAAA,OAAA,GAAP,OAAO;;uGALL,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAC,kBAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,iBAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,eAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cADJ,MAAM,EAAA,CAAA;;2FAClB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;ACNhC;;AAEG;;;;"}
@@ -0,0 +1,377 @@
1
+ import * as i0 from '@angular/core';
2
+ import { importProvidersFrom, inject, Injectable, InjectionToken } from '@angular/core';
3
+ import { GoogleModule } from '@nx-ddd/google/google.module';
4
+ import { provideOpenAiConfig } from '@nx-ddd/common/infrastructure/externals/openai/impl';
5
+ import { GoogleService } from '@nx-ddd/google';
6
+ import { injectOpenAiService } from '@nx-ddd/common/infrastructure/externals/openai';
7
+ import { injectDataConnectService } from '@xxmachina/common/infra/external/data-connect';
8
+ import { NotionRepository as NotionRepository$1, createConverter, NOTION_ACCESS_TOKEN, provideNotionConfig as provideNotionConfig$1 } from '@nx-ddd/notion';
9
+ import { Contract, Invoice, Order, Partner } from '@xxmachina/common/domain-invoice';
10
+ import { provideRedisConfig as provideRedisConfig$1, RedisRepository, Converter, REDIS_CONFIG } from '@xxmachina/common/_shared/meta/redis';
11
+ import { float32Buffer, bufferFloat32 } from '@xxmachina/common/utils/crypto';
12
+ import { GoogleConverter } from '@xxmachina/common/infra/converters/google';
13
+ import { FirestoreRepository as FirestoreRepository$1 } from '@nx-ddd/firestore/repository';
14
+ import { Query, Resource } from '@xxmachina/common/domain/models';
15
+ import { injectConverter } from '@nx-ddd/firestore';
16
+
17
+ function provideExternalConfig(config) {
18
+ return [
19
+ provideOpenAiConfig(() => config.openAi),
20
+ importProvidersFrom(GoogleModule.forRoot(config.google)),
21
+ ];
22
+ }
23
+
24
+ class ExternalService {
25
+ openai = injectOpenAiService();
26
+ google = inject(GoogleService);
27
+ dataConnect = injectDataConnectService();
28
+ getAiAdapter(aiConfig) {
29
+ return {};
30
+ }
31
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ExternalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
32
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ExternalService, providedIn: 'root' });
33
+ }
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ExternalService, decorators: [{
35
+ type: Injectable,
36
+ args: [{ providedIn: 'root' }]
37
+ }] });
38
+
39
+ const CONTRACT_CONFIG = new InjectionToken('CONTRACT_CONFIG');
40
+ function provideContractConfig(config) {
41
+ return { provide: CONTRACT_CONFIG, useValue: config };
42
+ }
43
+
44
+ class ContractRepository extends NotionRepository$1 {
45
+ converter = createConverter(Contract);
46
+ config = inject(CONTRACT_CONFIG);
47
+ accessToken = inject(NOTION_ACCESS_TOKEN);
48
+ databaseId = this.config.databaseId;
49
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ContractRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
50
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ContractRepository, providedIn: 'root' });
51
+ }
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ContractRepository, decorators: [{
53
+ type: Injectable,
54
+ args: [{ providedIn: 'root' }]
55
+ }] });
56
+
57
+ const INVOICE_CONFIG = new InjectionToken('Invoice Config');
58
+ function provideInvoiceConfig(config) {
59
+ return { provide: INVOICE_CONFIG, useValue: config };
60
+ }
61
+
62
+ class InvoiceRepository extends NotionRepository$1 {
63
+ converter = createConverter(Invoice);
64
+ config = inject(INVOICE_CONFIG);
65
+ accessToken = inject(NOTION_ACCESS_TOKEN);
66
+ databaseId = this.config.databaseId;
67
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: InvoiceRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
68
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: InvoiceRepository, providedIn: 'root' });
69
+ }
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: InvoiceRepository, decorators: [{
71
+ type: Injectable,
72
+ args: [{ providedIn: 'root' }]
73
+ }] });
74
+
75
+ const ORDER_CONFIG = new InjectionToken('ORDER_CONFIG');
76
+ function provideOrderConfig(config) {
77
+ return { provide: ORDER_CONFIG, useValue: config };
78
+ }
79
+
80
+ class OrderRepository extends NotionRepository$1 {
81
+ converter = createConverter(Order);
82
+ config = inject(ORDER_CONFIG);
83
+ accessToken = inject(NOTION_ACCESS_TOKEN);
84
+ databaseId = this.config.databaseId;
85
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OrderRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
86
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OrderRepository, providedIn: 'root' });
87
+ }
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OrderRepository, decorators: [{
89
+ type: Injectable,
90
+ args: [{ providedIn: 'root' }]
91
+ }] });
92
+
93
+ const PARTNER_CONFIG = new InjectionToken('PARTNER_CONFIG');
94
+ function providePartnerConfig(config) {
95
+ return { provide: PARTNER_CONFIG, useValue: config };
96
+ }
97
+
98
+ class PartnerRepository extends NotionRepository$1 {
99
+ converter = createConverter(Partner);
100
+ config = inject(PARTNER_CONFIG);
101
+ accessToken = inject(NOTION_ACCESS_TOKEN);
102
+ databaseId = this.config.databaseId;
103
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PartnerRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
104
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PartnerRepository, providedIn: 'root' });
105
+ }
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: PartnerRepository, decorators: [{
107
+ type: Injectable,
108
+ args: [{ providedIn: 'root' }]
109
+ }] });
110
+
111
+ function provideNotionConfig(config) {
112
+ return [
113
+ provideContractConfig(config.contract),
114
+ provideInvoiceConfig(config.invoice),
115
+ provideOrderConfig(config.order),
116
+ providePartnerConfig(config.partner),
117
+ provideNotionConfig$1({ accessToken: config.accessToken }),
118
+ ];
119
+ }
120
+
121
+ class NotionRepository {
122
+ contract;
123
+ invoice;
124
+ order;
125
+ partner;
126
+ constructor(contract, invoice, order, partner) {
127
+ this.contract = contract;
128
+ this.invoice = invoice;
129
+ this.order = order;
130
+ this.partner = partner;
131
+ }
132
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NotionRepository, deps: [{ token: ContractRepository }, { token: InvoiceRepository }, { token: OrderRepository }, { token: PartnerRepository }], target: i0.ɵɵFactoryTarget.Injectable });
133
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NotionRepository, providedIn: 'root' });
134
+ }
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: NotionRepository, decorators: [{
136
+ type: Injectable,
137
+ args: [{ providedIn: 'root' }]
138
+ }], ctorParameters: () => [{ type: ContractRepository }, { type: InvoiceRepository }, { type: OrderRepository }, { type: PartnerRepository }] });
139
+
140
+ function provideRedisConfig(config) {
141
+ return [
142
+ provideRedisConfig$1(config.redis),
143
+ ];
144
+ }
145
+
146
+ class OperatorRepository extends RedisRepository {
147
+ entityName = 'operator';
148
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OperatorRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
149
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OperatorRepository, providedIn: 'root' });
150
+ }
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OperatorRepository, decorators: [{
152
+ type: Injectable,
153
+ args: [{ providedIn: 'root' }]
154
+ }] });
155
+
156
+ class ProjectConverter extends Converter {
157
+ fromRedis(record) {
158
+ return {
159
+ id: record.id,
160
+ settings: JSON.parse(record.settings),
161
+ };
162
+ }
163
+ toRedis(entity) {
164
+ return {
165
+ id: entity.id,
166
+ settings: JSON.stringify(entity.settings),
167
+ };
168
+ }
169
+ }
170
+ class ProjectRepository extends RedisRepository {
171
+ entityName = 'project';
172
+ converter = new ProjectConverter();
173
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ProjectRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
174
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ProjectRepository, providedIn: 'root' });
175
+ }
176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ProjectRepository, decorators: [{
177
+ type: Injectable,
178
+ args: [{ providedIn: 'root' }]
179
+ }] });
180
+
181
+ const VECTOR_SIZE = new InjectionToken('[@xxmachina/common] VECTOR_SIZE');
182
+ // MEMO(nontangent): Optionalデコレーターが動かないので、ここで初期化する。
183
+ VECTOR_SIZE['Θopt'] = true;
184
+ class SpecRepository extends RedisRepository {
185
+ config = inject(REDIS_CONFIG);
186
+ // constructor(
187
+ // @Optional() @Inject(VECTOR_SIZE) private vectorSize: number,
188
+ // ) {
189
+ // this.vectorSize ??= 1536;
190
+ // }
191
+ entityName = 'spec';
192
+ async create(spec) {
193
+ return super.create({ ...spec, embeddings: this.toBuffer(spec.embeddings) });
194
+ }
195
+ async get(id) {
196
+ return super.get(id).then(spec => ({ ...spec, embeddings: this.fromBuffer(spec.embeddings) }));
197
+ }
198
+ async update(spec) {
199
+ return super.update({ ...spec, embeddings: this.toBuffer(spec.embeddings) });
200
+ }
201
+ get indexName() {
202
+ return `index:${this.entityName}`;
203
+ }
204
+ async makeIndex() {
205
+ // await this.init();
206
+ // await this.client.ft.dropIndex(this.indexName).catch(() => {});
207
+ // await this.client.ft.create(this.indexName, {
208
+ // id: SchemaFieldTypes.TEXT,
209
+ // operatorId: SchemaFieldTypes.TEXT,
210
+ // embeddings: {
211
+ // type: SchemaFieldTypes.VECTOR,
212
+ // ALGORITHM: VectorAlgorithms.HNSW,
213
+ // TYPE: 'FLOAT32',
214
+ // DIM: this.vectorSize,
215
+ // DISTANCE_METRIC: 'COSINE',
216
+ // },
217
+ // });
218
+ }
219
+ async search(operatorId, embeddings, n = 3) {
220
+ const query = `(@operatorId:$OPERATOR_ID)=>[KNN $N @embeddings $BLOB AS score]`;
221
+ const results = await this.client.ft.search(this.indexName, query, {
222
+ PARAMS: {
223
+ BLOB: this.toBuffer(embeddings),
224
+ N: n,
225
+ OPERATOR_ID: operatorId,
226
+ },
227
+ SORTBY: 'score',
228
+ DIALECT: 2,
229
+ RETURN: ['score']
230
+ });
231
+ return Promise.all(results.documents.map(doc => this.get(doc.id.slice(this.entityName.length + 1))));
232
+ }
233
+ toBuffer(embedding) {
234
+ return float32Buffer(embedding);
235
+ }
236
+ fromBuffer(buffer) {
237
+ return bufferFloat32(buffer);
238
+ }
239
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SpecRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
240
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SpecRepository, providedIn: 'root' });
241
+ }
242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SpecRepository, decorators: [{
243
+ type: Injectable,
244
+ args: [{ providedIn: 'root' }]
245
+ }] });
246
+
247
+ class SystemRepository {
248
+ entityName = 'system';
249
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SystemRepository, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
250
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SystemRepository, providedIn: 'root' });
251
+ }
252
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: SystemRepository, decorators: [{
253
+ type: Injectable,
254
+ args: [{ providedIn: 'root' }]
255
+ }] });
256
+
257
+ class RedisService {
258
+ operator = inject(OperatorRepository);
259
+ project = inject(ProjectRepository);
260
+ spec = inject(SpecRepository);
261
+ system = inject(SystemRepository);
262
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RedisService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
263
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RedisService, providedIn: 'root' });
264
+ }
265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RedisService, decorators: [{
266
+ type: Injectable,
267
+ args: [{ providedIn: 'root' }]
268
+ }] });
269
+
270
+ function provideRepositoryConfig(config) {
271
+ return [
272
+ provideNotionConfig(config.notion),
273
+ provideRedisConfig(config.redis),
274
+ ];
275
+ }
276
+
277
+ class GoogleRepository extends FirestoreRepository$1 {
278
+ collectionPath = 'users/:userId/links/:id';
279
+ converter = inject(GoogleConverter);
280
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: GoogleRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
281
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: GoogleRepository, providedIn: 'root' });
282
+ }
283
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: GoogleRepository, decorators: [{
284
+ type: Injectable,
285
+ args: [{ providedIn: 'root' }]
286
+ }] });
287
+
288
+ class LinkRepository {
289
+ google;
290
+ constructor(google) {
291
+ this.google = google;
292
+ }
293
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: LinkRepository, deps: [{ token: GoogleRepository }], target: i0.ɵɵFactoryTarget.Injectable });
294
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: LinkRepository, providedIn: 'root' });
295
+ }
296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: LinkRepository, decorators: [{
297
+ type: Injectable,
298
+ args: [{ providedIn: 'root' }]
299
+ }], ctorParameters: () => [{ type: GoogleRepository }] });
300
+
301
+ class FirestoreRepository {
302
+ link;
303
+ constructor(
304
+ // public bookmarklet: BookmarkletRepository,
305
+ link) {
306
+ this.link = link;
307
+ }
308
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: FirestoreRepository, deps: [{ token: LinkRepository }], target: i0.ɵɵFactoryTarget.Injectable });
309
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: FirestoreRepository, providedIn: 'root' });
310
+ }
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: FirestoreRepository, decorators: [{
312
+ type: Injectable,
313
+ args: [{ providedIn: 'root' }]
314
+ }], ctorParameters: () => [{ type: LinkRepository }] });
315
+
316
+ class QueryFirestoreRepository extends FirestoreRepository$1 {
317
+ collectionPath = 'projects/:projectId/queries/:id';
318
+ converter = injectConverter(Query);
319
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: QueryFirestoreRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
320
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: QueryFirestoreRepository, providedIn: 'root' });
321
+ }
322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: QueryFirestoreRepository, decorators: [{
323
+ type: Injectable,
324
+ args: [{ providedIn: 'root' }]
325
+ }] });
326
+
327
+ class ResourceFirestoreRepository extends FirestoreRepository$1 {
328
+ collectionPath = 'projects/:projectId/resources/:id';
329
+ converter = injectConverter(Resource);
330
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ResourceFirestoreRepository, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
331
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ResourceFirestoreRepository, providedIn: 'root' });
332
+ }
333
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: ResourceFirestoreRepository, decorators: [{
334
+ type: Injectable,
335
+ args: [{ providedIn: 'root' }]
336
+ }] });
337
+
338
+ class RepositoriesService {
339
+ firestore = inject(FirestoreRepository);
340
+ notion = inject(NotionRepository);
341
+ redis = inject(RedisService);
342
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RepositoriesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
343
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RepositoriesService, providedIn: 'root' });
344
+ }
345
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RepositoriesService, decorators: [{
346
+ type: Injectable,
347
+ args: [{ providedIn: 'root' }]
348
+ }] });
349
+
350
+ function provideInfrastructureConfig(config) {
351
+ return [
352
+ provideExternalConfig(config.external),
353
+ provideRepositoryConfig(config.repository),
354
+ ];
355
+ }
356
+
357
+ class InfrastructureService {
358
+ external;
359
+ repo;
360
+ constructor(external, repo) {
361
+ this.external = external;
362
+ this.repo = repo;
363
+ }
364
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: InfrastructureService, deps: [{ token: ExternalService }, { token: RepositoriesService }], target: i0.ɵɵFactoryTarget.Injectable });
365
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: InfrastructureService, providedIn: 'root' });
366
+ }
367
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: InfrastructureService, decorators: [{
368
+ type: Injectable,
369
+ args: [{ providedIn: 'root' }]
370
+ }], ctorParameters: () => [{ type: ExternalService }, { type: RepositoriesService }] });
371
+
372
+ /**
373
+ * Generated bundle index. Do not edit.
374
+ */
375
+
376
+ export { InfrastructureService, provideInfrastructureConfig };
377
+ //# sourceMappingURL=xxmachina-common-infra.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xxmachina-common-infra.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/infra/external/external.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/external/external.service.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/contract/contract.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/contract/contract.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/invoice/invoice.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/invoice/invoice.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/order/order.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/order/order.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/partner/partner.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/partner/partner.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/notion.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/notion/notion.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/redis/redis.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/redis/operator/operator.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/redis/project/project.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/redis/spec/spec.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/redis/system/system.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/redis/redis.service.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/repository.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/firestore/link/google/google.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/firestore/link/link.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/firestore/firestore.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/firestore/query/query.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/firestore/resource/resource.repository.ts","../../../../../packages/@xxmachina/common/src/lib/infra/repository/repository.service.ts","../../../../../packages/@xxmachina/common/src/lib/infra/infrastructure.config.ts","../../../../../packages/@xxmachina/common/src/lib/infra/infrastructure.service.ts","../../../../../packages/@xxmachina/common/src/lib/infra/xxmachina-common-infra.ts"],"sourcesContent":["import { importProvidersFrom } from \"@angular/core\";\nimport { GoogleConfig } from \"@nx-ddd/google\";\nimport { GoogleModule } from \"@nx-ddd/google/google.module\";\nimport { OpenAiConfig, provideOpenAiConfig } from \"@nx-ddd/common/infrastructure/externals/openai/impl\";\n\nexport interface ExternalConfig {\n openAi: OpenAiConfig;\n google: GoogleConfig;\n}\n\nexport function provideExternalConfig(config: ExternalConfig) {\n return [\n provideOpenAiConfig(() => config.openAi),\n importProvidersFrom(\n GoogleModule.forRoot(config.google),\n ),\n ]\n}","import { inject, Injectable } from \"@angular/core\";\nimport { AiConfig } from \"@xxmachina/common/domain/models\";\nimport { GoogleService } from \"@nx-ddd/google\";\nimport { injectOpenAiService } from \"@nx-ddd/common/infrastructure/externals/openai\";\nimport { injectDataConnectService } from \"@xxmachina/common/infra/external/data-connect\";\n\n@Injectable({providedIn: 'root'})\nexport class ExternalService {\n readonly openai = injectOpenAiService();\n readonly google = inject(GoogleService);\n readonly dataConnect = injectDataConnectService();\n\n getAiAdapter(aiConfig: AiConfig): any {\n return {} as any\n }\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport interface ContractConfig {\n databaseId: string;\n}\n\nexport const CONTRACT_CONFIG = new InjectionToken<ContractConfig>('CONTRACT_CONFIG');\n\nexport function provideContractConfig(config: ContractConfig) {\n return { provide: CONTRACT_CONFIG, useValue: config };\n}\n","import { Injectable, inject } from \"@angular/core\";\nimport { NOTION_ACCESS_TOKEN, NotionRepository, createConverter } from \"@nx-ddd/notion\";\nimport { Contract } from \"@xxmachina/common/domain-invoice\";\nimport { CONTRACT_CONFIG } from \"./contract.config\";\n\n@Injectable({providedIn: 'root'})\nexport class ContractRepository extends NotionRepository<Contract> {\n protected converter = createConverter(Contract);\n protected config = inject(CONTRACT_CONFIG);\n protected accessToken = inject(NOTION_ACCESS_TOKEN);\n protected databaseId = this.config.databaseId;\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport interface InvoiceConfig {\n databaseId: string;\n}\n\nexport const INVOICE_CONFIG = new InjectionToken<InvoiceConfig>('Invoice Config');\n\nexport function provideInvoiceConfig(config: InvoiceConfig) {\n return { provide: INVOICE_CONFIG, useValue: config };\n}\n","import { inject, Injectable } from \"@angular/core\";\nimport { NOTION_ACCESS_TOKEN, NotionRepository, createConverter } from \"@nx-ddd/notion\";\nimport { Invoice } from \"@xxmachina/common/domain-invoice\";\nimport { INVOICE_CONFIG } from \"./invoice.config\";\n\n@Injectable({providedIn: 'root'})\nexport class InvoiceRepository extends NotionRepository<Invoice> {\n protected converter = createConverter(Invoice);\n protected config = inject(INVOICE_CONFIG);\n protected accessToken = inject(NOTION_ACCESS_TOKEN);\n protected databaseId = this.config.databaseId;\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport interface OrderConfig {\n databaseId: string;\n}\n\nexport const ORDER_CONFIG = new InjectionToken<OrderConfig>('ORDER_CONFIG');\n\nexport function provideOrderConfig(config: OrderConfig) {\n return { provide: ORDER_CONFIG, useValue: config };\n}\n","import { inject, Injectable } from \"@angular/core\";\nimport { NOTION_ACCESS_TOKEN, NotionRepository, createConverter } from \"@nx-ddd/notion\";\nimport { Order } from \"@xxmachina/common/domain-invoice\";\nimport { ORDER_CONFIG } from \"./order.config\";\n\n@Injectable({providedIn: 'root'})\nexport class OrderRepository extends NotionRepository<Order> {\n protected converter = createConverter(Order);\n protected config = inject(ORDER_CONFIG);\n protected accessToken = inject(NOTION_ACCESS_TOKEN);\n protected databaseId = this.config.databaseId;\n}\n","import { InjectionToken } from \"@angular/core\";\n\nexport interface PartnerConfig {\n databaseId: string;\n}\n\nexport const PARTNER_CONFIG = new InjectionToken<PartnerConfig>('PARTNER_CONFIG');\n\nexport function providePartnerConfig(config: PartnerConfig) {\n return { provide: PARTNER_CONFIG, useValue: config };\n}\n","import { inject, Injectable } from \"@angular/core\";\nimport { NOTION_ACCESS_TOKEN, NotionRepository, createConverter } from \"@nx-ddd/notion\";\nimport { Partner } from \"@xxmachina/common/domain-invoice\";\nimport { PARTNER_CONFIG } from \"./partner.config\";\n\n@Injectable({providedIn: 'root'})\nexport class PartnerRepository extends NotionRepository<Partner> {\n protected converter = createConverter(Partner);\n protected config = inject(PARTNER_CONFIG);\n protected accessToken = inject(NOTION_ACCESS_TOKEN);\n protected databaseId = this.config.databaseId;\n}\n","import { ContractConfig, provideContractConfig } from \"./contract\";\nimport { InvoiceConfig, provideInvoiceConfig } from \"./invoice\";\nimport { provideOrderConfig } from \"./order/order.config\";\nimport { PartnerConfig, providePartnerConfig } from \"./partner\";\nimport { provideNotionConfig as _provideNotionConfig } from \"@nx-ddd/notion\";\n\nexport interface NotionConfig {\n accessToken: string;\n contract: ContractConfig;\n invoice: InvoiceConfig\n order: any;\n partner: PartnerConfig;\n}\n\nexport function provideNotionConfig(config: NotionConfig) {\n return [\n provideContractConfig(config.contract),\n provideInvoiceConfig(config.invoice),\n provideOrderConfig(config.order),\n providePartnerConfig(config.partner),\n _provideNotionConfig({accessToken: config.accessToken }),\n ];\n}\n","import { Injectable } from \"@angular/core\";\nimport { ContractRepository } from \"./contract\";\nimport { InvoiceRepository } from \"./invoice\";\nimport { OrderRepository } from \"./order\";\nimport { PartnerRepository } from \"./partner\";\n\n@Injectable({providedIn: 'root'})\nexport class NotionRepository {\n constructor(\n public contract: ContractRepository,\n public invoice: InvoiceRepository,\n public order: OrderRepository,\n public partner: PartnerRepository,\n ) {}\n}\n","import { provideRedisConfig as _provideRedisConfig, RedisConfig as _RedisConfig } from '@xxmachina/common/_shared/meta/redis';\n\nexport interface RedisConfig {\n redis: _RedisConfig;\n}\n\nexport function provideRedisConfig(config: RedisConfig) {\n return [\n _provideRedisConfig(config.redis),\n ];\n}\n","import { Injectable } from \"@angular/core\";\nimport { RedisRepository } from '@xxmachina/common/_shared/meta/redis';\nimport { Operator } from \"@xxmachina/common/domain/models\";\n\n@Injectable({providedIn: 'root'})\nexport class OperatorRepository extends RedisRepository<Operator> {\n protected entityName = 'operator';\n}\n","import { Injectable } from \"@angular/core\";\nimport { Converter, RedisRepository } from '@xxmachina/common/_shared/meta/redis';\nimport { Project } from \"@xxmachina/common/domain/models\";\n\nexport class ProjectConverter extends Converter<Project, {id: string, settings: string}> {\n fromRedis(record: { id: string; settings: string; }): Project {\n return {\n id: record.id,\n settings: JSON.parse(record.settings),\n };\n }\n\n toRedis(entity: Project): { id: string; settings: string; } {\n return {\n id: entity.id,\n settings: JSON.stringify(entity.settings),\n };\n }\n}\n\n@Injectable({providedIn: 'root'})\nexport class ProjectRepository extends RedisRepository<Project> {\n protected entityName = 'project';\n protected converter = new ProjectConverter();\n}\n","import { inject, Inject, Injectable, InjectionToken, Optional } from \"@angular/core\";\nimport { RedisRepository } from '@xxmachina/common/_shared/meta/redis';\nimport { bufferFloat32, float32Buffer } from \"@xxmachina/common/utils/crypto\";\nimport { Spec } from \"@xxmachina/common/domain/models\";\nimport { REDIS_CONFIG } from \"@xxmachina/common/_shared/meta/redis\";\n\nexport const VECTOR_SIZE = new InjectionToken('[@xxmachina/common] VECTOR_SIZE');\n// MEMO(nontangent): Optionalデコレーターが動かないので、ここで初期化する。\nVECTOR_SIZE['Θopt'] = true;\n\n@Injectable({providedIn: 'root'})\nexport class SpecRepository extends RedisRepository<Spec> {\n\n protected config = inject(REDIS_CONFIG);\n // constructor(\n // @Optional() @Inject(VECTOR_SIZE) private vectorSize: number,\n // ) {\n // this.vectorSize ??= 1536;\n // }\n\n protected entityName = 'spec';\n\n async create(spec: Spec): Promise<Spec> {\n return super.create({...spec, embeddings: this.toBuffer(spec.embeddings) as any});\n }\n\n async get(id: string): Promise<Spec> {\n return super.get(id).then(spec => ({...spec, embeddings: this.fromBuffer(spec.embeddings as any)}));\n }\n\n async update(spec: Partial<Spec>): Promise<void> {\n return super.update({...spec, embeddings: this.toBuffer(spec.embeddings) as any});\n }\n\n get indexName() {\n return `index:${this.entityName}`;\n }\n\n async makeIndex() {\n // await this.init();\n // await this.client.ft.dropIndex(this.indexName).catch(() => {});\n // await this.client.ft.create(this.indexName, {\n // id: SchemaFieldTypes.TEXT,\n // operatorId: SchemaFieldTypes.TEXT,\n // embeddings: {\n // type: SchemaFieldTypes.VECTOR,\n // ALGORITHM: VectorAlgorithms.HNSW,\n // TYPE: 'FLOAT32',\n // DIM: this.vectorSize,\n // DISTANCE_METRIC: 'COSINE',\n // },\n // });\n }\n\n async search(operatorId: string, embeddings: number[], n = 3): Promise<Spec[]> {\n const query = `(@operatorId:$OPERATOR_ID)=>[KNN $N @embeddings $BLOB AS score]`;\n const results = await this.client.ft.search(this.indexName, query, {\n PARAMS: {\n BLOB: this.toBuffer(embeddings),\n N: n,\n OPERATOR_ID: operatorId,\n },\n SORTBY: 'score',\n DIALECT: 2,\n RETURN: ['score']\n });\n return Promise.all(results.documents.map(doc => this.get(doc.id.slice(this.entityName.length + 1))));\n }\n\n private toBuffer(embedding: number[]) {\n return float32Buffer(embedding);\n }\n\n private fromBuffer(buffer: Buffer) {\n return bufferFloat32(buffer);\n }\n\n}\n","import { Injectable } from \"@angular/core\";\n\n@Injectable({providedIn: 'root'})\nexport class SystemRepository {\n protected entityName = 'system';\n}\n","import { inject, Injectable } from \"@angular/core\";\nimport { OperatorRepository } from \"./operator\";\nimport { ProjectRepository } from \"./project\";\nimport { SpecRepository } from \"./spec\";\nimport { SystemRepository } from \"./system\";\n\n@Injectable({providedIn: 'root'})\nexport class RedisService {\n readonly operator = inject(OperatorRepository);\n readonly project = inject(ProjectRepository);\n readonly spec = inject(SpecRepository);\n readonly system = inject(SystemRepository);\n}\n","import { NotionConfig, provideNotionConfig } from \"./notion\";\nimport { provideRedisConfig, RedisConfig } from \"./redis\";\n\nexport interface RepositoryConfig {\n notion: NotionConfig;\n redis: RedisConfig;\n}\n\nexport function provideRepositoryConfig(config: RepositoryConfig) {\n return [\n provideNotionConfig(config.notion),\n provideRedisConfig(config.redis),\n ];\n}\n","import { Google } from \"@xxmachina/common/domain/models\";\nimport { GoogleConverter } from \"@xxmachina/common/infra/converters/google\";\nimport { inject, Injectable } from \"@angular/core\";\nimport { FirestoreRepository } from \"@nx-ddd/firestore/repository\";\n\n@Injectable({providedIn: 'root'})\nexport class GoogleRepository extends FirestoreRepository<Google> {\n readonly collectionPath = 'users/:userId/links/:id';\n protected converter = inject(GoogleConverter);\n}\n","import { Injectable } from \"@angular/core\";\nimport { GoogleRepository } from \"./google\";\n\n@Injectable({providedIn: 'root'})\nexport class LinkRepository {\n constructor(\n public google: GoogleRepository,\n ) { }\n}\n","import { Injectable } from \"@angular/core\";\n// import { BookmarkletRepository } from \"./bookmarklet\";\nimport { LinkRepository } from \"./link\";\n\n@Injectable({providedIn: 'root'})\nexport class FirestoreRepository {\n constructor(\n // public bookmarklet: BookmarkletRepository,\n public link: LinkRepository,\n ) {}\n}\n","import { Injectable } from \"@angular/core\";\nimport { Query } from \"@xxmachina/common/domain/models\";\nimport { FirestoreRepository } from \"@nx-ddd/firestore/repository\";\nimport { injectConverter } from \"@nx-ddd/firestore\";\n\n@Injectable({ providedIn: 'root' })\nexport class QueryFirestoreRepository extends FirestoreRepository<Query> {\n readonly collectionPath = 'projects/:projectId/queries/:id';\n protected converter = injectConverter(Query);\n}","import { Injectable } from \"@angular/core\";\nimport { FirestoreRepository } from \"@nx-ddd/firestore/repository\";\nimport { Resource } from \"@xxmachina/common/domain/models\";\nimport { injectConverter } from \"@nx-ddd/firestore\";\n\n@Injectable({ providedIn: 'root' })\nexport class ResourceFirestoreRepository extends FirestoreRepository<Resource> {\n readonly collectionPath = 'projects/:projectId/resources/:id';\n protected converter = injectConverter(Resource);\n}","import { inject, Injectable } from \"@angular/core\";\nimport { FirestoreRepository } from \"./firestore\";\nimport { NotionRepository } from \"./notion\";\nimport { RedisService } from \"./redis\";\n\n@Injectable({providedIn: 'root'})\nexport class RepositoriesService {\n readonly firestore = inject(FirestoreRepository);\n readonly notion = inject(NotionRepository);\n readonly redis = inject(RedisService);\n}\n","import { ExternalConfig, provideExternalConfig } from \"./external\";\nimport { provideRepositoryConfig, RepositoryConfig } from \"./repository\";\n\nexport interface InfrastructureConfig {\n external: ExternalConfig;\n repository: RepositoryConfig;\n}\n\nexport function provideInfrastructureConfig(config: InfrastructureConfig) {\n return [\n provideExternalConfig(config.external),\n provideRepositoryConfig(config.repository),\n ];\n}","import { Injectable } from \"@angular/core\";\nimport { RepositoriesService } from \"./repository\";\nimport { ExternalService } from \"./external\";\n\n@Injectable({providedIn: 'root'})\nexport class InfrastructureService {\n constructor(\n public external: ExternalService,\n public repo: RepositoriesService,\n ) { }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NotionRepository","_provideNotionConfig","i1.ContractRepository","i2.InvoiceRepository","i3.OrderRepository","i4.PartnerRepository","_provideRedisConfig","FirestoreRepository","i1.GoogleRepository","i1.LinkRepository","i1.ExternalService","i2.RepositoriesService"],"mapp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A,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cADT,MAAM,EAAA,CAAA;;2FAClB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;ACJhC;;AAEG;;;;"}
@@ -0,0 +1,33 @@
1
+ import { inject } from '@angular/core';
2
+ import { map } from 'rxjs';
3
+ import { QueryHelper } from '@xxmachina/common/domain/models';
4
+ import { QueryFirestoreQuery, ResourceFirestoreQuery } from '@xxmachina/common/infra/query/firestore';
5
+ import { QueryFirestoreRepository, ResourceFirestoreRepository } from '@xxmachina/common/infra/repository/firestore';
6
+
7
+ function getFirestoreQueryStore() {
8
+ const query = inject(QueryFirestoreQuery);
9
+ const repo = inject(QueryFirestoreRepository);
10
+ return {
11
+ list: () => query.listChanges({ projectId: 'default' }).pipe(map(items => items.map((item) => QueryHelper.convertToV2(item)))),
12
+ create: (item) => repo.create(item),
13
+ update: (item) => repo.update(item).then(() => { }),
14
+ save: (item) => repo.save(item).then(() => item),
15
+ };
16
+ }
17
+ function getFirestoreResourceStore() {
18
+ const query = inject(ResourceFirestoreQuery);
19
+ const repo = inject(ResourceFirestoreRepository);
20
+ return {
21
+ list: () => query.listChanges({ projectId: 'default' }),
22
+ create: (item) => repo.create(item),
23
+ update: (item) => repo.update(item).then(() => { }),
24
+ save: (item) => repo.save(item).then(() => item),
25
+ };
26
+ }
27
+
28
+ /**
29
+ * Generated bundle index. Do not edit.
30
+ */
31
+
32
+ export { getFirestoreQueryStore, getFirestoreResourceStore };
33
+ //# sourceMappingURL=xxmachina-common-stores-firestore.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xxmachina-common-stores-firestore.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/stores/firestore/firestore.store.ts","../../../../../packages/@xxmachina/common/src/lib/stores/firestore/xxmachina-common-stores-firestore.ts"],"sourcesContent":["import { inject } from '@angular/core';\nimport { map } from 'rxjs';\nimport { QueryHelper } from '@xxmachina/common/domain/models';\nimport { QueryFirestoreQuery, ResourceFirestoreQuery } from '@xxmachina/common/infra/query/firestore';\nimport { QueryFirestoreRepository, ResourceFirestoreRepository } from '@xxmachina/common/infra/repository/firestore';\nimport { } from '@xxmachina/common/infra/repository/firestore';\n\nexport function getFirestoreQueryStore() {\n const query = inject(QueryFirestoreQuery);\n const repo = inject(QueryFirestoreRepository);\n return {\n list: () => query.listChanges({projectId: 'default'}).pipe(\n map(items => items.map((item: any) => QueryHelper.convertToV2(item))),\n ),\n create: (item: any) => repo.create(item),\n update: (item: any) => repo.update(item).then(() => {}),\n save: (item: any) => repo.save(item).then(() => item),\n };\n}\n\nexport function getFirestoreResourceStore() {\n const query = inject(ResourceFirestoreQuery);\n const repo = inject(ResourceFirestoreRepository);\n return {\n list: () => query.listChanges({projectId: 'default'}),\n create: (item: any) => repo.create(item),\n update: (item: any) => repo.update(item).then(() => {}),\n save: (item: any) => repo.save(item).then(() => item),\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;SAOgB,sBAAsB,GAAA;AACpC,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACzC,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC;IAC7C,OAAO;AACL,QAAA,IAAI,EAAE,MAAM,KAAK,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,SAAS,EAAC,CAAC,CAAC,IAAI,CACxD,GAAG,CAAC,KAAK,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,KAAK,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CACtE;QACD,MAAM,EAAE,CAAC,IAAS,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;AACxC,QAAA,MAAM,EAAE,CAAC,IAAS,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,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