@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,805 +0,0 @@
1
- import { __decorate, __metadata } from 'tslib';
2
- import { IsString, IsOptional, ValidateNested } from 'class-validator';
3
- import { Nullable, Optional, IsDayjs as IsDayjs$1 } from 'class-validator-extended';
4
- import { Firestore } from '@nx-ddd/firestore/decorators';
5
- import dayjs from 'dayjs';
6
- import { Domain, TransformToDayjs as TransformToDayjs$1 } from '@nx-ddd/common/domain';
7
- import { get, merge, pick, camelCase } from 'lodash-es';
8
- import { extractDisplayFields } from '@xxmachina/common/utils';
9
- import { createCompoundSchema } from 'genson-js';
10
- import { deepSnakeToCamelCase, Hasura, TransformToDayjs } from '@nx-ddd/hasura';
11
- import { gql } from 'apollo-angular';
12
- import { format } from 'prettier';
13
- import graphqlParser from 'prettier/parser-graphql';
14
- import { IsDayjs } from '@nx-ddd/core';
15
- import { Firestore as Firestore$1 } from '@nx-ddd/firestore';
16
-
17
- class Assistant {
18
- id;
19
- model;
20
- name;
21
- description;
22
- instructions;
23
- isPublic;
24
- sheetUrl;
25
- }
26
- __decorate([
27
- IsString(),
28
- IsOptional(),
29
- __metadata("design:type", String)
30
- ], Assistant.prototype, "model", void 0);
31
- __decorate([
32
- IsString(),
33
- IsOptional(),
34
- __metadata("design:type", String)
35
- ], Assistant.prototype, "name", void 0);
36
- __decorate([
37
- IsString(),
38
- Nullable(),
39
- IsOptional(),
40
- __metadata("design:type", String)
41
- ], Assistant.prototype, "description", void 0);
42
- __decorate([
43
- IsString(),
44
- IsOptional(),
45
- __metadata("design:type", String)
46
- ], Assistant.prototype, "instructions", void 0);
47
-
48
- class Bookmarklet {
49
- id;
50
- title;
51
- code;
52
- userId;
53
- createdAt;
54
- updatedAt;
55
- }
56
- __decorate([
57
- Firestore.ID(),
58
- __metadata("design:type", String)
59
- ], Bookmarklet.prototype, "id", void 0);
60
- __decorate([
61
- Firestore.String(),
62
- __metadata("design:type", String)
63
- ], Bookmarklet.prototype, "title", void 0);
64
- __decorate([
65
- Firestore.String(),
66
- __metadata("design:type", String)
67
- ], Bookmarklet.prototype, "code", void 0);
68
- __decorate([
69
- Firestore.String(),
70
- __metadata("design:type", String)
71
- ], Bookmarklet.prototype, "userId", void 0);
72
- __decorate([
73
- Firestore.Timestamp(),
74
- __metadata("design:type", dayjs.Dayjs)
75
- ], Bookmarklet.prototype, "createdAt", void 0);
76
- __decorate([
77
- Firestore.Timestamp(),
78
- __metadata("design:type", dayjs.Dayjs)
79
- ], Bookmarklet.prototype, "updatedAt", void 0);
80
-
81
- class WebApiRequest {
82
- contentType;
83
- responseContentType;
84
- serverUrl;
85
- apiJsonUrl;
86
- path;
87
- method;
88
- security;
89
- bodySchema;
90
- }
91
- __decorate([
92
- Domain.Lang('contentType'),
93
- __metadata("design:type", String)
94
- ], WebApiRequest.prototype, "contentType", void 0);
95
- __decorate([
96
- Domain.Lang('サーバーURL'),
97
- __metadata("design:type", String)
98
- ], WebApiRequest.prototype, "serverUrl", void 0);
99
- __decorate([
100
- Domain.Lang('OpenAPI URL'),
101
- __metadata("design:type", String)
102
- ], WebApiRequest.prototype, "apiJsonUrl", void 0);
103
- __decorate([
104
- Domain.Lang('パス'),
105
- __metadata("design:type", String)
106
- ], WebApiRequest.prototype, "path", void 0);
107
- __decorate([
108
- Domain.Lang('メソッド'),
109
- __metadata("design:type", String)
110
- ], WebApiRequest.prototype, "method", void 0);
111
- __decorate([
112
- Domain.Lang('セキュリティ'),
113
- __metadata("design:type", Array)
114
- ], WebApiRequest.prototype, "security", void 0);
115
- class WebAPiRequestCommand {
116
- id;
117
- name;
118
- description;
119
- type;
120
- webApiRequest;
121
- }
122
- __decorate([
123
- Domain.Lang('説明'),
124
- __metadata("design:type", String)
125
- ], WebAPiRequestCommand.prototype, "description", void 0);
126
-
127
- class EndpointHelper {
128
- static extract(endpoint) {
129
- if (!endpoint)
130
- return [];
131
- console.debug('[CommandPage] endpoint:', endpoint);
132
- return (endpoint.match(/{(\w+)}/g) || []).map(key => key.slice(1, -1));
133
- }
134
- static resolve(endpoint, params) {
135
- return endpoint.replace(/{(\w+)}/g, (_, key) => {
136
- if (params[key] === undefined) {
137
- throw new Error(`Missing parameter: ${key}`);
138
- }
139
- return params[key];
140
- });
141
- }
142
- }
143
-
144
- function join(...paths) {
145
- return paths.map(path => path.replace(/(^\/|\/$)/g, '')).join('/');
146
- }
147
- class CommandHelper {
148
- static resolveEndpoint(command, params) {
149
- return EndpointHelper.resolve(join(command.webApiRequest.serverUrl, command.webApiRequest.path), params);
150
- }
151
- }
152
-
153
- class Database {
154
- title;
155
- properties;
156
- }
157
-
158
- class GoogleCredential {
159
- accessToken;
160
- idToken;
161
- refreshToken;
162
- expiresIn;
163
- photoUrl;
164
- }
165
- __decorate([
166
- Firestore.String(),
167
- __metadata("design:type", String)
168
- ], GoogleCredential.prototype, "accessToken", void 0);
169
- __decorate([
170
- Firestore.String(),
171
- __metadata("design:type", String)
172
- ], GoogleCredential.prototype, "idToken", void 0);
173
- __decorate([
174
- Firestore.String(),
175
- __metadata("design:type", String)
176
- ], GoogleCredential.prototype, "refreshToken", void 0);
177
- __decorate([
178
- Firestore.Number(),
179
- __metadata("design:type", Number)
180
- ], GoogleCredential.prototype, "expiresIn", void 0);
181
- __decorate([
182
- Firestore.String(),
183
- __metadata("design:type", String)
184
- ], GoogleCredential.prototype, "photoUrl", void 0);
185
- class Google {
186
- id = 'google';
187
- userId;
188
- credential;
189
- }
190
- __decorate([
191
- Firestore.ID(),
192
- __metadata("design:type", String)
193
- ], Google.prototype, "id", void 0);
194
- __decorate([
195
- Firestore.String(),
196
- __metadata("design:type", String)
197
- ], Google.prototype, "userId", void 0);
198
- __decorate([
199
- Firestore.Map(() => GoogleCredential),
200
- __metadata("design:type", GoogleCredential)
201
- ], Google.prototype, "credential", void 0);
202
-
203
- class OpenApi {
204
- openApi;
205
- constructor(openApi) {
206
- this.openApi = openApi;
207
- }
208
- get apiJsonUrl() {
209
- return this.openApi.apiJsonUrl;
210
- }
211
- getMethods(path) {
212
- return OpenApiHelper.getMethods(this.openApi, path);
213
- }
214
- getMethod(path, method) {
215
- return OpenApiHelper.getMethod(this.openApi, path, method);
216
- }
217
- getContentType(path, method) {
218
- return OpenApiHelper.getContentType(this.openApi, path, method);
219
- }
220
- getSummary(path, method) {
221
- return OpenApiHelper.getSummary(this.openApi, path, method);
222
- }
223
- getDescription(path, method) {
224
- return get(this.openApi, ['paths', path, method, 'description']);
225
- }
226
- getSecurity(path, method) {
227
- return get(this.openApi, ['paths', path, method, 'security']);
228
- }
229
- getRequestBodySchema(path, method, contentType = this.getContentType(path, method)) {
230
- return OpenApiHelper.getRequestBodySchema(this.openApi, path, method, contentType);
231
- }
232
- getResponseContentType(path, method) {
233
- return Object.keys(get(this.openApi, ['paths', path, method, 'responses', '200', 'content']) ?? {})[0];
234
- }
235
- getOperationId(path, method) {
236
- return OpenApiHelper.getOperationId(this.openApi, path, method);
237
- }
238
- getEndpoints() {
239
- return OpenApiHelper.getEndpoints(this.openApi);
240
- }
241
- getPaths() {
242
- return OpenApiHelper.getPaths(this.openApi);
243
- }
244
- getServerUrl() {
245
- return this.openApi?.servers?.[0]?.url;
246
- // ?? (this.openApi. as string).replace(/\/api-json$/, '/api'),
247
- }
248
- }
249
- class OpenApiHelper {
250
- static getContentType(openApi, endpoint, method) {
251
- return Object.keys(get(openApi, ['paths', endpoint, method, 'requestBody', 'content']) ?? {})?.[0] ?? null;
252
- }
253
- static getSummary(openApi, endpoint, method) {
254
- return get(openApi, ['paths', endpoint, method, 'summary']);
255
- }
256
- static getOperationId(openApi, endpoint, method) {
257
- return get(openApi, ['paths', endpoint, method, 'operationId']);
258
- }
259
- static getParameters(openApi, endpoint, method) {
260
- return get(openApi, ['paths', endpoint, method, 'parameters']);
261
- }
262
- static getRequestBodySchema(openApi, endpoint, method, contentType = this.getContentType(openApi, endpoint, method)) {
263
- return get(openApi, ['paths', endpoint, method, 'requestBody', 'content', contentType, 'schema']) ?? 'unkown';
264
- }
265
- static getMethod(openApi, endpoint, method) {
266
- return get(openApi, ['paths', endpoint, method]);
267
- }
268
- static getMethods(openApi, endpoint) {
269
- return Object.keys(get(openApi, ['paths', endpoint]) ?? {});
270
- }
271
- static getEndpoints(openApi) {
272
- return Object.keys(OpenApiHelper.getPaths(openApi));
273
- }
274
- static getPaths(openApi) {
275
- return get(openApi, 'paths') ?? {};
276
- }
277
- }
278
-
279
- var OperatorType;
280
- (function (OperatorType) {
281
- OperatorType["ASSISTANT"] = "assistant";
282
- OperatorType["SYSTEM"] = "system";
283
- OperatorType["WORKFLOW"] = "workflow";
284
- })(OperatorType || (OperatorType = {}));
285
-
286
- const GRAPHQL_QUERY_MAKER = {
287
- id: 'graphql-query-maker',
288
- type: OperatorType.ASSISTANT,
289
- name: 'graphql-query-maker',
290
- description: 'Make a graphql query',
291
- inputInterfaceId: 'interfaces:default:plain',
292
- outputInterfaceId: 'interfaces:default:graphql',
293
- };
294
-
295
- var AiType;
296
- (function (AiType) {
297
- AiType["OPEN_AI"] = "openai";
298
- AiType["AZURE_OPEN_AI"] = "azureopenai";
299
- })(AiType || (AiType = {}));
300
-
301
- class QueryHelper {
302
- static validate(query) {
303
- if (query.graphql.endpoint === '')
304
- return false;
305
- return this.validateGraphqlQuery(query.graphql.query);
306
- }
307
- static validateGraphqlQuery(query) {
308
- try {
309
- gql `${query}`;
310
- return true;
311
- }
312
- catch (error) {
313
- return false;
314
- }
315
- }
316
- static tryParseJson(value, fallback = {}) {
317
- try {
318
- return JSON.parse(value);
319
- }
320
- catch (error) {
321
- return fallback;
322
- }
323
- }
324
- static setup(query, partialVariables = {}) {
325
- const parsedQuery = this.tryParse(query);
326
- const variables = this.mergeVariables(parsedQuery.graphql.variables, partialVariables);
327
- return {
328
- ...parsedQuery,
329
- graphql: {
330
- ...parsedQuery?.graphql,
331
- variablesJson: JSON.stringify(variables, null, 2),
332
- variables,
333
- },
334
- };
335
- }
336
- static mergeVariables(variables, params) {
337
- return merge(variables, pick(params, Object.keys(variables)));
338
- }
339
- static getResult(result, key = Object.keys(result)[0]) {
340
- return deepSnakeToCamelCase(result[key][0]);
341
- }
342
- static getResultErrors(result) {
343
- return result.errors;
344
- }
345
- static throwResultError(result) {
346
- if (result.errors) {
347
- throw new Error(result.errors[0].message);
348
- }
349
- }
350
- static tryParse(query) {
351
- const variables = QueryHelper.tryParseJson(query.graphql.variablesJson);
352
- const headers = QueryHelper.tryParseJson(query.graphql.headersJson);
353
- return {
354
- ...query,
355
- graphql: {
356
- ...query.graphql,
357
- variables,
358
- headers,
359
- },
360
- };
361
- }
362
- static mapFieldsToColumns(ast) {
363
- const typeMappings = {};
364
- ast.definitions.forEach(def => {
365
- if (def.kind === 'ObjectTypeDefinition') {
366
- const typeDef = def;
367
- const typeName = typeDef.name.value;
368
- const fields = typeDef.fields || [];
369
- typeMappings[typeName] = {};
370
- fields.forEach((field) => {
371
- const fieldName = field.name.value;
372
- const columnName = camelCase(fieldName);
373
- typeMappings[typeName][fieldName] = columnName;
374
- });
375
- }
376
- });
377
- return typeMappings;
378
- }
379
- static snakeToCamelObject(obj) {
380
- if (obj === null || typeof obj !== 'object')
381
- return obj;
382
- if (Array.isArray(obj))
383
- return obj.map(QueryHelper.snakeToCamelObject);
384
- return Object.fromEntries(Object.entries(obj).map(([key, value]) => {
385
- // '__typename'のようにunderscoreが含まれる場合はそのまま返す
386
- if (key.startsWith('__'))
387
- return [key, value];
388
- return [key.replace(/_([a-z])/g, (_, c) => c.toUpperCase()), QueryHelper.snakeToCamelObject(value)];
389
- }));
390
- }
391
- static parseResult(result) {
392
- const keys = Object.keys(result?.data || {});
393
- const map = keys.reduce((acc, key) => {
394
- const items = result?.data?.[key] || [];
395
- return { ...acc, [key]: QueryHelper.snakeToCamelObject(Array.isArray(items) ? items : [items]) };
396
- }, {});
397
- return map;
398
- }
399
- static extractColumnNames(items, childrenKey) {
400
- console.debug('[extractColumnNames] items:', items);
401
- const schema = createCompoundSchema(items);
402
- if (!schema)
403
- return [];
404
- console.debug('[extractColumnNames] schema:', schema);
405
- const columnNames = extractDisplayFields(schema).filter(name => !name.endsWith('__typename'));
406
- console.debug('[extractColumnNames] columnNames:', columnNames);
407
- const results = [
408
- // '__checkbox'
409
- ];
410
- if (childrenKey) {
411
- const primaryKey = columnNames[0];
412
- const excludeKeySet = new Set([primaryKey, childrenKey]);
413
- results.push(`__tree_${primaryKey}`);
414
- results.push(...columnNames.filter(name => !excludeKeySet.has(name)));
415
- }
416
- else {
417
- results.push(...columnNames);
418
- }
419
- return results;
420
- }
421
- static convertToV2(query) {
422
- if (query?.type === 'graphql')
423
- return query;
424
- return {
425
- id: query.id,
426
- projectId: query.projectId,
427
- type: 'graphql',
428
- title: query.title,
429
- summary: query.summary,
430
- graphql: {
431
- endpoint: query.endpoint,
432
- query: query.query,
433
- headersJson: query.headersJson,
434
- variablesJson: query.variablesJson,
435
- },
436
- createdAt: query.createdAt,
437
- updatedAt: query.updatedAt,
438
- };
439
- }
440
- static overwrite(current, preVariables) {
441
- const overwrite = Object.entries(current).reduce((acc, [key, value]) => {
442
- if (!(key in preVariables))
443
- return acc;
444
- const preValue = preVariables?.[key] ?? '';
445
- if (typeof preValue === 'string' && preValue.startsWith('%') && preValue.endsWith('%')) {
446
- acc[key] = `%${value}%`;
447
- }
448
- else if (typeof preValue === 'string' && preValue.startsWith('%')) {
449
- acc[key] = `%${value}`;
450
- }
451
- else if (typeof preValue === 'string' && preValue.endsWith('%')) {
452
- acc[key] = `${value}%`;
453
- }
454
- else if (typeof preValue === 'string') {
455
- acc[key] = `${value}`;
456
- }
457
- else if (Array.isArray(preValue)) {
458
- acc[key] = value ?? [];
459
- }
460
- else {
461
- acc[key] = value;
462
- }
463
- return acc;
464
- }, {});
465
- return Object.entries(overwrite).reduce((acc, [key, value]) => ({
466
- ...acc,
467
- [key]: value,
468
- }), { ...preVariables });
469
- }
470
- static formatGraphql(gql) {
471
- return format(gql, { parser: 'graphql', plugins: [graphqlParser] });
472
- }
473
- static buildTemp(query) {
474
- return merge({
475
- id: '',
476
- type: 'graphql',
477
- projectId: 'default',
478
- title: 'Temporary Query',
479
- summary: '',
480
- graphql: {
481
- endpoint: '',
482
- variablesJson: JSON.stringify({
483
- id: '$id',
484
- }, null, 2),
485
- headersJson: JSON.stringify({
486
- "content-type": "application/json",
487
- "Authorization": "Bearer $MACHINA_AUTH_ACCESS_TOKEN"
488
- }, null, 2),
489
- query: ``,
490
- },
491
- createdAt: undefined,
492
- updatedAt: undefined,
493
- }, query);
494
- }
495
- }
496
-
497
- class Query {
498
- id;
499
- projectId;
500
- title;
501
- summary;
502
- type;
503
- graphql;
504
- createdAt;
505
- updatedAt;
506
- /** @deprecated use `graphql.endpoint` instead */
507
- endpoint;
508
- /** @deprecated use `graphql.query` instead */
509
- query;
510
- /** @deprecated use `graphql.headersJson` instead */
511
- headersJson;
512
- /** @deprecated use `graphql.variablesJson` instead */
513
- variablesJson;
514
- }
515
- __decorate([
516
- IsString(),
517
- Firestore$1.String(),
518
- Hasura.Text(),
519
- __metadata("design:type", String)
520
- ], Query.prototype, "id", void 0);
521
- __decorate([
522
- IsString(),
523
- Firestore$1.String(),
524
- Hasura.Text(),
525
- __metadata("design:type", String)
526
- ], Query.prototype, "projectId", void 0);
527
- __decorate([
528
- IsString(),
529
- Firestore$1.String(),
530
- Hasura.Text(),
531
- __metadata("design:type", String)
532
- ], Query.prototype, "title", void 0);
533
- __decorate([
534
- IsString(),
535
- Firestore$1.String(),
536
- Hasura.Text(),
537
- __metadata("design:type", String)
538
- ], Query.prototype, "summary", void 0);
539
- __decorate([
540
- Optional(),
541
- IsString(),
542
- Firestore$1.String(),
543
- Hasura.Text(),
544
- __metadata("design:type", String)
545
- ], Query.prototype, "type", void 0);
546
- __decorate([
547
- Optional(),
548
- ValidateNested(),
549
- Firestore$1.Map(),
550
- Hasura.JSON(),
551
- __metadata("design:type", QueryGraphql)
552
- ], Query.prototype, "graphql", void 0);
553
- __decorate([
554
- Nullable(),
555
- Optional(),
556
- IsDayjs(),
557
- TransformToDayjs(),
558
- Firestore$1.Timestamp(),
559
- __metadata("design:type", dayjs.Dayjs)
560
- ], Query.prototype, "createdAt", void 0);
561
- __decorate([
562
- Nullable(),
563
- Optional(),
564
- IsDayjs(),
565
- TransformToDayjs(),
566
- Firestore$1.Timestamp(),
567
- __metadata("design:type", dayjs.Dayjs)
568
- ], Query.prototype, "updatedAt", void 0);
569
- __decorate([
570
- Optional(),
571
- IsString(),
572
- Firestore$1.String(),
573
- __metadata("design:type", String)
574
- ], Query.prototype, "endpoint", void 0);
575
- __decorate([
576
- Optional(),
577
- IsString(),
578
- Firestore$1.String(),
579
- __metadata("design:type", String)
580
- ], Query.prototype, "query", void 0);
581
- __decorate([
582
- Optional(),
583
- IsString(),
584
- Firestore$1.String(),
585
- __metadata("design:type", String)
586
- ], Query.prototype, "headersJson", void 0);
587
- __decorate([
588
- Optional(),
589
- IsString(),
590
- Firestore$1.String(),
591
- __metadata("design:type", String)
592
- ], Query.prototype, "variablesJson", void 0);
593
- class QueryGraphql {
594
- endpoint;
595
- query;
596
- headersJson;
597
- headers;
598
- variablesJson;
599
- variables;
600
- }
601
- __decorate([
602
- IsString(),
603
- Firestore$1.String(),
604
- Hasura.Text(),
605
- __metadata("design:type", String)
606
- ], QueryGraphql.prototype, "endpoint", void 0);
607
- __decorate([
608
- IsString(),
609
- Firestore$1.String(),
610
- Hasura.Text(),
611
- __metadata("design:type", String)
612
- ], QueryGraphql.prototype, "query", void 0);
613
- __decorate([
614
- Optional(),
615
- IsString(),
616
- Firestore$1.String(),
617
- Hasura.Text(),
618
- __metadata("design:type", String)
619
- ], QueryGraphql.prototype, "headersJson", void 0);
620
- __decorate([
621
- Optional(),
622
- IsString(),
623
- Firestore$1.String(),
624
- Hasura.Text(),
625
- __metadata("design:type", String)
626
- ], QueryGraphql.prototype, "variablesJson", void 0);
627
-
628
- class ResourceHelper {
629
- static getDescription(resource) {
630
- if (resource.type === 'openapi') {
631
- return resource?.openapi?.url ?? '';
632
- }
633
- else if (resource.type === 'graphql') {
634
- return resource?.graphql?.url ?? '';
635
- }
636
- }
637
- }
638
-
639
- let Resource = class Resource {
640
- id;
641
- projectId;
642
- name;
643
- type;
644
- openapi;
645
- graphql;
646
- createdAt;
647
- updatedAt;
648
- };
649
- __decorate([
650
- Domain.Lang('ID'),
651
- Firestore$1.String(),
652
- Hasura.Text(),
653
- __metadata("design:type", String)
654
- ], Resource.prototype, "id", void 0);
655
- __decorate([
656
- Domain.Lang('プロジェクトID'),
657
- Firestore$1.String(),
658
- Hasura.Text(),
659
- __metadata("design:type", String)
660
- ], Resource.prototype, "projectId", void 0);
661
- __decorate([
662
- Domain.Lang('名称'),
663
- Firestore$1.String(),
664
- Hasura.Text(),
665
- __metadata("design:type", String)
666
- ], Resource.prototype, "name", void 0);
667
- __decorate([
668
- Domain.Lang('種別'),
669
- Firestore$1.String(),
670
- Hasura.Text(),
671
- __metadata("design:type", String)
672
- ], Resource.prototype, "type", void 0);
673
- __decorate([
674
- Domain.Lang('OpenAPI設定'),
675
- Optional(),
676
- Firestore$1.Map(),
677
- Hasura.JSON(),
678
- __metadata("design:type", Object)
679
- ], Resource.prototype, "openapi", void 0);
680
- __decorate([
681
- Domain.Lang('GraphQL設定'),
682
- Optional(),
683
- Firestore$1.Map(),
684
- Hasura.JSON(),
685
- __metadata("design:type", Object)
686
- ], Resource.prototype, "graphql", void 0);
687
- __decorate([
688
- Nullable(),
689
- Optional(),
690
- IsDayjs(),
691
- TransformToDayjs$1(),
692
- Firestore$1.Timestamp(),
693
- Hasura.Timestamp(),
694
- __metadata("design:type", dayjs.Dayjs)
695
- ], Resource.prototype, "createdAt", void 0);
696
- __decorate([
697
- Nullable(),
698
- Optional(),
699
- IsDayjs(),
700
- TransformToDayjs$1(),
701
- Firestore$1.Timestamp(),
702
- Hasura.Timestamp(),
703
- __metadata("design:type", dayjs.Dayjs)
704
- ], Resource.prototype, "updatedAt", void 0);
705
- Resource = __decorate([
706
- Domain.Entity({ name: 'リソース' })
707
- ], Resource);
708
-
709
- class Schedule {
710
- id;
711
- calendarId;
712
- url;
713
- name;
714
- color;
715
- startAt;
716
- endAt;
717
- static from(params) {
718
- const schedule = new Schedule();
719
- Object.assign(schedule, {
720
- name: '',
721
- calendarId: 'primary',
722
- ...params
723
- });
724
- return schedule;
725
- }
726
- }
727
- __decorate([
728
- IsString(),
729
- __metadata("design:type", String)
730
- ], Schedule.prototype, "id", void 0);
731
- __decorate([
732
- IsString(),
733
- __metadata("design:type", String)
734
- ], Schedule.prototype, "calendarId", void 0);
735
- __decorate([
736
- IsString(),
737
- IsOptional(),
738
- __metadata("design:type", String)
739
- ], Schedule.prototype, "url", void 0);
740
- __decorate([
741
- IsString(),
742
- __metadata("design:type", String)
743
- ], Schedule.prototype, "name", void 0);
744
- __decorate([
745
- IsString(),
746
- __metadata("design:type", String)
747
- ], Schedule.prototype, "color", void 0);
748
- __decorate([
749
- IsDayjs$1(),
750
- TransformToDayjs$1(),
751
- __metadata("design:type", dayjs.Dayjs)
752
- ], Schedule.prototype, "startAt", void 0);
753
- __decorate([
754
- IsDayjs$1(),
755
- TransformToDayjs$1(),
756
- __metadata("design:type", dayjs.Dayjs)
757
- ], Schedule.prototype, "endAt", void 0);
758
- function isConflict(a, b) {
759
- if (a.startAt.isSame(b.endAt))
760
- return false;
761
- if (a.endAt.isSame(b.startAt))
762
- return false;
763
- if (a.startAt.isBefore(b.startAt) && a.endAt.isBefore(b.startAt))
764
- return false;
765
- if (a.startAt.isAfter(b.endAt) && a.endAt.isAfter(b.endAt))
766
- return false;
767
- return true;
768
- }
769
- class Calendar {
770
- id;
771
- name;
772
- color;
773
- static from(params) {
774
- const calendar = new Calendar();
775
- Object.assign(calendar, params);
776
- return calendar;
777
- }
778
- }
779
- function buildCalendarDate(dates) {
780
- const minDate = dates.reduce((min, date) => date.date.isBefore(min) ? date.date : min, dates[0].date);
781
- const maxDate = dates.reduce((max, date) => date.date.isAfter(max) ? date.date : max, dates[0].date);
782
- const startDate = minDate.clone().startOf('week');
783
- const endDate = maxDate.clone().endOf('week');
784
- // console.debug('startDate', startDate.format('YYYY/MM/DD'));
785
- // console.debug('endDate', endDate.format('YYYY/MM/DD'));
786
- const month = [];
787
- let date = startDate.clone();
788
- while (date.isBefore(endDate)) {
789
- const week = [];
790
- for (let i = 0; i < 7; i++) {
791
- const found = dates.find(d => d.date.isSame(date, 'day'));
792
- week.push(found || { schedules: [], date: date.clone() });
793
- date = date.add(1, 'day');
794
- }
795
- month.push(week);
796
- }
797
- return month;
798
- }
799
-
800
- /**
801
- * Generated bundle index. Do not edit.
802
- */
803
-
804
- export { AiType, Assistant, Bookmarklet, Calendar, CommandHelper, Database, EndpointHelper, GRAPHQL_QUERY_MAKER, Google, GoogleCredential, OpenApi, OpenApiHelper, OperatorType, Query, QueryGraphql, QueryHelper, Resource, ResourceHelper, Schedule, WebAPiRequestCommand, WebApiRequest, buildCalendarDate, isConflict };
805
- //# sourceMappingURL=xxmachina-common-domain-models.mjs.map