@constructive-sdk/cli 0.32.2 → 0.32.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 (536) hide show
  1. package/agent/orm/input-types.d.ts +24 -0
  2. package/agent/orm/input-types.js +3 -0
  3. package/api/cli/commands/ast-migration.js +20 -31
  4. package/{esm/infra/cli/commands/infra-ref.d.ts → api/cli/commands/http-route.d.ts} +1 -1
  5. package/api/cli/commands/http-route.js +434 -0
  6. package/{esm/compute/cli/commands/get-all-record.d.ts → api/cli/commands/managed-domain.d.ts} +1 -1
  7. package/api/cli/commands/managed-domain.js +382 -0
  8. package/api/cli/commands/resolve-http-route.d.ts +8 -0
  9. package/api/cli/commands/resolve-http-route.js +44 -0
  10. package/api/cli/commands/sql-action.js +20 -31
  11. package/api/cli/commands.js +7 -3
  12. package/api/cli/executor.d.ts +7 -1
  13. package/api/orm/index.d.ts +9 -2
  14. package/api/orm/index.js +4 -2
  15. package/api/orm/input-types.d.ts +498 -143
  16. package/api/orm/input-types.js +4 -0
  17. package/api/orm/models/httpRoute.d.ts +54 -0
  18. package/{infra/orm/models/infraRef.js → api/orm/models/httpRoute.js} +27 -30
  19. package/api/orm/models/index.d.ts +2 -1
  20. package/api/orm/models/index.js +5 -3
  21. package/api/orm/models/managedDomain.d.ts +54 -0
  22. package/{infra/orm/models/infraCommit.js → api/orm/models/managedDomain.js} +27 -30
  23. package/api/orm/query/index.d.ts +12 -0
  24. package/api/orm/query/index.js +20 -0
  25. package/auth/cli/commands/identity-provider.js +4 -8
  26. package/auth/cli/commands/org-api-key-list.js +9 -18
  27. package/auth/cli/commands/user-connected-account.js +5 -10
  28. package/auth/orm/input-types.d.ts +155 -182
  29. package/auth/orm/input-types.js +4 -0
  30. package/compute/cli/commands/declared-capacity.d.ts +8 -0
  31. package/compute/cli/commands/declared-capacity.js +247 -0
  32. package/compute/cli/commands/function-definition.js +48 -0
  33. package/compute/cli/commands/function-graph-execution-node-state.js +66 -0
  34. package/compute/cli/commands/function-graph-execution.js +176 -0
  35. package/compute/cli/commands/function-invocation.js +66 -0
  36. package/compute/cli/commands/get-all-tree-nodes-record.d.ts +8 -0
  37. package/compute/cli/commands/{get-all-record.js → get-all-tree-nodes-record.js} +5 -5
  38. package/compute/cli/commands/infra-commit.js +19 -19
  39. package/compute/cli/commands/infra-get-all-tree-nodes-record.d.ts +8 -0
  40. package/{api/cli/commands/migrate-file.js → compute/cli/commands/infra-get-all-tree-nodes-record.js} +22 -28
  41. package/compute/cli/commands/infra-object.js +19 -19
  42. package/compute/cli/commands/infra-ref.js +17 -17
  43. package/compute/cli/commands/infra-store.js +20 -20
  44. package/compute/cli/commands/namespace-event.js +0 -154
  45. package/compute/cli/commands/platform-declared-capacity.d.ts +8 -0
  46. package/compute/cli/commands/platform-declared-capacity.js +247 -0
  47. package/compute/cli/commands/platform-function-definition.js +48 -0
  48. package/compute/cli/commands/platform-function-invocation.js +66 -0
  49. package/compute/cli/commands/platform-infra-commit.d.ts +8 -0
  50. package/{infra/cli/commands/infra-commit.js → compute/cli/commands/platform-infra-commit.js} +8 -8
  51. package/compute/cli/commands/platform-infra-get-all-tree-nodes-record.d.ts +8 -0
  52. package/compute/cli/commands/{infra-get-all-record.js → platform-infra-get-all-tree-nodes-record.js} +7 -5
  53. package/compute/cli/commands/platform-infra-init-empty-repo.d.ts +8 -0
  54. package/{infra/cli/commands/infra-init-empty-repo.js → compute/cli/commands/platform-infra-init-empty-repo.js} +3 -3
  55. package/compute/cli/commands/platform-infra-insert-node-at-path.d.ts +8 -0
  56. package/compute/cli/commands/platform-infra-insert-node-at-path.js +36 -0
  57. package/compute/cli/commands/platform-infra-object.d.ts +8 -0
  58. package/{infra/cli/commands/infra-object.js → compute/cli/commands/platform-infra-object.js} +8 -8
  59. package/compute/cli/commands/platform-infra-ref.d.ts +8 -0
  60. package/{infra/cli/commands/infra-ref.js → compute/cli/commands/platform-infra-ref.js} +8 -8
  61. package/compute/cli/commands/platform-infra-set-data-at-path.d.ts +8 -0
  62. package/{infra/cli/commands/infra-set-data-at-path.js → compute/cli/commands/platform-infra-set-data-at-path.js} +3 -3
  63. package/compute/cli/commands/{infra-get-all-record.d.ts → platform-infra-store.d.ts} +1 -1
  64. package/{infra/cli/commands/infra-store.js → compute/cli/commands/platform-infra-store.js} +8 -8
  65. package/compute/cli/commands/platform-namespace-event.js +0 -154
  66. package/compute/cli/commands/platform-resource-installation.d.ts +8 -0
  67. package/compute/cli/commands/platform-resource-installation.js +436 -0
  68. package/compute/cli/commands/platform-resource-installations-install.d.ts +8 -0
  69. package/compute/cli/commands/platform-resource-installations-install.js +36 -0
  70. package/compute/cli/commands/platform-resource-installations-rollback.d.ts +8 -0
  71. package/compute/cli/commands/platform-resource-installations-rollback.js +36 -0
  72. package/compute/cli/commands/platform-resource-installations-uninstall.d.ts +8 -0
  73. package/compute/cli/commands/platform-resource-installations-uninstall.js +36 -0
  74. package/compute/cli/commands/platform-resource-installations-upgrade.d.ts +8 -0
  75. package/compute/cli/commands/platform-resource-installations-upgrade.js +36 -0
  76. package/compute/cli/commands/platform-resource-usage-log.d.ts +8 -0
  77. package/compute/cli/commands/platform-resource-usage-log.js +386 -0
  78. package/compute/cli/commands/platform-resource-usage-summary.d.ts +8 -0
  79. package/compute/cli/commands/platform-resource-usage-summary.js +389 -0
  80. package/compute/cli/commands/platform-resource-utilization-daily.d.ts +8 -0
  81. package/compute/cli/commands/platform-resource-utilization-daily.js +313 -0
  82. package/compute/cli/commands/platform-resource.js +51 -0
  83. package/compute/cli/commands/platform-resources-health.d.ts +8 -0
  84. package/compute/cli/commands/platform-resources-health.js +413 -0
  85. package/compute/cli/commands/platform-webhook-endpoint.d.ts +8 -0
  86. package/compute/cli/commands/platform-webhook-endpoint.js +432 -0
  87. package/compute/cli/commands/platform-webhook-event.d.ts +8 -0
  88. package/compute/cli/commands/platform-webhook-event.js +414 -0
  89. package/compute/cli/commands/resource-installation.d.ts +8 -0
  90. package/compute/cli/commands/resource-installation.js +456 -0
  91. package/compute/cli/commands/resource-installations-install.d.ts +8 -0
  92. package/compute/cli/commands/resource-installations-install.js +36 -0
  93. package/compute/cli/commands/resource-installations-rollback.d.ts +8 -0
  94. package/compute/cli/commands/resource-installations-rollback.js +36 -0
  95. package/compute/cli/commands/resource-installations-uninstall.d.ts +8 -0
  96. package/compute/cli/commands/resource-installations-uninstall.js +36 -0
  97. package/compute/cli/commands/resource-installations-upgrade.d.ts +8 -0
  98. package/compute/cli/commands/resource-installations-upgrade.js +36 -0
  99. package/compute/cli/commands/resource-usage-log.d.ts +8 -0
  100. package/compute/cli/commands/resource-usage-log.js +406 -0
  101. package/compute/cli/commands/resource-usage-summary.d.ts +8 -0
  102. package/compute/cli/commands/resource-usage-summary.js +409 -0
  103. package/compute/cli/commands/resource-utilization-daily.d.ts +8 -0
  104. package/compute/cli/commands/resource-utilization-daily.js +313 -0
  105. package/compute/cli/commands/resource.js +51 -0
  106. package/compute/cli/commands/resources-health.d.ts +8 -0
  107. package/compute/cli/commands/resources-health.js +424 -0
  108. package/compute/cli/commands/webhook-endpoint.d.ts +8 -0
  109. package/compute/cli/commands/webhook-endpoint.js +452 -0
  110. package/{api/cli/commands/migrate-file.d.ts → compute/cli/commands/webhook-event.d.ts} +1 -1
  111. package/compute/cli/commands/webhook-event.js +434 -0
  112. package/compute/cli/commands.js +69 -5
  113. package/compute/cli/executor.d.ts +78 -2
  114. package/compute/orm/index.d.ts +101 -4
  115. package/compute/orm/index.js +46 -4
  116. package/compute/orm/input-types.d.ts +5356 -772
  117. package/compute/orm/input-types.js +34 -2
  118. package/compute/orm/models/declaredCapacity.d.ts +30 -0
  119. package/compute/orm/models/{infraGetAllRecord.js → declaredCapacity.js} +15 -15
  120. package/compute/orm/models/getAllTreeNodesRecord.d.ts +30 -0
  121. package/compute/orm/models/{getAllRecord.js → getAllTreeNodesRecord.js} +15 -15
  122. package/compute/orm/models/index.d.ts +23 -2
  123. package/compute/orm/models/index.js +48 -5
  124. package/compute/orm/models/infraCommit.d.ts +2 -2
  125. package/compute/orm/models/infraCommit.js +2 -2
  126. package/compute/orm/models/infraGetAllTreeNodesRecord.d.ts +30 -0
  127. package/compute/orm/models/infraGetAllTreeNodesRecord.js +59 -0
  128. package/compute/orm/models/infraObject.d.ts +2 -2
  129. package/compute/orm/models/infraObject.js +2 -2
  130. package/compute/orm/models/infraRef.d.ts +2 -2
  131. package/compute/orm/models/infraRef.js +2 -2
  132. package/compute/orm/models/platformDeclaredCapacity.d.ts +30 -0
  133. package/{objects/orm/models/getAllRecord.js → compute/orm/models/platformDeclaredCapacity.js} +15 -15
  134. package/compute/orm/models/platformInfraCommit.d.ts +56 -0
  135. package/compute/orm/models/platformInfraCommit.js +107 -0
  136. package/compute/orm/models/platformInfraGetAllTreeNodesRecord.d.ts +30 -0
  137. package/compute/orm/models/platformInfraGetAllTreeNodesRecord.js +59 -0
  138. package/compute/orm/models/platformInfraObject.d.ts +56 -0
  139. package/{infra/orm/models/infraObject.js → compute/orm/models/platformInfraObject.js} +25 -25
  140. package/compute/orm/models/platformInfraRef.d.ts +56 -0
  141. package/compute/orm/models/platformInfraRef.js +107 -0
  142. package/compute/orm/models/platformInfraStore.d.ts +54 -0
  143. package/compute/orm/models/platformInfraStore.js +104 -0
  144. package/compute/orm/models/platformResourceInstallation.d.ts +54 -0
  145. package/compute/orm/models/platformResourceInstallation.js +104 -0
  146. package/compute/orm/models/platformResourceUsageLog.d.ts +56 -0
  147. package/compute/orm/models/platformResourceUsageLog.js +107 -0
  148. package/compute/orm/models/platformResourceUsageSummary.d.ts +56 -0
  149. package/compute/orm/models/platformResourceUsageSummary.js +107 -0
  150. package/compute/orm/models/platformResourceUtilizationDaily.d.ts +30 -0
  151. package/compute/orm/models/platformResourceUtilizationDaily.js +59 -0
  152. package/compute/orm/models/platformResourcesHealth.d.ts +36 -0
  153. package/compute/orm/models/platformResourcesHealth.js +80 -0
  154. package/compute/orm/models/platformWebhookEndpoint.d.ts +54 -0
  155. package/compute/orm/models/platformWebhookEndpoint.js +104 -0
  156. package/compute/orm/models/platformWebhookEvent.d.ts +54 -0
  157. package/compute/orm/models/platformWebhookEvent.js +104 -0
  158. package/compute/orm/models/resourceInstallation.d.ts +54 -0
  159. package/compute/orm/models/resourceInstallation.js +104 -0
  160. package/compute/orm/models/resourceUsageLog.d.ts +56 -0
  161. package/compute/orm/models/resourceUsageLog.js +107 -0
  162. package/compute/orm/models/resourceUsageSummary.d.ts +56 -0
  163. package/compute/orm/models/resourceUsageSummary.js +107 -0
  164. package/compute/orm/models/resourceUtilizationDaily.d.ts +30 -0
  165. package/compute/orm/models/resourceUtilizationDaily.js +59 -0
  166. package/compute/orm/models/resourcesHealth.d.ts +36 -0
  167. package/{api/orm/models/migrateFile.js → compute/orm/models/resourcesHealth.js} +20 -20
  168. package/compute/orm/models/webhookEndpoint.d.ts +54 -0
  169. package/compute/orm/models/webhookEndpoint.js +104 -0
  170. package/compute/orm/models/webhookEvent.d.ts +54 -0
  171. package/{infra/orm/models/infraStore.js → compute/orm/models/webhookEvent.js} +27 -27
  172. package/compute/orm/mutation/index.d.ts +89 -1
  173. package/compute/orm/mutation/index.js +132 -0
  174. package/config/cli/commands/platform-internal-secret.js +7 -14
  175. package/config/cli/commands/platform-secret.js +8 -16
  176. package/config/cli/commands/secret.js +9 -18
  177. package/config/orm/input-types.d.ts +4 -79
  178. package/esm/agent/orm/input-types.d.ts +24 -0
  179. package/esm/agent/orm/input-types.js +3 -0
  180. package/esm/api/cli/commands/ast-migration.js +20 -31
  181. package/{infra/cli/commands/infra-ref.d.ts → esm/api/cli/commands/http-route.d.ts} +1 -1
  182. package/esm/api/cli/commands/http-route.js +432 -0
  183. package/esm/api/cli/commands/{migrate-file.d.ts → managed-domain.d.ts} +1 -1
  184. package/esm/api/cli/commands/managed-domain.js +380 -0
  185. package/esm/api/cli/commands/resolve-http-route.d.ts +8 -0
  186. package/esm/api/cli/commands/resolve-http-route.js +42 -0
  187. package/esm/api/cli/commands/sql-action.js +20 -31
  188. package/esm/api/cli/commands.js +7 -3
  189. package/esm/api/cli/executor.d.ts +7 -1
  190. package/esm/api/orm/index.d.ts +9 -2
  191. package/esm/api/orm/index.js +4 -2
  192. package/esm/api/orm/input-types.d.ts +498 -143
  193. package/esm/api/orm/input-types.js +4 -0
  194. package/esm/api/orm/models/httpRoute.d.ts +54 -0
  195. package/esm/{infra/orm/models/infraRef.js → api/orm/models/httpRoute.js} +25 -28
  196. package/esm/api/orm/models/index.d.ts +2 -1
  197. package/esm/api/orm/models/index.js +2 -1
  198. package/esm/api/orm/models/managedDomain.d.ts +54 -0
  199. package/esm/{infra/orm/models/infraCommit.js → api/orm/models/managedDomain.js} +25 -28
  200. package/esm/api/orm/query/index.d.ts +12 -0
  201. package/esm/api/orm/query/index.js +20 -0
  202. package/esm/auth/cli/commands/identity-provider.js +4 -8
  203. package/esm/auth/cli/commands/org-api-key-list.js +9 -18
  204. package/esm/auth/cli/commands/user-connected-account.js +5 -10
  205. package/esm/auth/orm/input-types.d.ts +155 -182
  206. package/esm/auth/orm/input-types.js +4 -0
  207. package/esm/compute/cli/commands/declared-capacity.d.ts +8 -0
  208. package/esm/compute/cli/commands/declared-capacity.js +245 -0
  209. package/esm/compute/cli/commands/function-definition.js +48 -0
  210. package/esm/compute/cli/commands/function-graph-execution-node-state.js +66 -0
  211. package/esm/compute/cli/commands/function-graph-execution.js +176 -0
  212. package/esm/compute/cli/commands/function-invocation.js +66 -0
  213. package/esm/compute/cli/commands/get-all-tree-nodes-record.d.ts +8 -0
  214. package/esm/{infra/cli/commands/infra-get-all-record.js → compute/cli/commands/get-all-tree-nodes-record.js} +5 -5
  215. package/esm/compute/cli/commands/infra-commit.js +19 -19
  216. package/esm/compute/cli/commands/infra-get-all-tree-nodes-record.d.ts +8 -0
  217. package/esm/{api/cli/commands/migrate-file.js → compute/cli/commands/infra-get-all-tree-nodes-record.js} +22 -28
  218. package/esm/compute/cli/commands/infra-object.js +19 -19
  219. package/esm/compute/cli/commands/infra-ref.js +17 -17
  220. package/esm/compute/cli/commands/infra-store.js +20 -20
  221. package/esm/compute/cli/commands/namespace-event.js +0 -154
  222. package/esm/compute/cli/commands/platform-declared-capacity.d.ts +8 -0
  223. package/esm/compute/cli/commands/platform-declared-capacity.js +245 -0
  224. package/esm/compute/cli/commands/platform-function-definition.js +48 -0
  225. package/esm/compute/cli/commands/platform-function-invocation.js +66 -0
  226. package/esm/compute/cli/commands/platform-infra-commit.d.ts +8 -0
  227. package/esm/{infra/cli/commands/infra-commit.js → compute/cli/commands/platform-infra-commit.js} +8 -8
  228. package/esm/compute/cli/commands/platform-infra-get-all-tree-nodes-record.d.ts +8 -0
  229. package/esm/compute/cli/commands/{infra-get-all-record.js → platform-infra-get-all-tree-nodes-record.js} +7 -5
  230. package/esm/compute/cli/commands/platform-infra-init-empty-repo.d.ts +8 -0
  231. package/esm/{infra/cli/commands/infra-insert-node-at-path.js → compute/cli/commands/platform-infra-init-empty-repo.js} +3 -3
  232. package/esm/compute/cli/commands/platform-infra-insert-node-at-path.d.ts +8 -0
  233. package/esm/compute/cli/commands/platform-infra-insert-node-at-path.js +34 -0
  234. package/esm/compute/cli/commands/platform-infra-object.d.ts +8 -0
  235. package/esm/{infra/cli/commands/infra-object.js → compute/cli/commands/platform-infra-object.js} +8 -8
  236. package/esm/compute/cli/commands/platform-infra-ref.d.ts +8 -0
  237. package/esm/{infra/cli/commands/infra-ref.js → compute/cli/commands/platform-infra-ref.js} +8 -8
  238. package/esm/compute/cli/commands/platform-infra-set-data-at-path.d.ts +8 -0
  239. package/esm/{infra/cli/commands/infra-set-data-at-path.js → compute/cli/commands/platform-infra-set-data-at-path.js} +3 -3
  240. package/esm/compute/cli/commands/platform-infra-store.d.ts +8 -0
  241. package/esm/{infra/cli/commands/infra-store.js → compute/cli/commands/platform-infra-store.js} +8 -8
  242. package/esm/compute/cli/commands/platform-namespace-event.js +0 -154
  243. package/esm/compute/cli/commands/platform-resource-installation.d.ts +8 -0
  244. package/esm/compute/cli/commands/platform-resource-installation.js +434 -0
  245. package/esm/compute/cli/commands/platform-resource-installations-install.d.ts +8 -0
  246. package/esm/compute/cli/commands/platform-resource-installations-install.js +34 -0
  247. package/esm/compute/cli/commands/platform-resource-installations-rollback.d.ts +8 -0
  248. package/esm/compute/cli/commands/platform-resource-installations-rollback.js +34 -0
  249. package/esm/compute/cli/commands/platform-resource-installations-uninstall.d.ts +8 -0
  250. package/esm/compute/cli/commands/platform-resource-installations-uninstall.js +34 -0
  251. package/esm/compute/cli/commands/platform-resource-installations-upgrade.d.ts +8 -0
  252. package/esm/compute/cli/commands/platform-resource-installations-upgrade.js +34 -0
  253. package/esm/compute/cli/commands/platform-resource-usage-log.d.ts +8 -0
  254. package/esm/compute/cli/commands/platform-resource-usage-log.js +384 -0
  255. package/esm/compute/cli/commands/platform-resource-usage-summary.d.ts +8 -0
  256. package/esm/compute/cli/commands/platform-resource-usage-summary.js +387 -0
  257. package/esm/compute/cli/commands/platform-resource-utilization-daily.d.ts +8 -0
  258. package/esm/compute/cli/commands/platform-resource-utilization-daily.js +311 -0
  259. package/esm/compute/cli/commands/platform-resource.js +51 -0
  260. package/esm/compute/cli/commands/platform-resources-health.d.ts +8 -0
  261. package/esm/compute/cli/commands/platform-resources-health.js +411 -0
  262. package/esm/compute/cli/commands/platform-webhook-endpoint.d.ts +8 -0
  263. package/esm/compute/cli/commands/platform-webhook-endpoint.js +430 -0
  264. package/esm/compute/cli/commands/platform-webhook-event.d.ts +8 -0
  265. package/esm/compute/cli/commands/platform-webhook-event.js +412 -0
  266. package/esm/compute/cli/commands/resource-installation.d.ts +8 -0
  267. package/esm/compute/cli/commands/resource-installation.js +454 -0
  268. package/esm/compute/cli/commands/resource-installations-install.d.ts +8 -0
  269. package/esm/compute/cli/commands/resource-installations-install.js +34 -0
  270. package/esm/compute/cli/commands/resource-installations-rollback.d.ts +8 -0
  271. package/esm/compute/cli/commands/resource-installations-rollback.js +34 -0
  272. package/esm/compute/cli/commands/resource-installations-uninstall.d.ts +8 -0
  273. package/esm/compute/cli/commands/resource-installations-uninstall.js +34 -0
  274. package/esm/compute/cli/commands/resource-installations-upgrade.d.ts +8 -0
  275. package/esm/compute/cli/commands/resource-installations-upgrade.js +34 -0
  276. package/esm/compute/cli/commands/resource-usage-log.d.ts +8 -0
  277. package/esm/compute/cli/commands/resource-usage-log.js +404 -0
  278. package/esm/compute/cli/commands/resource-usage-summary.d.ts +8 -0
  279. package/esm/compute/cli/commands/resource-usage-summary.js +407 -0
  280. package/esm/compute/cli/commands/resource-utilization-daily.d.ts +8 -0
  281. package/esm/compute/cli/commands/resource-utilization-daily.js +311 -0
  282. package/esm/compute/cli/commands/resource.js +51 -0
  283. package/esm/compute/cli/commands/resources-health.d.ts +8 -0
  284. package/esm/compute/cli/commands/resources-health.js +422 -0
  285. package/esm/compute/cli/commands/webhook-endpoint.d.ts +8 -0
  286. package/esm/compute/cli/commands/webhook-endpoint.js +450 -0
  287. package/{compute/cli/commands/get-all-record.d.ts → esm/compute/cli/commands/webhook-event.d.ts} +1 -1
  288. package/esm/compute/cli/commands/webhook-event.js +432 -0
  289. package/esm/compute/cli/commands.js +69 -5
  290. package/esm/compute/cli/executor.d.ts +78 -2
  291. package/esm/compute/orm/index.d.ts +101 -4
  292. package/esm/compute/orm/index.js +46 -4
  293. package/esm/compute/orm/input-types.d.ts +5356 -772
  294. package/esm/compute/orm/input-types.js +34 -2
  295. package/esm/compute/orm/models/declaredCapacity.d.ts +30 -0
  296. package/esm/{infra/orm/models/infraGetAllRecord.js → compute/orm/models/declaredCapacity.js} +13 -13
  297. package/esm/compute/orm/models/getAllTreeNodesRecord.d.ts +30 -0
  298. package/esm/{objects/orm/models/getAllRecord.js → compute/orm/models/getAllTreeNodesRecord.js} +13 -13
  299. package/esm/compute/orm/models/index.d.ts +23 -2
  300. package/esm/compute/orm/models/index.js +23 -2
  301. package/esm/compute/orm/models/infraCommit.d.ts +2 -2
  302. package/esm/compute/orm/models/infraCommit.js +2 -2
  303. package/esm/compute/orm/models/infraGetAllTreeNodesRecord.d.ts +30 -0
  304. package/esm/compute/orm/models/{infraGetAllRecord.js → infraGetAllTreeNodesRecord.js} +13 -13
  305. package/esm/compute/orm/models/infraObject.d.ts +2 -2
  306. package/esm/compute/orm/models/infraObject.js +2 -2
  307. package/esm/compute/orm/models/infraRef.d.ts +2 -2
  308. package/esm/compute/orm/models/infraRef.js +2 -2
  309. package/esm/compute/orm/models/platformDeclaredCapacity.d.ts +30 -0
  310. package/esm/compute/orm/models/platformDeclaredCapacity.js +55 -0
  311. package/esm/compute/orm/models/platformInfraCommit.d.ts +56 -0
  312. package/esm/compute/orm/models/platformInfraCommit.js +103 -0
  313. package/esm/compute/orm/models/platformInfraGetAllTreeNodesRecord.d.ts +30 -0
  314. package/esm/compute/orm/models/platformInfraGetAllTreeNodesRecord.js +55 -0
  315. package/esm/compute/orm/models/platformInfraObject.d.ts +56 -0
  316. package/esm/{infra/orm/models/infraObject.js → compute/orm/models/platformInfraObject.js} +23 -23
  317. package/esm/compute/orm/models/platformInfraRef.d.ts +56 -0
  318. package/esm/compute/orm/models/platformInfraRef.js +103 -0
  319. package/esm/compute/orm/models/platformInfraStore.d.ts +54 -0
  320. package/esm/compute/orm/models/platformInfraStore.js +100 -0
  321. package/esm/compute/orm/models/platformResourceInstallation.d.ts +54 -0
  322. package/esm/compute/orm/models/platformResourceInstallation.js +100 -0
  323. package/esm/compute/orm/models/platformResourceUsageLog.d.ts +56 -0
  324. package/esm/compute/orm/models/platformResourceUsageLog.js +103 -0
  325. package/esm/compute/orm/models/platformResourceUsageSummary.d.ts +56 -0
  326. package/esm/compute/orm/models/platformResourceUsageSummary.js +103 -0
  327. package/esm/compute/orm/models/platformResourceUtilizationDaily.d.ts +30 -0
  328. package/esm/compute/orm/models/platformResourceUtilizationDaily.js +55 -0
  329. package/esm/compute/orm/models/platformResourcesHealth.d.ts +36 -0
  330. package/esm/compute/orm/models/platformResourcesHealth.js +76 -0
  331. package/esm/compute/orm/models/platformWebhookEndpoint.d.ts +54 -0
  332. package/esm/compute/orm/models/platformWebhookEndpoint.js +100 -0
  333. package/esm/compute/orm/models/platformWebhookEvent.d.ts +54 -0
  334. package/esm/compute/orm/models/platformWebhookEvent.js +100 -0
  335. package/esm/compute/orm/models/resourceInstallation.d.ts +54 -0
  336. package/esm/compute/orm/models/resourceInstallation.js +100 -0
  337. package/esm/compute/orm/models/resourceUsageLog.d.ts +56 -0
  338. package/esm/compute/orm/models/resourceUsageLog.js +103 -0
  339. package/esm/compute/orm/models/resourceUsageSummary.d.ts +56 -0
  340. package/esm/compute/orm/models/resourceUsageSummary.js +103 -0
  341. package/esm/compute/orm/models/resourceUtilizationDaily.d.ts +30 -0
  342. package/esm/compute/orm/models/resourceUtilizationDaily.js +55 -0
  343. package/esm/compute/orm/models/resourcesHealth.d.ts +36 -0
  344. package/esm/{api/orm/models/migrateFile.js → compute/orm/models/resourcesHealth.js} +18 -18
  345. package/esm/compute/orm/models/webhookEndpoint.d.ts +54 -0
  346. package/esm/compute/orm/models/webhookEndpoint.js +100 -0
  347. package/esm/compute/orm/models/webhookEvent.d.ts +54 -0
  348. package/esm/{infra/orm/models/infraStore.js → compute/orm/models/webhookEvent.js} +25 -25
  349. package/esm/compute/orm/mutation/index.d.ts +89 -1
  350. package/esm/compute/orm/mutation/index.js +132 -0
  351. package/esm/config/cli/commands/platform-internal-secret.js +7 -14
  352. package/esm/config/cli/commands/platform-secret.js +8 -16
  353. package/esm/config/cli/commands/secret.js +9 -18
  354. package/esm/config/orm/input-types.d.ts +4 -79
  355. package/esm/infra/cli/commands/namespace-event.js +0 -154
  356. package/esm/infra/cli/commands/platform-infra-commit.d.ts +8 -0
  357. package/esm/infra/cli/commands/platform-infra-commit.js +387 -0
  358. package/esm/infra/cli/commands/platform-infra-get-all-tree-nodes-record.d.ts +8 -0
  359. package/esm/{objects/cli/commands/get-all-record.js → infra/cli/commands/platform-infra-get-all-tree-nodes-record.js} +7 -5
  360. package/esm/infra/cli/commands/platform-infra-init-empty-repo.d.ts +8 -0
  361. package/esm/infra/cli/commands/{infra-init-empty-repo.js → platform-infra-init-empty-repo.js} +3 -3
  362. package/esm/infra/cli/commands/platform-infra-insert-node-at-path.d.ts +8 -0
  363. package/esm/infra/cli/commands/platform-infra-insert-node-at-path.js +34 -0
  364. package/esm/infra/cli/commands/platform-infra-object.d.ts +8 -0
  365. package/esm/infra/cli/commands/platform-infra-object.js +307 -0
  366. package/esm/infra/cli/commands/platform-infra-ref.d.ts +8 -0
  367. package/esm/infra/cli/commands/platform-infra-ref.js +297 -0
  368. package/esm/infra/cli/commands/platform-infra-set-data-at-path.d.ts +8 -0
  369. package/esm/infra/cli/commands/platform-infra-set-data-at-path.js +34 -0
  370. package/esm/infra/cli/commands/platform-infra-store.d.ts +8 -0
  371. package/esm/infra/cli/commands/platform-infra-store.js +276 -0
  372. package/esm/infra/cli/commands/platform-namespace-event.js +0 -154
  373. package/esm/infra/cli/commands.js +17 -17
  374. package/esm/infra/cli/executor.d.ts +14 -14
  375. package/esm/infra/orm/index.d.ts +19 -19
  376. package/esm/infra/orm/index.js +10 -10
  377. package/esm/infra/orm/input-types.d.ts +542 -668
  378. package/esm/infra/orm/models/index.d.ts +5 -5
  379. package/esm/infra/orm/models/index.js +5 -5
  380. package/esm/infra/orm/models/platformInfraCommit.d.ts +56 -0
  381. package/esm/infra/orm/models/platformInfraCommit.js +103 -0
  382. package/esm/infra/orm/models/platformInfraGetAllTreeNodesRecord.d.ts +30 -0
  383. package/esm/infra/orm/models/platformInfraGetAllTreeNodesRecord.js +55 -0
  384. package/esm/infra/orm/models/platformInfraObject.d.ts +56 -0
  385. package/esm/infra/orm/models/platformInfraObject.js +93 -0
  386. package/esm/infra/orm/models/platformInfraRef.d.ts +56 -0
  387. package/esm/infra/orm/models/platformInfraRef.js +103 -0
  388. package/esm/infra/orm/models/platformInfraStore.d.ts +54 -0
  389. package/esm/infra/orm/models/platformInfraStore.js +100 -0
  390. package/esm/infra/orm/mutation/index.d.ts +16 -16
  391. package/esm/infra/orm/mutation/index.js +18 -18
  392. package/esm/modules/cli/commands/compute-log-module.js +24 -24
  393. package/esm/modules/cli/commands/db-usage-module.js +88 -88
  394. package/esm/modules/cli/commands/devices-module.js +32 -32
  395. package/esm/modules/cli/commands/function-module.js +44 -0
  396. package/esm/modules/cli/commands/http-route-module.d.ts +8 -0
  397. package/esm/modules/cli/commands/http-route-module.js +646 -0
  398. package/esm/modules/cli/commands/inference-log-module.js +24 -24
  399. package/esm/modules/cli/commands/rate-limits-module.js +46 -46
  400. package/esm/modules/cli/commands/resource-module.js +220 -0
  401. package/esm/modules/cli/commands/sessions-module.js +48 -48
  402. package/esm/modules/cli/commands/storage-log-module.js +24 -24
  403. package/esm/modules/cli/commands/transfer-log-module.js +24 -24
  404. package/esm/modules/cli/commands/webhook-module.d.ts +8 -0
  405. package/esm/modules/cli/commands/webhook-module.js +690 -0
  406. package/esm/modules/cli/commands.js +5 -1
  407. package/esm/modules/cli/executor.d.ts +2 -0
  408. package/esm/modules/orm/index.d.ts +4 -0
  409. package/esm/modules/orm/index.js +4 -0
  410. package/esm/modules/orm/input-types.d.ts +802 -166
  411. package/esm/modules/orm/models/httpRouteModule.d.ts +54 -0
  412. package/esm/modules/orm/models/httpRouteModule.js +100 -0
  413. package/esm/modules/orm/models/index.d.ts +2 -0
  414. package/esm/modules/orm/models/index.js +2 -0
  415. package/esm/modules/orm/models/webhookModule.d.ts +54 -0
  416. package/esm/modules/orm/models/webhookModule.js +100 -0
  417. package/esm/objects/cli/commands/get-all-tree-nodes-record.d.ts +8 -0
  418. package/esm/{compute/cli/commands/get-all-record.js → objects/cli/commands/get-all-tree-nodes-record.js} +5 -5
  419. package/esm/objects/cli/commands.js +3 -3
  420. package/esm/objects/cli/executor.d.ts +1 -1
  421. package/esm/objects/orm/index.d.ts +2 -2
  422. package/esm/objects/orm/index.js +2 -2
  423. package/esm/objects/orm/input-types.d.ts +15 -15
  424. package/esm/objects/orm/models/getAllTreeNodesRecord.d.ts +30 -0
  425. package/esm/{compute/orm/models/getAllRecord.js → objects/orm/models/getAllTreeNodesRecord.js} +13 -13
  426. package/esm/objects/orm/models/index.d.ts +1 -1
  427. package/esm/objects/orm/models/index.js +1 -1
  428. package/infra/cli/commands/namespace-event.js +0 -154
  429. package/infra/cli/commands/platform-infra-commit.d.ts +8 -0
  430. package/infra/cli/commands/platform-infra-commit.js +389 -0
  431. package/infra/cli/commands/platform-infra-get-all-tree-nodes-record.d.ts +8 -0
  432. package/infra/cli/commands/{infra-get-all-record.js → platform-infra-get-all-tree-nodes-record.js} +7 -5
  433. package/infra/cli/commands/platform-infra-init-empty-repo.d.ts +8 -0
  434. package/infra/cli/commands/{infra-insert-node-at-path.js → platform-infra-init-empty-repo.js} +3 -3
  435. package/infra/cli/commands/platform-infra-insert-node-at-path.d.ts +8 -0
  436. package/infra/cli/commands/platform-infra-insert-node-at-path.js +36 -0
  437. package/infra/cli/commands/platform-infra-object.d.ts +8 -0
  438. package/infra/cli/commands/platform-infra-object.js +309 -0
  439. package/infra/cli/commands/platform-infra-ref.d.ts +8 -0
  440. package/infra/cli/commands/platform-infra-ref.js +299 -0
  441. package/infra/cli/commands/platform-infra-set-data-at-path.d.ts +8 -0
  442. package/infra/cli/commands/platform-infra-set-data-at-path.js +36 -0
  443. package/infra/cli/commands/platform-infra-store.d.ts +8 -0
  444. package/infra/cli/commands/platform-infra-store.js +278 -0
  445. package/infra/cli/commands/platform-namespace-event.js +0 -154
  446. package/infra/cli/commands.js +17 -17
  447. package/infra/cli/executor.d.ts +14 -14
  448. package/infra/orm/index.d.ts +19 -19
  449. package/infra/orm/index.js +10 -10
  450. package/infra/orm/input-types.d.ts +542 -668
  451. package/infra/orm/models/index.d.ts +5 -5
  452. package/infra/orm/models/index.js +11 -11
  453. package/infra/orm/models/platformInfraCommit.d.ts +56 -0
  454. package/infra/orm/models/platformInfraCommit.js +107 -0
  455. package/infra/orm/models/platformInfraGetAllTreeNodesRecord.d.ts +30 -0
  456. package/infra/orm/models/platformInfraGetAllTreeNodesRecord.js +59 -0
  457. package/infra/orm/models/platformInfraObject.d.ts +56 -0
  458. package/infra/orm/models/platformInfraObject.js +97 -0
  459. package/infra/orm/models/platformInfraRef.d.ts +56 -0
  460. package/infra/orm/models/platformInfraRef.js +107 -0
  461. package/infra/orm/models/platformInfraStore.d.ts +54 -0
  462. package/infra/orm/models/platformInfraStore.js +104 -0
  463. package/infra/orm/mutation/index.d.ts +16 -16
  464. package/infra/orm/mutation/index.js +18 -18
  465. package/modules/cli/commands/compute-log-module.js +24 -24
  466. package/modules/cli/commands/db-usage-module.js +88 -88
  467. package/modules/cli/commands/devices-module.js +32 -32
  468. package/modules/cli/commands/function-module.js +44 -0
  469. package/modules/cli/commands/http-route-module.d.ts +8 -0
  470. package/modules/cli/commands/http-route-module.js +648 -0
  471. package/modules/cli/commands/inference-log-module.js +24 -24
  472. package/modules/cli/commands/rate-limits-module.js +46 -46
  473. package/modules/cli/commands/resource-module.js +220 -0
  474. package/modules/cli/commands/sessions-module.js +48 -48
  475. package/modules/cli/commands/storage-log-module.js +24 -24
  476. package/modules/cli/commands/transfer-log-module.js +24 -24
  477. package/modules/cli/commands/webhook-module.d.ts +8 -0
  478. package/modules/cli/commands/webhook-module.js +692 -0
  479. package/modules/cli/commands.js +5 -1
  480. package/modules/cli/executor.d.ts +2 -0
  481. package/modules/orm/index.d.ts +4 -0
  482. package/modules/orm/index.js +4 -0
  483. package/modules/orm/input-types.d.ts +802 -166
  484. package/modules/orm/models/httpRouteModule.d.ts +54 -0
  485. package/modules/orm/models/httpRouteModule.js +104 -0
  486. package/modules/orm/models/index.d.ts +2 -0
  487. package/modules/orm/models/index.js +6 -2
  488. package/modules/orm/models/webhookModule.d.ts +54 -0
  489. package/modules/orm/models/webhookModule.js +104 -0
  490. package/objects/cli/commands/get-all-tree-nodes-record.d.ts +8 -0
  491. package/objects/cli/commands/{get-all-record.js → get-all-tree-nodes-record.js} +5 -5
  492. package/objects/cli/commands.js +3 -3
  493. package/objects/cli/executor.d.ts +1 -1
  494. package/objects/orm/index.d.ts +2 -2
  495. package/objects/orm/index.js +2 -2
  496. package/objects/orm/input-types.d.ts +15 -15
  497. package/objects/orm/models/getAllTreeNodesRecord.d.ts +30 -0
  498. package/{infra/orm/models/infraGetAllRecord.js → objects/orm/models/getAllTreeNodesRecord.js} +15 -15
  499. package/objects/orm/models/index.d.ts +1 -1
  500. package/objects/orm/models/index.js +3 -3
  501. package/package.json +5 -5
  502. package/api/orm/models/migrateFile.d.ts +0 -36
  503. package/compute/orm/models/getAllRecord.d.ts +0 -30
  504. package/compute/orm/models/infraGetAllRecord.d.ts +0 -30
  505. package/esm/api/orm/models/migrateFile.d.ts +0 -36
  506. package/esm/compute/cli/commands/infra-get-all-record.d.ts +0 -8
  507. package/esm/compute/orm/models/getAllRecord.d.ts +0 -30
  508. package/esm/compute/orm/models/infraGetAllRecord.d.ts +0 -30
  509. package/esm/infra/cli/commands/infra-commit.d.ts +0 -8
  510. package/esm/infra/cli/commands/infra-get-all-record.d.ts +0 -8
  511. package/esm/infra/cli/commands/infra-init-empty-repo.d.ts +0 -8
  512. package/esm/infra/cli/commands/infra-insert-node-at-path.d.ts +0 -8
  513. package/esm/infra/cli/commands/infra-object.d.ts +0 -8
  514. package/esm/infra/cli/commands/infra-set-data-at-path.d.ts +0 -8
  515. package/esm/infra/cli/commands/infra-store.d.ts +0 -8
  516. package/esm/infra/orm/models/infraCommit.d.ts +0 -56
  517. package/esm/infra/orm/models/infraGetAllRecord.d.ts +0 -30
  518. package/esm/infra/orm/models/infraObject.d.ts +0 -56
  519. package/esm/infra/orm/models/infraRef.d.ts +0 -56
  520. package/esm/infra/orm/models/infraStore.d.ts +0 -54
  521. package/esm/objects/cli/commands/get-all-record.d.ts +0 -8
  522. package/esm/objects/orm/models/getAllRecord.d.ts +0 -30
  523. package/infra/cli/commands/infra-commit.d.ts +0 -8
  524. package/infra/cli/commands/infra-get-all-record.d.ts +0 -8
  525. package/infra/cli/commands/infra-init-empty-repo.d.ts +0 -8
  526. package/infra/cli/commands/infra-insert-node-at-path.d.ts +0 -8
  527. package/infra/cli/commands/infra-object.d.ts +0 -8
  528. package/infra/cli/commands/infra-set-data-at-path.d.ts +0 -8
  529. package/infra/cli/commands/infra-store.d.ts +0 -8
  530. package/infra/orm/models/infraCommit.d.ts +0 -56
  531. package/infra/orm/models/infraGetAllRecord.d.ts +0 -30
  532. package/infra/orm/models/infraObject.d.ts +0 -56
  533. package/infra/orm/models/infraRef.d.ts +0 -56
  534. package/infra/orm/models/infraStore.d.ts +0 -54
  535. package/objects/cli/commands/get-all-record.d.ts +0 -8
  536. package/objects/orm/models/getAllRecord.d.ts +0 -30
