@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
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @x-x-machina-common
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test @x-x-machina-common` to execute the unit tests via [Jest](https://jestjs.io).
8
+
9
+ ## Running lint
10
+
11
+ Run `nx lint @x-x-machina-common` to execute the lint via [ESLint](https://eslint.org/).
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var AuthModule_1;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AuthModule = void 0;
5
+ const tslib_1 = require("tslib");
6
+ const common_1 = require("@nestjs/common");
7
+ const passport_1 = require("@nestjs/passport");
8
+ let AuthModule = AuthModule_1 = class AuthModule {
9
+ static forRoot() {
10
+ return { module: AuthModule_1, providers: [] };
11
+ }
12
+ };
13
+ exports.AuthModule = AuthModule;
14
+ exports.AuthModule = AuthModule = AuthModule_1 = tslib_1.__decorate([
15
+ (0, common_1.Module)({
16
+ imports: [passport_1.PassportModule],
17
+ providers: [],
18
+ exports: [],
19
+ controllers: [],
20
+ })
21
+ ], AuthModule);
22
+ //# sourceMappingURL=auth.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.module.js","sourceRoot":"","sources":["../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/auth.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAU3C,IAAM,UAAU,kBAAhB,MAAM,UAAU;IACrB,MAAM,CAAC,OAAO;QACZ,OAAO,EAAE,MAAM,EAAE,YAAU,EAAE,SAAS,EAAE,EAAE,EAAE,CAAA;IAC9C,CAAC;CACF,CAAA;AAJY,gCAAU;qBAAV,UAAU;IARtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,yBAAc,CAAC;QACzB,SAAS,EAAE,EACV;QACD,OAAO,EAAE,EACR;QACD,WAAW,EAAE,EAAE;KAChB,CAAC;GACW,UAAU,CAItB"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./auth.module"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AnonymousStrategy = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const passport_1 = require("@nestjs/passport");
7
+ const passport_custom_1 = require("passport-custom");
8
+ let AnonymousStrategy = class AnonymousStrategy extends (0, passport_1.PassportStrategy)(passport_custom_1.Strategy, 'anonymous') {
9
+ validate(request) {
10
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
+ return {};
12
+ });
13
+ }
14
+ };
15
+ exports.AnonymousStrategy = AnonymousStrategy;
16
+ exports.AnonymousStrategy = AnonymousStrategy = tslib_1.__decorate([
17
+ (0, common_1.Injectable)()
18
+ ], AnonymousStrategy);
19
+ //# sourceMappingURL=anonymous.strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anonymous.strategy.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/anonymous/anonymous.strategy.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,+CAAoD;AACpD,qDAA2C;AAGpC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,IAAA,2BAAgB,EAAC,0BAAQ,EAAE,WAAW,CAAC;IACtE,QAAQ,CAAC,OAAgB;;YAC7B,OAAO,EAAE,CAAC;QACZ,CAAC;KAAA;CACF,CAAA;AAJY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAI7B"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./anonymous.strategy"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/anonymous/index.ts"],"names":[],"mappings":";;;AAAA,+DAAqC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FirebaseAuthGuard = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const passport_1 = require("@nestjs/passport");
7
+ const graphql_1 = require("@nestjs/graphql");
8
+ let FirebaseAuthGuard = class FirebaseAuthGuard extends (0, passport_1.AuthGuard)('firebase') {
9
+ getRequest(context) {
10
+ const ctx = graphql_1.GqlExecutionContext.create(context);
11
+ const gqlReq = ctx.getContext().req;
12
+ if (gqlReq) {
13
+ gqlReq.body = ctx.getArgs();
14
+ return gqlReq;
15
+ }
16
+ return context.switchToHttp().getRequest();
17
+ }
18
+ };
19
+ exports.FirebaseAuthGuard = FirebaseAuthGuard;
20
+ exports.FirebaseAuthGuard = FirebaseAuthGuard = tslib_1.__decorate([
21
+ (0, common_1.Injectable)()
22
+ ], FirebaseAuthGuard);
23
+ //# sourceMappingURL=firebase.guard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firebase.guard.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/firebase/firebase.guard.ts"],"names":[],"mappings":";;;;AAAA,2CAA8D;AAC9D,+CAA6C;AAC7C,6CAAsD;AAG/C,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,IAAA,oBAAS,EAAC,UAAU,CAAC;IAC1D,UAAU,CAAC,OAAyB;QAClC,MAAM,GAAG,GAAG,6BAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC;QAEpC,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;YAC5B,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;IAC7C,CAAC;CACF,CAAA;AAXY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAW7B"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FirebaseStrategy = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const passport_1 = require("@nestjs/passport");
7
+ const nestjs_firebase_auth_1 = require("@tfarras/nestjs-firebase-auth");
8
+ const passport_jwt_1 = require("passport-jwt");
9
+ let FirebaseStrategy = class FirebaseStrategy extends (0, passport_1.PassportStrategy)(nestjs_firebase_auth_1.FirebaseAuthStrategy, 'firebase') {
10
+ constructor() {
11
+ super({ extractor: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken() });
12
+ }
13
+ authenticate(req) {
14
+ return super.authenticate(req);
15
+ }
16
+ };
17
+ exports.FirebaseStrategy = FirebaseStrategy;
18
+ exports.FirebaseStrategy = FirebaseStrategy = tslib_1.__decorate([
19
+ (0, common_1.Injectable)(),
20
+ tslib_1.__metadata("design:paramtypes", [])
21
+ ], FirebaseStrategy);
22
+ //# sourceMappingURL=firebase.strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firebase.strategy.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/firebase/firebase.strategy.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,+CAAoD;AACpD,wEAAqE;AACrE,+CAA0C;AAMnC,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,IAAA,2BAAgB,EAAC,2CAAoB,EAAE,UAAU,CAAC;IACtF;QACE,KAAK,CAAC,EAAC,SAAS,EAAE,yBAAU,CAAC,2BAA2B,EAAE,EAAC,CAAC,CAAC;IAC/D,CAAC;IAED,YAAY,CAAC,GAAuE;QAClF,OAAO,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;CACF,CAAA;AARY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;;GACA,gBAAgB,CAQ5B"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./firebase.guard"), exports);
5
+ tslib_1.__exportStar(require("./firebase.strategy"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/firebase/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,8DAAoC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./internal.strategy"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/internal/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InternalStrategy = exports.INTERNAL_STRATEGY_TOKEN = void 0;
4
+ exports.provideInternalStrategyToken = provideInternalStrategyToken;
5
+ const tslib_1 = require("tslib");
6
+ const common_1 = require("@nestjs/common");
7
+ const passport_1 = require("@nestjs/passport");
8
+ const passport_http_bearer_1 = require("passport-http-bearer");
9
+ exports.INTERNAL_STRATEGY_TOKEN = 'INTERNAL_STRATEGY_TOKEN';
10
+ function provideInternalStrategyToken(token) {
11
+ return {
12
+ provide: exports.INTERNAL_STRATEGY_TOKEN,
13
+ useValue: token,
14
+ };
15
+ }
16
+ let InternalStrategy = class InternalStrategy extends (0, passport_1.PassportStrategy)(passport_http_bearer_1.Strategy, 'internal') {
17
+ constructor(token) {
18
+ super();
19
+ this.token = token;
20
+ }
21
+ validate(token) {
22
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
+ return token === this.token;
24
+ });
25
+ }
26
+ };
27
+ exports.InternalStrategy = InternalStrategy;
28
+ exports.InternalStrategy = InternalStrategy = tslib_1.__decorate([
29
+ (0, common_1.Injectable)(),
30
+ tslib_1.__param(0, (0, common_1.Inject)(exports.INTERNAL_STRATEGY_TOKEN)),
31
+ tslib_1.__metadata("design:paramtypes", [String])
32
+ ], InternalStrategy);
33
+ //# sourceMappingURL=internal.strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.strategy.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/internal/internal.strategy.ts"],"names":[],"mappings":";;;AAMA,oEAKC;;AAXD,2CAAoE;AACpE,+CAAoD;AACpD,+DAAgD;AAEnC,QAAA,uBAAuB,GAAmB,yBAAyB,CAAC;AAEjF,SAAgB,4BAA4B,CAAC,KAAa;IACxD,OAAO;QACL,OAAO,EAAE,+BAAuB;QAChC,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC;AAGM,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,IAAA,2BAAgB,EAAC,+BAAQ,EAAE,UAAU,CAAC;IAC1E,YAC2C,KAAa;QAEtD,KAAK,EAAE,CAAC;QAFiC,UAAK,GAAL,KAAK,CAAQ;IAGxD,CAAC;IAEK,QAAQ,CAAC,KAAa;;YAC1B,OAAO,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;QAC9B,CAAC;KAAA;CACF,CAAA;AAVY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAGR,mBAAA,IAAA,eAAM,EAAC,+BAAuB,CAAC,CAAA;;GAFvB,gBAAgB,CAU5B"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./msal.guard"), exports);
5
+ tslib_1.__exportStar(require("./msal.strategy"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/msal/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,0DAAgC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MsalAuthGuard = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const common_1 = require("@nestjs/common");
6
+ const passport_1 = require("@nestjs/passport");
7
+ let MsalAuthGuard = class MsalAuthGuard extends (0, passport_1.AuthGuard)('msal') {
8
+ };
9
+ exports.MsalAuthGuard = MsalAuthGuard;
10
+ exports.MsalAuthGuard = MsalAuthGuard = tslib_1.__decorate([
11
+ (0, common_1.Injectable)()
12
+ ], MsalAuthGuard);
13
+ //# sourceMappingURL=msal.guard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msal.guard.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/msal/msal.guard.ts"],"names":[],"mappings":";;;;AAAA,2CAA4C;AAC5C,+CAA6C;AAGtC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,IAAA,oBAAS,EAAC,MAAM,CAAC;CAAI,CAAA;AAA3C,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAA8B"}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MsalStrategy = exports.MSAL_CONFIG = void 0;
4
+ exports.provideMsalAuth = provideMsalAuth;
5
+ const tslib_1 = require("tslib");
6
+ const common_1 = require("@nestjs/common");
7
+ const passport_1 = require("@nestjs/passport");
8
+ const passport_custom_1 = require("passport-custom");
9
+ const validate_azure_ad_token_1 = tslib_1.__importDefault(require("validate-azure-ad-token"));
10
+ exports.MSAL_CONFIG = 'MSAL_CONFIG';
11
+ function provideMsalAuth(useFactory) {
12
+ return [
13
+ { provide: exports.MSAL_CONFIG, useFactory },
14
+ MsalStrategy,
15
+ ];
16
+ }
17
+ let MsalStrategy = class MsalStrategy extends (0, passport_1.PassportStrategy)(passport_custom_1.Strategy, 'msal') {
18
+ constructor(config) {
19
+ super();
20
+ this.config = config;
21
+ }
22
+ validate(req) {
23
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
24
+ var _a;
25
+ const token = (_a = req.headers.authorization) === null || _a === void 0 ? void 0 : _a.split(' ')[1];
26
+ try {
27
+ const decoded = yield (0, validate_azure_ad_token_1.default)(token, this.config);
28
+ return decoded.payload;
29
+ }
30
+ catch (err) {
31
+ console.error('err:', err);
32
+ throw new common_1.UnauthorizedException();
33
+ }
34
+ });
35
+ }
36
+ };
37
+ exports.MsalStrategy = MsalStrategy;
38
+ exports.MsalStrategy = MsalStrategy = tslib_1.__decorate([
39
+ (0, common_1.Injectable)(),
40
+ tslib_1.__param(0, (0, common_1.Inject)(exports.MSAL_CONFIG)),
41
+ tslib_1.__metadata("design:paramtypes", [Object])
42
+ ], MsalStrategy);
43
+ //# sourceMappingURL=msal.strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msal.strategy.js","sourceRoot":"","sources":["../../../../../../../../packages/@xxmachina/common/src/lib/_shared/auth/passports/msal/msal.strategy.ts"],"names":[],"mappings":";;;AAaA,0CAKC;;AAlBD,2CAAqF;AACrF,+CAAoD;AACpD,qDAA2C;AAC3C,8FAA+C;AAElC,QAAA,WAAW,GAAG,aAAa,CAAC;AAQzC,SAAgB,eAAe,CAAC,UAA4B;IAC1D,OAAO;QACL,EAAE,OAAO,EAAE,mBAAW,EAAE,UAAU,EAAE;QACpC,YAAY;KACb,CAAC;AACJ,CAAC;AAGM,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,IAAA,2BAAgB,EAAC,0BAAQ,EAAE,MAAM,CAAC;IAClE,YACwC,MAAkB;QAExD,KAAK,EAAE,CAAC;QAF8B,WAAM,GAAN,MAAM,CAAY;IAG1D,CAAC;IAEK,QAAQ,CAAC,GAAQ;;;YACrB,MAAM,KAAK,GAAG,MAAA,GAAG,CAAC,OAAO,CAAC,aAAa,0CAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACvD,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,MAAM,IAAA,iCAAQ,EAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBACnD,OAAO,OAAO,CAAC,OAAO,CAAC;YACzB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;gBAC3B,MAAM,IAAI,8BAAqB,EAAE,CAAC;YACpC,CAAC;QACH,CAAC;KAAA;CACF,CAAA;AAjBY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;IAGR,mBAAA,IAAA,eAAM,EAAC,mBAAW,CAAC,CAAA;;GAFX,YAAY,CAiBxB"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ID = exports.Field = exports.ObjectType = void 0;
5
+ exports.provideNestjsGraphql = provideNestjsGraphql;
6
+ let ObjectType, Field, ID;
7
+ const _decorators = {
8
+ ObjectType: function () {
9
+ return function (target) {
10
+ // return target;
11
+ };
12
+ },
13
+ Field: function () {
14
+ return function (target, propertyKey) {
15
+ // return target;
16
+ };
17
+ },
18
+ ID: null,
19
+ };
20
+ (_a = _decorators, exports.ObjectType = ObjectType = _a.ObjectType, exports.Field = Field = _a.Field, exports.ID = ID = _a.ID);
21
+ // GraphQLのデコレーターをファクトリーメソッドで提供
22
+ function provideNestjsGraphql(_decorators) {
23
+ (exports.ObjectType = ObjectType = _decorators.ObjectType, exports.Field = Field = _decorators.Field, exports.ID = ID = _decorators.ID);
24
+ }
25
+ //# sourceMappingURL=decorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../../../packages/@xxmachina/common/src/lib/_shared/meta/decorators.ts"],"names":[],"mappings":";;;;AAoBA,oDAEC;AApBD,IAAI,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC;AAE1B,MAAM,WAAW,GAA+B;IAC9C,UAAU,EAAE;QACV,OAAO,UAAU,MAAW;YAC1B,iBAAiB;QACnB,CAAC,CAAA;IACH,CAAC;IACD,KAAK,EAAE;QACL,OAAO,UAAU,MAAW,EAAE,WAA4B;YACxD,iBAAiB;QACnB,CAAC,CAAA;IACH,CAAC;IACD,EAAE,EAAE,IAAI;CACT,CAAC;AACF,CAAC,KAA4B,WAAkB,EAA5C,qBAAA,UAAU,gBAAA,EAAE,gBAAA,KAAK,WAAA,EAAE,aAAA,EAAE,QAAA,CAAwB,CAAC;AAEjD,+BAA+B;AAC/B,SAAgB,oBAAoB,CAAC,WAA8B;IACjE,CAAG,qBAAA,UAAU,GAAgB,WAAW,WAA3B,EAAE,gBAAA,KAAK,GAAS,WAAW,MAApB,EAAE,aAAA,EAAE,GAAK,WAAW,GAAhB,CAAiB,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./redis.config"), exports);
5
+ tslib_1.__exportStar(require("./redis.repository"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,6DAAmC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REDIS_CONFIG = void 0;
4
+ exports.provideRedisConfig = provideRedisConfig;
5
+ const core_1 = require("@angular/core");
6
+ exports.REDIS_CONFIG = new core_1.InjectionToken('[@nx-ddd/redis] Redis Config');
7
+ function provideRedisConfig(config) {
8
+ return { provide: exports.REDIS_CONFIG, useValue: config };
9
+ }
10
+ //# sourceMappingURL=redis.config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redis.config.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/redis.config.ts"],"names":[],"mappings":";;;AAQA,gDAEC;AAVD,wCAA+C;AAMlC,QAAA,YAAY,GAAG,IAAI,qBAAc,CAAc,8BAA8B,CAAC,CAAC;AAE5F,SAAgB,kBAAkB,CAAC,MAAmB;IACpD,OAAO,EAAE,OAAO,EAAE,oBAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AACrD,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import { RedisClientType } from 'redis';
2
- import { RedisConfig } from './redis.config';
3
- import * as i0 from "@angular/core";
2
+ import { RedisConfig } from "./redis.config";
4
3
  export declare class Converter<E, R> {
5
4
  fromRedis(record: R): E;
6
5
  toRedis(entity: E): R;
@@ -8,11 +7,11 @@ export declare class Converter<E, R> {
8
7
  export declare abstract class RedisRepository<E extends {
9
8
  id: string;
10
9
  } = any, R extends object = object> {
10
+ private config;
11
11
  protected abstract entityName: string;
12
12
  protected converter: Converter<E, R>;
13
- protected config: RedisConfig;
14
13
  protected client: RedisClientType;
15
- constructor();
14
+ constructor(config: RedisConfig);
16
15
  init(): Promise<void>;
17
16
  list(): Promise<Awaited<E>[]>;
18
17
  get(id: string): Promise<E>;
@@ -21,6 +20,4 @@ export declare abstract class RedisRepository<E extends {
21
20
  delete(id: string): Promise<void>;
22
21
  deleteAll(): Promise<void>;
23
22
  getKey(id: string): string;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<RedisRepository<any, any>, never>;
25
- static ɵprov: i0.ɵɵInjectableDeclaration<RedisRepository<any, any>>;
26
23
  }
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RedisRepository = exports.Converter = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@angular/core");
6
+ const redis_config_1 = require("./redis.config");
7
+ const lodash_es_1 = require("lodash-es");
8
+ class Converter {
9
+ fromRedis(record) {
10
+ return Object.assign({}, record);
11
+ }
12
+ toRedis(entity) {
13
+ return Object.assign({}, entity);
14
+ }
15
+ }
16
+ exports.Converter = Converter;
17
+ function safeCreateClient(params) {
18
+ // try {
19
+ // return createClient(params);
20
+ // } catch (error) {
21
+ // console.error(error);
22
+ // }
23
+ }
24
+ let RedisRepository = class RedisRepository {
25
+ constructor(config) {
26
+ this.config = config;
27
+ this.converter = new Converter();
28
+ this.client = safeCreateClient({
29
+ url: this.config.url,
30
+ });
31
+ }
32
+ init() {
33
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
34
+ var _a;
35
+ try {
36
+ if (!((_a = this.client) === null || _a === void 0 ? void 0 : _a.isOpen))
37
+ yield this.client.connect();
38
+ }
39
+ catch (error) {
40
+ console.error(error);
41
+ }
42
+ });
43
+ }
44
+ list() {
45
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
46
+ yield this.init();
47
+ const keys = yield this.client.keys(`${this.entityName}:*`)
48
+ .then((keys) => keys.map(key => key.slice(this.entityName.length + 1)));
49
+ const entities = yield Promise.all(keys.map(key => this.get(key)));
50
+ return entities;
51
+ });
52
+ }
53
+ get(id) {
54
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
55
+ yield this.init();
56
+ const key = this.getKey(id);
57
+ const entity = yield this.client.hGetAll(key);
58
+ return this.converter.fromRedis(Object.assign(Object.assign({}, entity), { id }));
59
+ });
60
+ }
61
+ create(entity) {
62
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
63
+ yield this.init();
64
+ const key = this.getKey(entity.id);
65
+ if (yield this.client.exists(key))
66
+ throw new Error(`Entity ${key} already exists`);
67
+ const record = (0, lodash_es_1.omit)(this.converter.toRedis(entity), 'id');
68
+ console.debug('create', key, record);
69
+ yield this.client.hSet(key, record);
70
+ return entity;
71
+ });
72
+ }
73
+ update(entity) {
74
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
75
+ yield this.init();
76
+ const key = this.getKey(entity.id);
77
+ if (!(yield this.client.exists(key)))
78
+ throw new Error(`Entity ${key} does not exist`);
79
+ yield this.client.hSet(key, (0, lodash_es_1.omit)(this.converter.toRedis(entity), 'id'));
80
+ });
81
+ }
82
+ delete(id) {
83
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
84
+ yield this.init();
85
+ const key = this.getKey(id);
86
+ if (!(yield this.client.exists(key)))
87
+ throw new Error(`Entity ${id} does not exist`);
88
+ yield this.client.del(key);
89
+ });
90
+ }
91
+ deleteAll() {
92
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
93
+ yield this.init();
94
+ const keys = yield this.client.keys(`${this.entityName}:*`);
95
+ yield Promise.all(keys.map(key => this.client.del(key)));
96
+ });
97
+ }
98
+ getKey(id) {
99
+ return `${this.entityName}:${id}`;
100
+ }
101
+ };
102
+ exports.RedisRepository = RedisRepository;
103
+ exports.RedisRepository = RedisRepository = tslib_1.__decorate([
104
+ (0, core_1.Injectable)({ providedIn: 'root' }),
105
+ tslib_1.__param(0, (0, core_1.Inject)(redis_config_1.REDIS_CONFIG)),
106
+ tslib_1.__metadata("design:paramtypes", [Object])
107
+ ], RedisRepository);
108
+ //# sourceMappingURL=redis.repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redis.repository.js","sourceRoot":"","sources":["../../../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/redis.repository.ts"],"names":[],"mappings":"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"}
@@ -1,6 +1,5 @@
1
1
  import { Signal } from "@angular/core";
2
2
  import { Observable } from "rxjs";
3
- import * as i0 from "@angular/core";
4
3
  export declare abstract class AuthService {
5
4
  abstract readonly auth$: Observable<any>;
6
5
  abstract readonly auth: Signal<any>;
@@ -8,6 +7,4 @@ export declare abstract class AuthService {
8
7
  abstract readonly accessToken: Signal<string>;
9
8
  abstract signIn(): Promise<any>;
10
9
  abstract signOut(): Promise<void>;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
12
- static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
13
10
  }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthService = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@angular/core");
6
+ let AuthService = class AuthService {
7
+ };
8
+ exports.AuthService = AuthService;
9
+ exports.AuthService = AuthService = tslib_1.__decorate([
10
+ (0, core_1.Injectable)()
11
+ ], AuthService);
12
+ //# sourceMappingURL=auth.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.service.js","sourceRoot":"","sources":["../../../../../packages/@xxmachina/common/src/lib/auth/auth.service.ts"],"names":[],"mappings":";;;;AAAA,wCAAmD;AAI5C,IAAe,WAAW,GAA1B,MAAe,WAAW;CAQhC,CAAA;AARqB,kCAAW;sBAAX,WAAW;IADhC,IAAA,iBAAU,GAAE;GACS,WAAW,CAQhC"}
package/auth/index.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./auth.service"), exports);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@xxmachina/common/src/lib/auth/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.provideAppInitializer = provideAppInitializer;
4
+ exports.provideAzureAuth = provideAzureAuth;
5
+ const core_1 = require("@angular/core");
6
+ const msal_angular_1 = require("@azure/msal-angular");
7
+ const msal_browser_1 = require("@azure/msal-browser");
8
+ const core_2 = require("@ng-atomic/core");
9
+ const app_1 = require("@ng-atomic/components/frames/app");
10
+ const auth_1 = require("@xxmachina/common/auth");
11
+ const auth_service_1 = require("./auth.service");
12
+ const auth_service_2 = require("./auth.service");
13
+ function provideAppInitializer(useValue) {
14
+ return (0, core_1.makeEnvironmentProviders)([
15
+ {
16
+ provide: core_1.ENVIRONMENT_INITIALIZER,
17
+ useValue,
18
+ multi: true,
19
+ },
20
+ ]);
21
+ }
22
+ function provideAzureAuth(config) {
23
+ return (0, core_1.makeEnvironmentProviders)([
24
+ (0, core_1.importProvidersFrom)(msal_angular_1.MsalModule.forRoot(new msal_browser_1.PublicClientApplication(config === null || config === void 0 ? void 0 : config.configuration), {
25
+ interactionType: msal_browser_1.InteractionType.Redirect,
26
+ authRequest: {
27
+ scopes: config.scopes,
28
+ },
29
+ }, {
30
+ interactionType: msal_browser_1.InteractionType.Redirect,
31
+ protectedResourceMap: new Map([
32
+ ['https://graph.microsoft.com/v1.0/me', config.scopes],
33
+ ]),
34
+ })),
35
+ { provide: auth_service_2.AZURE_AUTH_CONFIG, useValue: config },
36
+ { provide: auth_1.AuthService, useClass: auth_service_1.AzureAuthService },
37
+ provideAppInitializer(() => { (0, core_1.inject)(auth_1.AuthService); }),
38
+ (0, core_2.provideEffect)(app_1.AppFrameStore.ActionId.SIGN_IN_WITH_MICROSOFT, () => {
39
+ const auth = (0, core_1.inject)(auth_1.AuthService);
40
+ return () => {
41
+ console.debug('auth:', auth);
42
+ if (!auth.auth()) {
43
+ auth.signIn();
44
+ }
45
+ else {
46
+ console.log('既にログイン済みです。');
47
+ }
48
+ };
49
+ }),
50
+ (0, core_2.provideEffect)(app_1.AppFrameStore.ActionId.SIGN_OUT, () => {
51
+ const auth = (0, core_1.inject)(auth_1.AuthService);
52
+ return () => auth.signOut();
53
+ }),
54
+ ]);
55
+ }
56
+ //# sourceMappingURL=auth.di.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.di.js","sourceRoot":"","sources":["../../../../../packages/@xxmachina/common/src/lib/azure-auth/auth.di.ts"],"names":[],"mappings":";;AASA,sDAQC;AAGD,4CAgCC;AApDD,wCAAqI;AACrI,sDAAiD;AACjD,sDAA+E;AAC/E,0CAAgD;AAChD,0DAAiE;AACjE,iDAAqD;AACrD,iDAAkD;AAClD,iDAAoE;AAEpE,SAAgB,qBAAqB,CAAC,QAAoB;IACxD,OAAO,IAAA,+BAAwB,EAAC;QAC9B;YACE,OAAO,EAAE,8BAAuB;YAChC,QAAQ;YACR,KAAK,EAAE,IAAI;SACZ;KACF,CAAC,CAAC;AACL,CAAC;AAGD,SAAgB,gBAAgB,CAAC,MAAuB;IACtD,OAAO,IAAA,+BAAwB,EAAC;QAC9B,IAAA,0BAAmB,EAAC,yBAAU,CAAC,OAAO,CAAC,IAAI,sCAAuB,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,CAAC,EAAE;YACzF,eAAe,EAAE,8BAAe,CAAC,QAAQ;YACzC,WAAW,EAAE;gBACX,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB;SACF,EAAE;YACD,eAAe,EAAE,8BAAe,CAAC,QAAQ;YACzC,oBAAoB,EAAE,IAAI,GAAG,CAAC;gBAC5B,CAAC,qCAAqC,EAAE,MAAM,CAAC,MAAM,CAAC;aACvD,CAAC;SACH,CAAC,CAAC;QACH,EAAE,OAAO,EAAE,gCAAiB,EAAE,QAAQ,EAAE,MAAM,EAAE;QAChD,EAAE,OAAO,EAAE,kBAAW,EAAE,QAAQ,EAAE,+BAAgB,EAAE;QACpD,qBAAqB,CAAC,GAAG,EAAE,GAAG,IAAA,aAAM,EAAC,kBAAW,CAAC,CAAA,CAAC,CAAC,CAAC;QACpD,IAAA,oBAAa,EAAC,mBAAa,CAAC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;YAChE,MAAM,IAAI,GAAG,IAAA,aAAM,EAAC,kBAAW,CAAC,CAAC;YACjC,OAAO,GAAG,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;oBACjB,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChB,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;gBAC7B,CAAC;YACH,CAAC,CAAA;QACH,CAAC,CAAC;QACF,IAAA,oBAAa,EAAC,mBAAa,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;YAClD,MAAM,IAAI,GAAG,IAAA,aAAM,EAAC,kBAAW,CAAC,CAAC;YACjC,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAC9B,CAAC,CAAC;KACH,CAAC,CAAC;AACL,CAAC"}
@@ -3,7 +3,6 @@ import { Observable, ReplaySubject } from "rxjs";
3
3
  import { MsalService } from '@azure/msal-angular';
4
4
  import { AccountInfo, Configuration } from '@azure/msal-browser';
5
5
  import { HttpClient } from "@angular/common/http";
6
- import * as i0 from "@angular/core";
7
6
  declare abstract class AuthService {
8
7
  abstract readonly auth$: Observable<any>;
9
8
  abstract readonly accessToken$: Observable<string>;
@@ -29,7 +28,5 @@ export declare class AzureAuthService extends AuthService {
29
28
  signOut(): Promise<void>;
30
29
  protected updateAccessToken(scopes?: string[]): Promise<void>;
31
30
  acquireAccessToken(scopes?: string[]): Promise<string>;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<AzureAuthService, never>;
33
- static ɵprov: i0.ɵɵInjectableDeclaration<AzureAuthService>;
34
31
  }
35
32
  export {};