@xxmachina/common 19.0.0-preview.29 → 19.0.0-preview.4

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