@@ -0,0 +1,690 @@
1
+ /**
2
+ * CLI commands for WebhookModule
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { extractFirst } from 'inquirerer';
7
+ import { getClient } from '../executor';
8
+ import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils';
9
+ const fieldSchema = {
10
+ apiName: 'string',
11
+ databaseId: 'uuid',
12
+ defaultPermissions: 'string',
13
+ entityField: 'string',
14
+ entityTableId: 'uuid',
15
+ functionInvocationModuleId: 'uuid',
16
+ functionModuleId: 'uuid',
17
+ id: 'uuid',
18
+ infraSecretsModuleId: 'uuid',
19
+ namespaceModuleId: 'uuid',
20
+ policies: 'json',
21
+ prefix: 'string',
22
+ privateApiName: 'string',
23
+ privateSchemaId: 'uuid',
24
+ privateSchemaName: 'string',
25
+ provisions: 'json',
26
+ publicSchemaName: 'string',
27
+ schemaId: 'uuid',
28
+ scope: 'string',
29
+ webhookEndpointsTableId: 'uuid',
30
+ webhookEndpointsTableName: 'string',
31
+ webhookEventsTableId: 'uuid',
32
+ webhookEventsTableName: 'string',
33
+ };
34
+ const usage = '\nwebhook-module <command>\n\nCommands:\n list List webhookModule records\n find-first Find first matching webhookModule record\n get Get a webhookModule by ID\n create Create a new webhookModule\n update Update an existing webhookModule\n delete Delete a webhookModule\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n';
35
+ export default async (argv, prompter, _options) => {
36
+ if (argv.help || argv.h) {
37
+ console.log(usage);
38
+ process.exit(0);
39
+ }
40
+ const { first: subcommand, newArgv } = extractFirst(argv);
41
+ if (!subcommand) {
42
+ const answer = await prompter.prompt(argv, [
43
+ {
44
+ type: 'autocomplete',
45
+ name: 'subcommand',
46
+ message: 'What do you want to do?',
47
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
48
+ },
49
+ ]);
50
+ return handleTableSubcommand(answer.subcommand, newArgv, prompter);
51
+ }
52
+ return handleTableSubcommand(subcommand, newArgv, prompter);
53
+ };
54
+ async function handleTableSubcommand(subcommand, argv, prompter) {
55
+ switch (subcommand) {
56
+ case 'list':
57
+ return handleList(argv, prompter);
58
+ case 'find-first':
59
+ return handleFindFirst(argv, prompter);
60
+ case 'get':
61
+ return handleGet(argv, prompter);
62
+ case 'create':
63
+ return handleCreate(argv, prompter);
64
+ case 'update':
65
+ return handleUpdate(argv, prompter);
66
+ case 'delete':
67
+ return handleDelete(argv, prompter);
68
+ default:
69
+ console.log(usage);
70
+ process.exit(1);
71
+ }
72
+ }
73
+ async function handleList(argv, _prompter) {
74
+ try {
75
+ const defaultSelect = {
76
+ apiName: true,
77
+ databaseId: true,
78
+ defaultPermissions: true,
79
+ entityField: true,
80
+ entityTableId: true,
81
+ functionInvocationModuleId: true,
82
+ functionModuleId: true,
83
+ id: true,
84
+ infraSecretsModuleId: true,
85
+ namespaceModuleId: true,
86
+ policies: true,
87
+ prefix: true,
88
+ privateApiName: true,
89
+ privateSchemaId: true,
90
+ privateSchemaName: true,
91
+ provisions: true,
92
+ publicSchemaName: true,
93
+ schemaId: true,
94
+ scope: true,
95
+ webhookEndpointsTableId: true,
96
+ webhookEndpointsTableName: true,
97
+ webhookEventsTableId: true,
98
+ webhookEventsTableName: true,
99
+ };
100
+ const findManyArgs = parseFindManyArgs(argv, defaultSelect);
101
+ const client = getClient();
102
+ const result = await client.webhookModule.findMany(findManyArgs).execute();
103
+ console.log(JSON.stringify(result, null, 2));
104
+ }
105
+ catch (error) {
106
+ console.error('Failed to list records.');
107
+ if (error instanceof Error) {
108
+ console.error(error.message);
109
+ }
110
+ process.exit(1);
111
+ }
112
+ }
113
+ async function handleFindFirst(argv, _prompter) {
114
+ try {
115
+ const defaultSelect = {
116
+ apiName: true,
117
+ databaseId: true,
118
+ defaultPermissions: true,
119
+ entityField: true,
120
+ entityTableId: true,
121
+ functionInvocationModuleId: true,
122
+ functionModuleId: true,
123
+ id: true,
124
+ infraSecretsModuleId: true,
125
+ namespaceModuleId: true,
126
+ policies: true,
127
+ prefix: true,
128
+ privateApiName: true,
129
+ privateSchemaId: true,
130
+ privateSchemaName: true,
131
+ provisions: true,
132
+ publicSchemaName: true,
133
+ schemaId: true,
134
+ scope: true,
135
+ webhookEndpointsTableId: true,
136
+ webhookEndpointsTableName: true,
137
+ webhookEventsTableId: true,
138
+ webhookEventsTableName: true,
139
+ };
140
+ const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
141
+ const client = getClient();
142
+ const result = await client.webhookModule.findFirst(findFirstArgs).execute();
143
+ console.log(JSON.stringify(result, null, 2));
144
+ }
145
+ catch (error) {
146
+ console.error('Failed to find record.');
147
+ if (error instanceof Error) {
148
+ console.error(error.message);
149
+ }
150
+ process.exit(1);
151
+ }
152
+ }
153
+ async function handleGet(argv, prompter) {
154
+ try {
155
+ const answers = await prompter.prompt(argv, [
156
+ {
157
+ type: 'text',
158
+ name: 'id',
159
+ message: 'id',
160
+ required: true,
161
+ },
162
+ ]);
163
+ const client = getClient();
164
+ const result = await client.webhookModule
165
+ .findOne({
166
+ id: answers.id,
167
+ select: {
168
+ apiName: true,
169
+ databaseId: true,
170
+ defaultPermissions: true,
171
+ entityField: true,
172
+ entityTableId: true,
173
+ functionInvocationModuleId: true,
174
+ functionModuleId: true,
175
+ id: true,
176
+ infraSecretsModuleId: true,
177
+ namespaceModuleId: true,
178
+ policies: true,
179
+ prefix: true,
180
+ privateApiName: true,
181
+ privateSchemaId: true,
182
+ privateSchemaName: true,
183
+ provisions: true,
184
+ publicSchemaName: true,
185
+ schemaId: true,
186
+ scope: true,
187
+ webhookEndpointsTableId: true,
188
+ webhookEndpointsTableName: true,
189
+ webhookEventsTableId: true,
190
+ webhookEventsTableName: true,
191
+ },
192
+ })
193
+ .execute();
194
+ console.log(JSON.stringify(result, null, 2));
195
+ }
196
+ catch (error) {
197
+ console.error('Record not found.');
198
+ if (error instanceof Error) {
199
+ console.error(error.message);
200
+ }
201
+ process.exit(1);
202
+ }
203
+ }
204
+ async function handleCreate(argv, prompter) {
205
+ try {
206
+ const rawAnswers = await prompter.prompt(argv, [
207
+ {
208
+ type: 'text',
209
+ name: 'apiName',
210
+ message: 'apiName',
211
+ required: false,
212
+ skipPrompt: true,
213
+ },
214
+ {
215
+ type: 'text',
216
+ name: 'databaseId',
217
+ message: 'databaseId',
218
+ required: true,
219
+ },
220
+ {
221
+ type: 'text',
222
+ name: 'defaultPermissions',
223
+ message: 'defaultPermissions',
224
+ required: false,
225
+ skipPrompt: true,
226
+ },
227
+ {
228
+ type: 'text',
229
+ name: 'entityField',
230
+ message: 'entityField',
231
+ required: false,
232
+ skipPrompt: true,
233
+ },
234
+ {
235
+ type: 'text',
236
+ name: 'entityTableId',
237
+ message: 'entityTableId',
238
+ required: false,
239
+ skipPrompt: true,
240
+ },
241
+ {
242
+ type: 'text',
243
+ name: 'functionInvocationModuleId',
244
+ message: 'functionInvocationModuleId',
245
+ required: false,
246
+ skipPrompt: true,
247
+ },
248
+ {
249
+ type: 'text',
250
+ name: 'functionModuleId',
251
+ message: 'functionModuleId',
252
+ required: false,
253
+ skipPrompt: true,
254
+ },
255
+ {
256
+ type: 'text',
257
+ name: 'infraSecretsModuleId',
258
+ message: 'infraSecretsModuleId',
259
+ required: false,
260
+ skipPrompt: true,
261
+ },
262
+ {
263
+ type: 'text',
264
+ name: 'namespaceModuleId',
265
+ message: 'namespaceModuleId',
266
+ required: false,
267
+ skipPrompt: true,
268
+ },
269
+ {
270
+ type: 'json',
271
+ name: 'policies',
272
+ message: 'policies',
273
+ required: false,
274
+ skipPrompt: true,
275
+ },
276
+ {
277
+ type: 'text',
278
+ name: 'prefix',
279
+ message: 'prefix',
280
+ required: false,
281
+ skipPrompt: true,
282
+ },
283
+ {
284
+ type: 'text',
285
+ name: 'privateApiName',
286
+ message: 'privateApiName',
287
+ required: false,
288
+ skipPrompt: true,
289
+ },
290
+ {
291
+ type: 'text',
292
+ name: 'privateSchemaId',
293
+ message: 'privateSchemaId',
294
+ required: false,
295
+ skipPrompt: true,
296
+ },
297
+ {
298
+ type: 'text',
299
+ name: 'privateSchemaName',
300
+ message: 'privateSchemaName',
301
+ required: false,
302
+ skipPrompt: true,
303
+ },
304
+ {
305
+ type: 'json',
306
+ name: 'provisions',
307
+ message: 'provisions',
308
+ required: false,
309
+ skipPrompt: true,
310
+ },
311
+ {
312
+ type: 'text',
313
+ name: 'publicSchemaName',
314
+ message: 'publicSchemaName',
315
+ required: false,
316
+ skipPrompt: true,
317
+ },
318
+ {
319
+ type: 'text',
320
+ name: 'schemaId',
321
+ message: 'schemaId',
322
+ required: false,
323
+ skipPrompt: true,
324
+ },
325
+ {
326
+ type: 'text',
327
+ name: 'scope',
328
+ message: 'scope',
329
+ required: false,
330
+ skipPrompt: true,
331
+ },
332
+ {
333
+ type: 'text',
334
+ name: 'webhookEndpointsTableId',
335
+ message: 'webhookEndpointsTableId',
336
+ required: false,
337
+ skipPrompt: true,
338
+ },
339
+ {
340
+ type: 'text',
341
+ name: 'webhookEndpointsTableName',
342
+ message: 'webhookEndpointsTableName',
343
+ required: false,
344
+ skipPrompt: true,
345
+ },
346
+ {
347
+ type: 'text',
348
+ name: 'webhookEventsTableId',
349
+ message: 'webhookEventsTableId',
350
+ required: false,
351
+ skipPrompt: true,
352
+ },
353
+ {
354
+ type: 'text',
355
+ name: 'webhookEventsTableName',
356
+ message: 'webhookEventsTableName',
357
+ required: false,
358
+ skipPrompt: true,
359
+ },
360
+ ]);
361
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
362
+ const cleanedData = stripUndefined(answers, fieldSchema);
363
+ const client = getClient();
364
+ const result = await client.webhookModule
365
+ .create({
366
+ data: {
367
+ apiName: cleanedData.apiName,
368
+ databaseId: cleanedData.databaseId,
369
+ defaultPermissions: cleanedData.defaultPermissions,
370
+ entityField: cleanedData.entityField,
371
+ entityTableId: cleanedData.entityTableId,
372
+ functionInvocationModuleId: cleanedData.functionInvocationModuleId,
373
+ functionModuleId: cleanedData.functionModuleId,
374
+ infraSecretsModuleId: cleanedData.infraSecretsModuleId,
375
+ namespaceModuleId: cleanedData.namespaceModuleId,
376
+ policies: cleanedData.policies,
377
+ prefix: cleanedData.prefix,
378
+ privateApiName: cleanedData.privateApiName,
379
+ privateSchemaId: cleanedData.privateSchemaId,
380
+ privateSchemaName: cleanedData.privateSchemaName,
381
+ provisions: cleanedData.provisions,
382
+ publicSchemaName: cleanedData.publicSchemaName,
383
+ schemaId: cleanedData.schemaId,
384
+ scope: cleanedData.scope,
385
+ webhookEndpointsTableId: cleanedData.webhookEndpointsTableId,
386
+ webhookEndpointsTableName: cleanedData.webhookEndpointsTableName,
387
+ webhookEventsTableId: cleanedData.webhookEventsTableId,
388
+ webhookEventsTableName: cleanedData.webhookEventsTableName,
389
+ },
390
+ select: {
391
+ apiName: true,
392
+ databaseId: true,
393
+ defaultPermissions: true,
394
+ entityField: true,
395
+ entityTableId: true,
396
+ functionInvocationModuleId: true,
397
+ functionModuleId: true,
398
+ id: true,
399
+ infraSecretsModuleId: true,
400
+ namespaceModuleId: true,
401
+ policies: true,
402
+ prefix: true,
403
+ privateApiName: true,
404
+ privateSchemaId: true,
405
+ privateSchemaName: true,
406
+ provisions: true,
407
+ publicSchemaName: true,
408
+ schemaId: true,
409
+ scope: true,
410
+ webhookEndpointsTableId: true,
411
+ webhookEndpointsTableName: true,
412
+ webhookEventsTableId: true,
413
+ webhookEventsTableName: true,
414
+ },
415
+ })
416
+ .execute();
417
+ console.log(JSON.stringify(result, null, 2));
418
+ }
419
+ catch (error) {
420
+ console.error('Failed to create record.');
421
+ if (error instanceof Error) {
422
+ console.error(error.message);
423
+ }
424
+ process.exit(1);
425
+ }
426
+ }
427
+ async function handleUpdate(argv, prompter) {
428
+ try {
429
+ const rawAnswers = await prompter.prompt(argv, [
430
+ {
431
+ type: 'text',
432
+ name: 'id',
433
+ message: 'id',
434
+ required: true,
435
+ },
436
+ {
437
+ type: 'text',
438
+ name: 'apiName',
439
+ message: 'apiName',
440
+ required: false,
441
+ skipPrompt: true,
442
+ },
443
+ {
444
+ type: 'text',
445
+ name: 'databaseId',
446
+ message: 'databaseId',
447
+ required: false,
448
+ },
449
+ {
450
+ type: 'text',
451
+ name: 'defaultPermissions',
452
+ message: 'defaultPermissions',
453
+ required: false,
454
+ skipPrompt: true,
455
+ },
456
+ {
457
+ type: 'text',
458
+ name: 'entityField',
459
+ message: 'entityField',
460
+ required: false,
461
+ skipPrompt: true,
462
+ },
463
+ {
464
+ type: 'text',
465
+ name: 'entityTableId',
466
+ message: 'entityTableId',
467
+ required: false,
468
+ skipPrompt: true,
469
+ },
470
+ {
471
+ type: 'text',
472
+ name: 'functionInvocationModuleId',
473
+ message: 'functionInvocationModuleId',
474
+ required: false,
475
+ skipPrompt: true,
476
+ },
477
+ {
478
+ type: 'text',
479
+ name: 'functionModuleId',
480
+ message: 'functionModuleId',
481
+ required: false,
482
+ skipPrompt: true,
483
+ },
484
+ {
485
+ type: 'text',
486
+ name: 'infraSecretsModuleId',
487
+ message: 'infraSecretsModuleId',
488
+ required: false,
489
+ skipPrompt: true,
490
+ },
491
+ {
492
+ type: 'text',
493
+ name: 'namespaceModuleId',
494
+ message: 'namespaceModuleId',
495
+ required: false,
496
+ skipPrompt: true,
497
+ },
498
+ {
499
+ type: 'json',
500
+ name: 'policies',
501
+ message: 'policies',
502
+ required: false,
503
+ skipPrompt: true,
504
+ },
505
+ {
506
+ type: 'text',
507
+ name: 'prefix',
508
+ message: 'prefix',
509
+ required: false,
510
+ skipPrompt: true,
511
+ },
512
+ {
513
+ type: 'text',
514
+ name: 'privateApiName',
515
+ message: 'privateApiName',
516
+ required: false,
517
+ skipPrompt: true,
518
+ },
519
+ {
520
+ type: 'text',
521
+ name: 'privateSchemaId',
522
+ message: 'privateSchemaId',
523
+ required: false,
524
+ skipPrompt: true,
525
+ },
526
+ {
527
+ type: 'text',
528
+ name: 'privateSchemaName',
529
+ message: 'privateSchemaName',
530
+ required: false,
531
+ skipPrompt: true,
532
+ },
533
+ {
534
+ type: 'json',
535
+ name: 'provisions',
536
+ message: 'provisions',
537
+ required: false,
538
+ skipPrompt: true,
539
+ },
540
+ {
541
+ type: 'text',
542
+ name: 'publicSchemaName',
543
+ message: 'publicSchemaName',
544
+ required: false,
545
+ skipPrompt: true,
546
+ },
547
+ {
548
+ type: 'text',
549
+ name: 'schemaId',
550
+ message: 'schemaId',
551
+ required: false,
552
+ skipPrompt: true,
553
+ },
554
+ {
555
+ type: 'text',
556
+ name: 'scope',
557
+ message: 'scope',
558
+ required: false,
559
+ skipPrompt: true,
560
+ },
561
+ {
562
+ type: 'text',
563
+ name: 'webhookEndpointsTableId',
564
+ message: 'webhookEndpointsTableId',
565
+ required: false,
566
+ skipPrompt: true,
567
+ },
568
+ {
569
+ type: 'text',
570
+ name: 'webhookEndpointsTableName',
571
+ message: 'webhookEndpointsTableName',
572
+ required: false,
573
+ skipPrompt: true,
574
+ },
575
+ {
576
+ type: 'text',
577
+ name: 'webhookEventsTableId',
578
+ message: 'webhookEventsTableId',
579
+ required: false,
580
+ skipPrompt: true,
581
+ },
582
+ {
583
+ type: 'text',
584
+ name: 'webhookEventsTableName',
585
+ message: 'webhookEventsTableName',
586
+ required: false,
587
+ skipPrompt: true,
588
+ },
589
+ ]);
590
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
591
+ const cleanedData = stripUndefined(answers, fieldSchema);
592
+ const client = getClient();
593
+ const result = await client.webhookModule
594
+ .update({
595
+ where: {
596
+ id: answers.id,
597
+ },
598
+ data: {
599
+ apiName: cleanedData.apiName,
600
+ databaseId: cleanedData.databaseId,
601
+ defaultPermissions: cleanedData.defaultPermissions,
602
+ entityField: cleanedData.entityField,
603
+ entityTableId: cleanedData.entityTableId,
604
+ functionInvocationModuleId: cleanedData.functionInvocationModuleId,
605
+ functionModuleId: cleanedData.functionModuleId,
606
+ infraSecretsModuleId: cleanedData.infraSecretsModuleId,
607
+ namespaceModuleId: cleanedData.namespaceModuleId,
608
+ policies: cleanedData.policies,
609
+ prefix: cleanedData.prefix,
610
+ privateApiName: cleanedData.privateApiName,
611
+ privateSchemaId: cleanedData.privateSchemaId,
612
+ privateSchemaName: cleanedData.privateSchemaName,
613
+ provisions: cleanedData.provisions,
614
+ publicSchemaName: cleanedData.publicSchemaName,
615
+ schemaId: cleanedData.schemaId,
616
+ scope: cleanedData.scope,
617
+ webhookEndpointsTableId: cleanedData.webhookEndpointsTableId,
618
+ webhookEndpointsTableName: cleanedData.webhookEndpointsTableName,
619
+ webhookEventsTableId: cleanedData.webhookEventsTableId,
620
+ webhookEventsTableName: cleanedData.webhookEventsTableName,
621
+ },
622
+ select: {
623
+ apiName: true,
624
+ databaseId: true,
625
+ defaultPermissions: true,
626
+ entityField: true,
627
+ entityTableId: true,
628
+ functionInvocationModuleId: true,
629
+ functionModuleId: true,
630
+ id: true,
631
+ infraSecretsModuleId: true,
632
+ namespaceModuleId: true,
633
+ policies: true,
634
+ prefix: true,
635
+ privateApiName: true,
636
+ privateSchemaId: true,
637
+ privateSchemaName: true,
638
+ provisions: true,
639
+ publicSchemaName: true,
640
+ schemaId: true,
641
+ scope: true,
642
+ webhookEndpointsTableId: true,
643
+ webhookEndpointsTableName: true,
644
+ webhookEventsTableId: true,
645
+ webhookEventsTableName: true,
646
+ },
647
+ })
648
+ .execute();
649
+ console.log(JSON.stringify(result, null, 2));
650
+ }
651
+ catch (error) {
652
+ console.error('Failed to update record.');
653
+ if (error instanceof Error) {
654
+ console.error(error.message);
655
+ }
656
+ process.exit(1);
657
+ }
658
+ }
659
+ async function handleDelete(argv, prompter) {
660
+ try {
661
+ const rawAnswers = await prompter.prompt(argv, [
662
+ {
663
+ type: 'text',
664
+ name: 'id',
665
+ message: 'id',
666
+ required: true,
667
+ },
668
+ ]);
669
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
670
+ const client = getClient();
671
+ const result = await client.webhookModule
672
+ .delete({
673
+ where: {
674
+ id: answers.id,
675
+ },
676
+ select: {
677
+ id: true,
678
+ },
679
+ })
680
+ .execute();
681
+ console.log(JSON.stringify(result, null, 2));
682
+ }
683
+ catch (error) {
684
+ console.error('Failed to delete record.');
685
+ if (error instanceof Error) {
686
+ console.error(error.message);
687
+ }
688
+ process.exit(1);
689
+ }
690
+ }