@constructive-sdk/cli 0.20.4 → 0.20.5

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 (323) hide show
  1. package/admin/cli/commands/{request-upload-url.d.ts → app-limit-cap.d.ts} +1 -1
  2. package/admin/cli/commands/app-limit-cap.js +272 -0
  3. package/{esm/admin/cli/commands/request-upload-url.d.ts → admin/cli/commands/app-limit-caps-default.d.ts} +1 -1
  4. package/admin/cli/commands/app-limit-caps-default.js +252 -0
  5. package/{auth/cli/commands/request-upload-url.d.ts → admin/cli/commands/app-limit-credit-code-item.d.ts} +1 -1
  6. package/admin/cli/commands/app-limit-credit-code-item.js +292 -0
  7. package/{esm/auth/cli/commands/request-upload-url.d.ts → admin/cli/commands/app-limit-credit-code.d.ts} +1 -1
  8. package/admin/cli/commands/app-limit-credit-code.js +296 -0
  9. package/admin/cli/commands/app-limit-credit-redemption.d.ts +8 -0
  10. package/admin/cli/commands/app-limit-credit-redemption.js +250 -0
  11. package/admin/cli/commands/app-limit-credit.d.ts +8 -0
  12. package/admin/cli/commands/app-limit-credit.js +316 -0
  13. package/admin/cli/commands/app-limit.js +66 -0
  14. package/admin/cli/commands/org-limit-aggregate.js +88 -0
  15. package/admin/cli/commands/org-limit-cap.d.ts +8 -0
  16. package/admin/cli/commands/org-limit-cap.js +272 -0
  17. package/admin/cli/commands/org-limit-caps-default.d.ts +8 -0
  18. package/admin/cli/commands/org-limit-caps-default.js +252 -0
  19. package/admin/cli/commands/org-limit-credit.d.ts +8 -0
  20. package/admin/cli/commands/org-limit-credit.js +338 -0
  21. package/admin/cli/commands/org-limit.js +66 -0
  22. package/admin/cli/commands.js +25 -9
  23. package/admin/cli/executor.d.ts +12 -8
  24. package/admin/orm/index.d.ts +24 -11
  25. package/admin/orm/index.js +24 -6
  26. package/admin/orm/input-types.d.ts +2108 -545
  27. package/admin/orm/input-types.js +13 -1
  28. package/admin/orm/models/appLimitCap.d.ts +56 -0
  29. package/admin/orm/models/appLimitCap.js +100 -0
  30. package/admin/orm/models/appLimitCapsDefault.d.ts +56 -0
  31. package/admin/orm/models/appLimitCapsDefault.js +100 -0
  32. package/admin/orm/models/appLimitCredit.d.ts +56 -0
  33. package/admin/orm/models/appLimitCredit.js +100 -0
  34. package/admin/orm/models/appLimitCreditCode.d.ts +56 -0
  35. package/admin/orm/models/appLimitCreditCode.js +100 -0
  36. package/admin/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  37. package/admin/orm/models/appLimitCreditCodeItem.js +100 -0
  38. package/admin/orm/models/appLimitCreditRedemption.d.ts +56 -0
  39. package/admin/orm/models/appLimitCreditRedemption.js +100 -0
  40. package/admin/orm/models/index.d.ts +12 -3
  41. package/admin/orm/models/index.js +25 -7
  42. package/admin/orm/models/orgLimitCap.d.ts +56 -0
  43. package/admin/orm/models/orgLimitCap.js +100 -0
  44. package/admin/orm/models/orgLimitCapsDefault.d.ts +56 -0
  45. package/admin/orm/models/orgLimitCapsDefault.js +100 -0
  46. package/admin/orm/models/orgLimitCredit.d.ts +56 -0
  47. package/admin/orm/models/orgLimitCredit.js +100 -0
  48. package/admin/orm/mutation/index.d.ts +1 -16
  49. package/admin/orm/mutation/index.js +0 -12
  50. package/admin/orm/query-builder.js +24 -0
  51. package/auth/cli/commands.js +1 -3
  52. package/auth/cli/executor.d.ts +0 -5
  53. package/auth/orm/index.d.ts +0 -5
  54. package/auth/orm/input-types.d.ts +0 -38
  55. package/auth/orm/mutation/index.d.ts +1 -16
  56. package/auth/orm/mutation/index.js +0 -12
  57. package/auth/orm/query-builder.js +24 -0
  58. package/esm/admin/cli/commands/app-limit-cap.d.ts +8 -0
  59. package/esm/admin/cli/commands/app-limit-cap.js +270 -0
  60. package/esm/admin/cli/commands/app-limit-caps-default.d.ts +8 -0
  61. package/esm/admin/cli/commands/app-limit-caps-default.js +250 -0
  62. package/esm/admin/cli/commands/app-limit-credit-code-item.d.ts +8 -0
  63. package/esm/admin/cli/commands/app-limit-credit-code-item.js +290 -0
  64. package/esm/admin/cli/commands/app-limit-credit-code.d.ts +8 -0
  65. package/esm/admin/cli/commands/app-limit-credit-code.js +294 -0
  66. package/esm/admin/cli/commands/app-limit-credit-redemption.d.ts +8 -0
  67. package/esm/admin/cli/commands/app-limit-credit-redemption.js +248 -0
  68. package/esm/admin/cli/commands/app-limit-credit.d.ts +8 -0
  69. package/esm/admin/cli/commands/app-limit-credit.js +314 -0
  70. package/esm/admin/cli/commands/app-limit.js +66 -0
  71. package/esm/admin/cli/commands/org-limit-aggregate.js +88 -0
  72. package/esm/admin/cli/commands/org-limit-cap.d.ts +8 -0
  73. package/esm/admin/cli/commands/org-limit-cap.js +270 -0
  74. package/esm/admin/cli/commands/org-limit-caps-default.d.ts +8 -0
  75. package/esm/admin/cli/commands/org-limit-caps-default.js +250 -0
  76. package/esm/admin/cli/commands/org-limit-credit.d.ts +8 -0
  77. package/esm/admin/cli/commands/org-limit-credit.js +336 -0
  78. package/esm/admin/cli/commands/org-limit.js +66 -0
  79. package/esm/admin/cli/commands.js +25 -9
  80. package/esm/admin/cli/executor.d.ts +12 -8
  81. package/esm/admin/orm/index.d.ts +24 -11
  82. package/esm/admin/orm/index.js +24 -6
  83. package/esm/admin/orm/input-types.d.ts +2108 -545
  84. package/esm/admin/orm/input-types.js +13 -1
  85. package/esm/admin/orm/models/appLimitCap.d.ts +56 -0
  86. package/esm/admin/orm/models/appLimitCap.js +96 -0
  87. package/esm/admin/orm/models/appLimitCapsDefault.d.ts +56 -0
  88. package/esm/admin/orm/models/appLimitCapsDefault.js +96 -0
  89. package/esm/admin/orm/models/appLimitCredit.d.ts +56 -0
  90. package/esm/admin/orm/models/appLimitCredit.js +96 -0
  91. package/esm/admin/orm/models/appLimitCreditCode.d.ts +56 -0
  92. package/esm/admin/orm/models/appLimitCreditCode.js +96 -0
  93. package/esm/admin/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  94. package/esm/admin/orm/models/appLimitCreditCodeItem.js +96 -0
  95. package/esm/admin/orm/models/appLimitCreditRedemption.d.ts +56 -0
  96. package/esm/admin/orm/models/appLimitCreditRedemption.js +96 -0
  97. package/esm/admin/orm/models/index.d.ts +12 -3
  98. package/esm/admin/orm/models/index.js +12 -3
  99. package/esm/admin/orm/models/orgLimitCap.d.ts +56 -0
  100. package/esm/admin/orm/models/orgLimitCap.js +96 -0
  101. package/esm/admin/orm/models/orgLimitCapsDefault.d.ts +56 -0
  102. package/esm/admin/orm/models/orgLimitCapsDefault.js +96 -0
  103. package/esm/admin/orm/models/orgLimitCredit.d.ts +56 -0
  104. package/esm/admin/orm/models/orgLimitCredit.js +96 -0
  105. package/esm/admin/orm/mutation/index.d.ts +1 -16
  106. package/esm/admin/orm/mutation/index.js +0 -12
  107. package/esm/admin/orm/query-builder.js +24 -0
  108. package/esm/auth/cli/commands.js +1 -3
  109. package/esm/auth/cli/executor.d.ts +0 -5
  110. package/esm/auth/orm/index.d.ts +0 -5
  111. package/esm/auth/orm/input-types.d.ts +0 -38
  112. package/esm/auth/orm/mutation/index.d.ts +1 -16
  113. package/esm/auth/orm/mutation/index.js +0 -12
  114. package/esm/auth/orm/query-builder.js +24 -0
  115. package/esm/objects/cli/commands.js +1 -3
  116. package/esm/objects/cli/executor.d.ts +0 -5
  117. package/esm/objects/orm/index.d.ts +0 -5
  118. package/esm/objects/orm/input-types.d.ts +0 -38
  119. package/esm/objects/orm/mutation/index.d.ts +1 -16
  120. package/esm/objects/orm/mutation/index.js +0 -12
  121. package/esm/objects/orm/query-builder.js +24 -0
  122. package/esm/public/cli/commands/api-setting.d.ts +8 -0
  123. package/esm/public/cli/commands/api-setting.js +468 -0
  124. package/esm/public/cli/commands/app-limit-cap.d.ts +8 -0
  125. package/esm/public/cli/commands/app-limit-cap.js +270 -0
  126. package/esm/public/cli/commands/app-limit-caps-default.d.ts +8 -0
  127. package/esm/public/cli/commands/app-limit-caps-default.js +250 -0
  128. package/esm/public/cli/commands/app-limit-credit-code-item.d.ts +8 -0
  129. package/esm/public/cli/commands/app-limit-credit-code-item.js +290 -0
  130. package/esm/public/cli/commands/app-limit-credit-code.d.ts +8 -0
  131. package/esm/public/cli/commands/app-limit-credit-code.js +294 -0
  132. package/esm/public/cli/commands/app-limit-credit-redemption.d.ts +8 -0
  133. package/esm/public/cli/commands/app-limit-credit-redemption.js +248 -0
  134. package/esm/public/cli/commands/app-limit-credit.d.ts +8 -0
  135. package/esm/public/cli/commands/app-limit-credit.js +314 -0
  136. package/esm/public/cli/commands/app-limit.js +66 -0
  137. package/esm/public/cli/commands/append-smart-tags.d.ts +8 -0
  138. package/esm/{admin/cli/commands/request-upload-url.js → public/cli/commands/append-smart-tags.js} +3 -3
  139. package/esm/public/cli/commands/billing-provider-module.d.ts +8 -0
  140. package/esm/public/cli/commands/billing-provider-module.js +624 -0
  141. package/esm/public/cli/commands/cors-setting.d.ts +8 -0
  142. package/esm/public/cli/commands/cors-setting.js +272 -0
  143. package/esm/public/cli/commands/database-setting.d.ts +8 -0
  144. package/esm/public/cli/commands/database-setting.js +448 -0
  145. package/esm/public/cli/commands/entity-type-provision.js +22 -0
  146. package/esm/public/cli/commands/function.d.ts +8 -0
  147. package/esm/public/cli/commands/function.js +268 -0
  148. package/esm/public/cli/commands/limits-module.js +198 -0
  149. package/esm/public/cli/commands/org-limit-aggregate.js +88 -0
  150. package/esm/public/cli/commands/org-limit-cap.d.ts +8 -0
  151. package/esm/public/cli/commands/org-limit-cap.js +270 -0
  152. package/esm/public/cli/commands/org-limit-caps-default.d.ts +8 -0
  153. package/esm/public/cli/commands/org-limit-caps-default.js +250 -0
  154. package/esm/public/cli/commands/org-limit-credit.d.ts +8 -0
  155. package/esm/public/cli/commands/org-limit-credit.js +336 -0
  156. package/esm/public/cli/commands/org-limit.js +66 -0
  157. package/esm/public/cli/commands/partition.d.ts +8 -0
  158. package/esm/public/cli/commands/partition.js +388 -0
  159. package/esm/public/cli/commands/plans-module.js +44 -0
  160. package/esm/public/cli/commands/pubkey-setting.d.ts +8 -0
  161. package/esm/public/cli/commands/pubkey-setting.js +382 -0
  162. package/esm/public/cli/commands/rls-setting.d.ts +8 -0
  163. package/esm/public/cli/commands/rls-setting.js +404 -0
  164. package/esm/public/cli/commands/storage-module.js +198 -0
  165. package/esm/public/cli/commands/webauthn-setting.d.ts +8 -0
  166. package/esm/public/cli/commands/webauthn-setting.js +580 -0
  167. package/esm/public/cli/commands.js +41 -5
  168. package/esm/public/cli/executor.d.ts +24 -6
  169. package/esm/public/orm/index.d.ts +43 -7
  170. package/esm/public/orm/index.js +38 -2
  171. package/esm/public/orm/input-types.d.ts +4601 -321
  172. package/esm/public/orm/input-types.js +21 -0
  173. package/esm/public/orm/models/apiSetting.d.ts +56 -0
  174. package/esm/public/orm/models/apiSetting.js +96 -0
  175. package/esm/public/orm/models/appLimitCap.d.ts +56 -0
  176. package/esm/public/orm/models/appLimitCap.js +96 -0
  177. package/esm/public/orm/models/appLimitCapsDefault.d.ts +56 -0
  178. package/esm/public/orm/models/appLimitCapsDefault.js +96 -0
  179. package/esm/public/orm/models/appLimitCredit.d.ts +56 -0
  180. package/esm/public/orm/models/appLimitCredit.js +96 -0
  181. package/esm/public/orm/models/appLimitCreditCode.d.ts +56 -0
  182. package/esm/public/orm/models/appLimitCreditCode.js +96 -0
  183. package/esm/public/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  184. package/esm/public/orm/models/appLimitCreditCodeItem.js +96 -0
  185. package/esm/public/orm/models/appLimitCreditRedemption.d.ts +56 -0
  186. package/esm/public/orm/models/appLimitCreditRedemption.js +96 -0
  187. package/esm/public/orm/models/billingProviderModule.d.ts +56 -0
  188. package/esm/public/orm/models/billingProviderModule.js +96 -0
  189. package/esm/public/orm/models/corsSetting.d.ts +56 -0
  190. package/esm/public/orm/models/corsSetting.js +96 -0
  191. package/esm/public/orm/models/databaseSetting.d.ts +56 -0
  192. package/esm/public/orm/models/databaseSetting.js +96 -0
  193. package/esm/public/orm/models/function.d.ts +56 -0
  194. package/esm/public/orm/models/function.js +96 -0
  195. package/esm/public/orm/models/index.d.ts +19 -1
  196. package/esm/public/orm/models/index.js +19 -1
  197. package/esm/public/orm/models/orgLimitCap.d.ts +56 -0
  198. package/esm/public/orm/models/orgLimitCap.js +96 -0
  199. package/esm/public/orm/models/orgLimitCapsDefault.d.ts +56 -0
  200. package/esm/public/orm/models/orgLimitCapsDefault.js +96 -0
  201. package/esm/public/orm/models/orgLimitCredit.d.ts +56 -0
  202. package/esm/public/orm/models/orgLimitCredit.js +96 -0
  203. package/esm/public/orm/models/partition.d.ts +56 -0
  204. package/esm/public/orm/models/partition.js +96 -0
  205. package/esm/public/orm/models/pubkeySetting.d.ts +56 -0
  206. package/esm/public/orm/models/pubkeySetting.js +96 -0
  207. package/esm/public/orm/models/rlsSetting.d.ts +56 -0
  208. package/esm/public/orm/models/rlsSetting.js +96 -0
  209. package/esm/public/orm/models/webauthnSetting.d.ts +56 -0
  210. package/esm/public/orm/models/webauthnSetting.js +96 -0
  211. package/esm/public/orm/mutation/index.d.ts +9 -16
  212. package/esm/public/orm/mutation/index.js +12 -12
  213. package/esm/public/orm/query-builder.js +24 -0
  214. package/objects/cli/commands.js +1 -3
  215. package/objects/cli/executor.d.ts +0 -5
  216. package/objects/orm/index.d.ts +0 -5
  217. package/objects/orm/input-types.d.ts +0 -38
  218. package/objects/orm/mutation/index.d.ts +1 -16
  219. package/objects/orm/mutation/index.js +0 -12
  220. package/objects/orm/query-builder.js +24 -0
  221. package/package.json +4 -4
  222. package/public/cli/commands/api-setting.d.ts +8 -0
  223. package/public/cli/commands/api-setting.js +470 -0
  224. package/public/cli/commands/app-limit-cap.d.ts +8 -0
  225. package/public/cli/commands/app-limit-cap.js +272 -0
  226. package/public/cli/commands/app-limit-caps-default.d.ts +8 -0
  227. package/public/cli/commands/app-limit-caps-default.js +252 -0
  228. package/public/cli/commands/app-limit-credit-code-item.d.ts +8 -0
  229. package/public/cli/commands/app-limit-credit-code-item.js +292 -0
  230. package/public/cli/commands/app-limit-credit-code.d.ts +8 -0
  231. package/public/cli/commands/app-limit-credit-code.js +296 -0
  232. package/public/cli/commands/app-limit-credit-redemption.d.ts +8 -0
  233. package/public/cli/commands/app-limit-credit-redemption.js +250 -0
  234. package/public/cli/commands/app-limit-credit.d.ts +8 -0
  235. package/public/cli/commands/app-limit-credit.js +316 -0
  236. package/public/cli/commands/app-limit.js +66 -0
  237. package/public/cli/commands/append-smart-tags.d.ts +8 -0
  238. package/{objects/cli/commands/request-upload-url.js → public/cli/commands/append-smart-tags.js} +3 -3
  239. package/public/cli/commands/billing-provider-module.d.ts +8 -0
  240. package/public/cli/commands/billing-provider-module.js +626 -0
  241. package/public/cli/commands/cors-setting.d.ts +8 -0
  242. package/public/cli/commands/cors-setting.js +274 -0
  243. package/public/cli/commands/database-setting.d.ts +8 -0
  244. package/public/cli/commands/database-setting.js +450 -0
  245. package/public/cli/commands/entity-type-provision.js +22 -0
  246. package/public/cli/commands/function.d.ts +8 -0
  247. package/public/cli/commands/function.js +270 -0
  248. package/public/cli/commands/limits-module.js +198 -0
  249. package/public/cli/commands/org-limit-aggregate.js +88 -0
  250. package/public/cli/commands/org-limit-cap.d.ts +8 -0
  251. package/public/cli/commands/org-limit-cap.js +272 -0
  252. package/public/cli/commands/org-limit-caps-default.d.ts +8 -0
  253. package/public/cli/commands/org-limit-caps-default.js +252 -0
  254. package/public/cli/commands/org-limit-credit.d.ts +8 -0
  255. package/public/cli/commands/org-limit-credit.js +338 -0
  256. package/public/cli/commands/org-limit.js +66 -0
  257. package/public/cli/commands/partition.d.ts +8 -0
  258. package/public/cli/commands/partition.js +390 -0
  259. package/public/cli/commands/plans-module.js +44 -0
  260. package/public/cli/commands/pubkey-setting.d.ts +8 -0
  261. package/public/cli/commands/pubkey-setting.js +384 -0
  262. package/public/cli/commands/rls-setting.d.ts +8 -0
  263. package/public/cli/commands/rls-setting.js +406 -0
  264. package/public/cli/commands/storage-module.js +198 -0
  265. package/public/cli/commands/webauthn-setting.d.ts +8 -0
  266. package/public/cli/commands/webauthn-setting.js +582 -0
  267. package/public/cli/commands.js +41 -5
  268. package/public/cli/executor.d.ts +24 -6
  269. package/public/orm/index.d.ts +43 -7
  270. package/public/orm/index.js +38 -2
  271. package/public/orm/input-types.d.ts +4601 -321
  272. package/public/orm/input-types.js +21 -0
  273. package/public/orm/models/apiSetting.d.ts +56 -0
  274. package/public/orm/models/apiSetting.js +100 -0
  275. package/public/orm/models/appLimitCap.d.ts +56 -0
  276. package/public/orm/models/appLimitCap.js +100 -0
  277. package/public/orm/models/appLimitCapsDefault.d.ts +56 -0
  278. package/public/orm/models/appLimitCapsDefault.js +100 -0
  279. package/public/orm/models/appLimitCredit.d.ts +56 -0
  280. package/public/orm/models/appLimitCredit.js +100 -0
  281. package/public/orm/models/appLimitCreditCode.d.ts +56 -0
  282. package/public/orm/models/appLimitCreditCode.js +100 -0
  283. package/public/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  284. package/public/orm/models/appLimitCreditCodeItem.js +100 -0
  285. package/public/orm/models/appLimitCreditRedemption.d.ts +56 -0
  286. package/public/orm/models/appLimitCreditRedemption.js +100 -0
  287. package/public/orm/models/billingProviderModule.d.ts +56 -0
  288. package/public/orm/models/billingProviderModule.js +100 -0
  289. package/public/orm/models/corsSetting.d.ts +56 -0
  290. package/public/orm/models/corsSetting.js +100 -0
  291. package/public/orm/models/databaseSetting.d.ts +56 -0
  292. package/public/orm/models/databaseSetting.js +100 -0
  293. package/public/orm/models/function.d.ts +56 -0
  294. package/public/orm/models/function.js +100 -0
  295. package/public/orm/models/index.d.ts +19 -1
  296. package/public/orm/models/index.js +41 -5
  297. package/public/orm/models/orgLimitCap.d.ts +56 -0
  298. package/public/orm/models/orgLimitCap.js +100 -0
  299. package/public/orm/models/orgLimitCapsDefault.d.ts +56 -0
  300. package/public/orm/models/orgLimitCapsDefault.js +100 -0
  301. package/public/orm/models/orgLimitCredit.d.ts +56 -0
  302. package/public/orm/models/orgLimitCredit.js +100 -0
  303. package/public/orm/models/partition.d.ts +56 -0
  304. package/public/orm/models/partition.js +100 -0
  305. package/public/orm/models/pubkeySetting.d.ts +56 -0
  306. package/public/orm/models/pubkeySetting.js +100 -0
  307. package/public/orm/models/rlsSetting.d.ts +56 -0
  308. package/public/orm/models/rlsSetting.js +100 -0
  309. package/public/orm/models/webauthnSetting.d.ts +56 -0
  310. package/public/orm/models/webauthnSetting.js +100 -0
  311. package/public/orm/mutation/index.d.ts +9 -16
  312. package/public/orm/mutation/index.js +12 -12
  313. package/public/orm/query-builder.js +24 -0
  314. package/admin/cli/commands/request-upload-url.js +0 -36
  315. package/auth/cli/commands/request-upload-url.js +0 -36
  316. package/esm/auth/cli/commands/request-upload-url.js +0 -34
  317. package/esm/objects/cli/commands/request-upload-url.d.ts +0 -8
  318. package/esm/objects/cli/commands/request-upload-url.js +0 -34
  319. package/esm/public/cli/commands/request-upload-url.d.ts +0 -8
  320. package/esm/public/cli/commands/request-upload-url.js +0 -34
  321. package/objects/cli/commands/request-upload-url.d.ts +0 -8
  322. package/public/cli/commands/request-upload-url.d.ts +0 -8
  323. package/public/cli/commands/request-upload-url.js +0 -36
@@ -0,0 +1,390 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * CLI commands for Partition
5
+ * @generated by @constructive-io/graphql-codegen
6
+ * DO NOT EDIT - changes will be overwritten
7
+ */
8
+ const inquirerer_1 = require("inquirerer");
9
+ const executor_1 = require("../executor");
10
+ const utils_1 = require("../utils");
11
+ const fieldSchema = {
12
+ id: 'uuid',
13
+ databaseId: 'uuid',
14
+ tableId: 'uuid',
15
+ strategy: 'string',
16
+ partitionKeyId: 'uuid',
17
+ interval: 'string',
18
+ retention: 'string',
19
+ lookahead: 'int',
20
+ namingPattern: 'string',
21
+ createdAt: 'string',
22
+ updatedAt: 'string',
23
+ };
24
+ const usage = '\npartition <command>\n\nCommands:\n list List partition records\n find-first Find first matching partition record\n get Get a partition by ID\n create Create a new partition\n update Update an existing partition\n delete Delete a partition\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\n --help, -h Show this help message\n';
25
+ exports.default = async (argv, prompter, _options) => {
26
+ if (argv.help || argv.h) {
27
+ console.log(usage);
28
+ process.exit(0);
29
+ }
30
+ const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
31
+ if (!subcommand) {
32
+ const answer = await prompter.prompt(argv, [
33
+ {
34
+ type: 'autocomplete',
35
+ name: 'subcommand',
36
+ message: 'What do you want to do?',
37
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
38
+ },
39
+ ]);
40
+ return handleTableSubcommand(answer.subcommand, newArgv, prompter);
41
+ }
42
+ return handleTableSubcommand(subcommand, newArgv, prompter);
43
+ };
44
+ async function handleTableSubcommand(subcommand, argv, prompter) {
45
+ switch (subcommand) {
46
+ case 'list':
47
+ return handleList(argv, prompter);
48
+ case 'find-first':
49
+ return handleFindFirst(argv, prompter);
50
+ case 'get':
51
+ return handleGet(argv, prompter);
52
+ case 'create':
53
+ return handleCreate(argv, prompter);
54
+ case 'update':
55
+ return handleUpdate(argv, prompter);
56
+ case 'delete':
57
+ return handleDelete(argv, prompter);
58
+ default:
59
+ console.log(usage);
60
+ process.exit(1);
61
+ }
62
+ }
63
+ async function handleList(argv, _prompter) {
64
+ try {
65
+ const defaultSelect = {
66
+ id: true,
67
+ databaseId: true,
68
+ tableId: true,
69
+ strategy: true,
70
+ partitionKeyId: true,
71
+ interval: true,
72
+ retention: true,
73
+ lookahead: true,
74
+ namingPattern: true,
75
+ createdAt: true,
76
+ updatedAt: true,
77
+ };
78
+ const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
79
+ const client = (0, executor_1.getClient)();
80
+ const result = await client.partition.findMany(findManyArgs).execute();
81
+ console.log(JSON.stringify(result, null, 2));
82
+ }
83
+ catch (error) {
84
+ console.error('Failed to list records.');
85
+ if (error instanceof Error) {
86
+ console.error(error.message);
87
+ }
88
+ process.exit(1);
89
+ }
90
+ }
91
+ async function handleFindFirst(argv, _prompter) {
92
+ try {
93
+ const defaultSelect = {
94
+ id: true,
95
+ databaseId: true,
96
+ tableId: true,
97
+ strategy: true,
98
+ partitionKeyId: true,
99
+ interval: true,
100
+ retention: true,
101
+ lookahead: true,
102
+ namingPattern: true,
103
+ createdAt: true,
104
+ updatedAt: true,
105
+ };
106
+ const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
107
+ const client = (0, executor_1.getClient)();
108
+ const result = await client.partition.findFirst(findFirstArgs).execute();
109
+ console.log(JSON.stringify(result, null, 2));
110
+ }
111
+ catch (error) {
112
+ console.error('Failed to find record.');
113
+ if (error instanceof Error) {
114
+ console.error(error.message);
115
+ }
116
+ process.exit(1);
117
+ }
118
+ }
119
+ async function handleGet(argv, prompter) {
120
+ try {
121
+ const answers = await prompter.prompt(argv, [
122
+ {
123
+ type: 'text',
124
+ name: 'id',
125
+ message: 'id',
126
+ required: true,
127
+ },
128
+ ]);
129
+ const client = (0, executor_1.getClient)();
130
+ const result = await client.partition
131
+ .findOne({
132
+ id: answers.id,
133
+ select: {
134
+ id: true,
135
+ databaseId: true,
136
+ tableId: true,
137
+ strategy: true,
138
+ partitionKeyId: true,
139
+ interval: true,
140
+ retention: true,
141
+ lookahead: true,
142
+ namingPattern: true,
143
+ createdAt: true,
144
+ updatedAt: true,
145
+ },
146
+ })
147
+ .execute();
148
+ console.log(JSON.stringify(result, null, 2));
149
+ }
150
+ catch (error) {
151
+ console.error('Record not found.');
152
+ if (error instanceof Error) {
153
+ console.error(error.message);
154
+ }
155
+ process.exit(1);
156
+ }
157
+ }
158
+ async function handleCreate(argv, prompter) {
159
+ try {
160
+ const rawAnswers = await prompter.prompt(argv, [
161
+ {
162
+ type: 'text',
163
+ name: 'databaseId',
164
+ message: 'databaseId',
165
+ required: true,
166
+ },
167
+ {
168
+ type: 'text',
169
+ name: 'tableId',
170
+ message: 'tableId',
171
+ required: true,
172
+ },
173
+ {
174
+ type: 'text',
175
+ name: 'strategy',
176
+ message: 'strategy',
177
+ required: true,
178
+ },
179
+ {
180
+ type: 'text',
181
+ name: 'partitionKeyId',
182
+ message: 'partitionKeyId',
183
+ required: true,
184
+ },
185
+ {
186
+ type: 'text',
187
+ name: 'interval',
188
+ message: 'interval',
189
+ required: false,
190
+ skipPrompt: true,
191
+ },
192
+ {
193
+ type: 'text',
194
+ name: 'retention',
195
+ message: 'retention',
196
+ required: false,
197
+ skipPrompt: true,
198
+ },
199
+ {
200
+ type: 'text',
201
+ name: 'lookahead',
202
+ message: 'lookahead',
203
+ required: false,
204
+ skipPrompt: true,
205
+ },
206
+ {
207
+ type: 'text',
208
+ name: 'namingPattern',
209
+ message: 'namingPattern',
210
+ required: false,
211
+ skipPrompt: true,
212
+ },
213
+ ]);
214
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
215
+ const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
216
+ const client = (0, executor_1.getClient)();
217
+ const result = await client.partition
218
+ .create({
219
+ data: {
220
+ databaseId: cleanedData.databaseId,
221
+ tableId: cleanedData.tableId,
222
+ strategy: cleanedData.strategy,
223
+ partitionKeyId: cleanedData.partitionKeyId,
224
+ interval: cleanedData.interval,
225
+ retention: cleanedData.retention,
226
+ lookahead: cleanedData.lookahead,
227
+ namingPattern: cleanedData.namingPattern,
228
+ },
229
+ select: {
230
+ id: true,
231
+ databaseId: true,
232
+ tableId: true,
233
+ strategy: true,
234
+ partitionKeyId: true,
235
+ interval: true,
236
+ retention: true,
237
+ lookahead: true,
238
+ namingPattern: true,
239
+ createdAt: true,
240
+ updatedAt: true,
241
+ },
242
+ })
243
+ .execute();
244
+ console.log(JSON.stringify(result, null, 2));
245
+ }
246
+ catch (error) {
247
+ console.error('Failed to create record.');
248
+ if (error instanceof Error) {
249
+ console.error(error.message);
250
+ }
251
+ process.exit(1);
252
+ }
253
+ }
254
+ async function handleUpdate(argv, prompter) {
255
+ try {
256
+ const rawAnswers = await prompter.prompt(argv, [
257
+ {
258
+ type: 'text',
259
+ name: 'id',
260
+ message: 'id',
261
+ required: true,
262
+ },
263
+ {
264
+ type: 'text',
265
+ name: 'databaseId',
266
+ message: 'databaseId',
267
+ required: false,
268
+ },
269
+ {
270
+ type: 'text',
271
+ name: 'tableId',
272
+ message: 'tableId',
273
+ required: false,
274
+ },
275
+ {
276
+ type: 'text',
277
+ name: 'strategy',
278
+ message: 'strategy',
279
+ required: false,
280
+ },
281
+ {
282
+ type: 'text',
283
+ name: 'partitionKeyId',
284
+ message: 'partitionKeyId',
285
+ required: false,
286
+ },
287
+ {
288
+ type: 'text',
289
+ name: 'interval',
290
+ message: 'interval',
291
+ required: false,
292
+ skipPrompt: true,
293
+ },
294
+ {
295
+ type: 'text',
296
+ name: 'retention',
297
+ message: 'retention',
298
+ required: false,
299
+ skipPrompt: true,
300
+ },
301
+ {
302
+ type: 'text',
303
+ name: 'lookahead',
304
+ message: 'lookahead',
305
+ required: false,
306
+ skipPrompt: true,
307
+ },
308
+ {
309
+ type: 'text',
310
+ name: 'namingPattern',
311
+ message: 'namingPattern',
312
+ required: false,
313
+ skipPrompt: true,
314
+ },
315
+ ]);
316
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
317
+ const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
318
+ const client = (0, executor_1.getClient)();
319
+ const result = await client.partition
320
+ .update({
321
+ where: {
322
+ id: answers.id,
323
+ },
324
+ data: {
325
+ databaseId: cleanedData.databaseId,
326
+ tableId: cleanedData.tableId,
327
+ strategy: cleanedData.strategy,
328
+ partitionKeyId: cleanedData.partitionKeyId,
329
+ interval: cleanedData.interval,
330
+ retention: cleanedData.retention,
331
+ lookahead: cleanedData.lookahead,
332
+ namingPattern: cleanedData.namingPattern,
333
+ },
334
+ select: {
335
+ id: true,
336
+ databaseId: true,
337
+ tableId: true,
338
+ strategy: true,
339
+ partitionKeyId: true,
340
+ interval: true,
341
+ retention: true,
342
+ lookahead: true,
343
+ namingPattern: true,
344
+ createdAt: true,
345
+ updatedAt: true,
346
+ },
347
+ })
348
+ .execute();
349
+ console.log(JSON.stringify(result, null, 2));
350
+ }
351
+ catch (error) {
352
+ console.error('Failed to update record.');
353
+ if (error instanceof Error) {
354
+ console.error(error.message);
355
+ }
356
+ process.exit(1);
357
+ }
358
+ }
359
+ async function handleDelete(argv, prompter) {
360
+ try {
361
+ const rawAnswers = await prompter.prompt(argv, [
362
+ {
363
+ type: 'text',
364
+ name: 'id',
365
+ message: 'id',
366
+ required: true,
367
+ },
368
+ ]);
369
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
370
+ const client = (0, executor_1.getClient)();
371
+ const result = await client.partition
372
+ .delete({
373
+ where: {
374
+ id: answers.id,
375
+ },
376
+ select: {
377
+ id: true,
378
+ },
379
+ })
380
+ .execute();
381
+ console.log(JSON.stringify(result, null, 2));
382
+ }
383
+ catch (error) {
384
+ console.error('Failed to delete record.');
385
+ if (error instanceof Error) {
386
+ console.error(error.message);
387
+ }
388
+ process.exit(1);
389
+ }
390
+ }
@@ -17,6 +17,8 @@ const fieldSchema = {
17
17
  plansTableName: 'string',
18
18
  planLimitsTableId: 'uuid',
19
19
  planLimitsTableName: 'string',
20
+ planPricingTableId: 'uuid',
21
+ planOverridesTableId: 'uuid',
20
22
  applyPlanFunction: 'string',
21
23
  applyPlanAggregateFunction: 'string',
22
24
  prefix: 'string',
@@ -71,6 +73,8 @@ async function handleList(argv, _prompter) {
71
73
  plansTableName: true,
72
74
  planLimitsTableId: true,
73
75
  planLimitsTableName: true,
76
+ planPricingTableId: true,
77
+ planOverridesTableId: true,
74
78
  applyPlanFunction: true,
75
79
  applyPlanAggregateFunction: true,
76
80
  prefix: true,
@@ -99,6 +103,8 @@ async function handleFindFirst(argv, _prompter) {
99
103
  plansTableName: true,
100
104
  planLimitsTableId: true,
101
105
  planLimitsTableName: true,
106
+ planPricingTableId: true,
107
+ planOverridesTableId: true,
102
108
  applyPlanFunction: true,
103
109
  applyPlanAggregateFunction: true,
104
110
  prefix: true,
@@ -139,6 +145,8 @@ async function handleGet(argv, prompter) {
139
145
  plansTableName: true,
140
146
  planLimitsTableId: true,
141
147
  planLimitsTableName: true,
148
+ planPricingTableId: true,
149
+ planOverridesTableId: true,
142
150
  applyPlanFunction: true,
143
151
  applyPlanAggregateFunction: true,
144
152
  prefix: true,
@@ -206,6 +214,20 @@ async function handleCreate(argv, prompter) {
206
214
  required: false,
207
215
  skipPrompt: true,
208
216
  },
217
+ {
218
+ type: 'text',
219
+ name: 'planPricingTableId',
220
+ message: 'planPricingTableId',
221
+ required: false,
222
+ skipPrompt: true,
223
+ },
224
+ {
225
+ type: 'text',
226
+ name: 'planOverridesTableId',
227
+ message: 'planOverridesTableId',
228
+ required: false,
229
+ skipPrompt: true,
230
+ },
209
231
  {
210
232
  type: 'text',
211
233
  name: 'applyPlanFunction',
@@ -241,6 +263,8 @@ async function handleCreate(argv, prompter) {
241
263
  plansTableName: cleanedData.plansTableName,
242
264
  planLimitsTableId: cleanedData.planLimitsTableId,
243
265
  planLimitsTableName: cleanedData.planLimitsTableName,
266
+ planPricingTableId: cleanedData.planPricingTableId,
267
+ planOverridesTableId: cleanedData.planOverridesTableId,
244
268
  applyPlanFunction: cleanedData.applyPlanFunction,
245
269
  applyPlanAggregateFunction: cleanedData.applyPlanAggregateFunction,
246
270
  prefix: cleanedData.prefix,
@@ -254,6 +278,8 @@ async function handleCreate(argv, prompter) {
254
278
  plansTableName: true,
255
279
  planLimitsTableId: true,
256
280
  planLimitsTableName: true,
281
+ planPricingTableId: true,
282
+ planOverridesTableId: true,
257
283
  applyPlanFunction: true,
258
284
  applyPlanAggregateFunction: true,
259
285
  prefix: true,
@@ -327,6 +353,20 @@ async function handleUpdate(argv, prompter) {
327
353
  required: false,
328
354
  skipPrompt: true,
329
355
  },
356
+ {
357
+ type: 'text',
358
+ name: 'planPricingTableId',
359
+ message: 'planPricingTableId',
360
+ required: false,
361
+ skipPrompt: true,
362
+ },
363
+ {
364
+ type: 'text',
365
+ name: 'planOverridesTableId',
366
+ message: 'planOverridesTableId',
367
+ required: false,
368
+ skipPrompt: true,
369
+ },
330
370
  {
331
371
  type: 'text',
332
372
  name: 'applyPlanFunction',
@@ -365,6 +405,8 @@ async function handleUpdate(argv, prompter) {
365
405
  plansTableName: cleanedData.plansTableName,
366
406
  planLimitsTableId: cleanedData.planLimitsTableId,
367
407
  planLimitsTableName: cleanedData.planLimitsTableName,
408
+ planPricingTableId: cleanedData.planPricingTableId,
409
+ planOverridesTableId: cleanedData.planOverridesTableId,
368
410
  applyPlanFunction: cleanedData.applyPlanFunction,
369
411
  applyPlanAggregateFunction: cleanedData.applyPlanAggregateFunction,
370
412
  prefix: cleanedData.prefix,
@@ -378,6 +420,8 @@ async function handleUpdate(argv, prompter) {
378
420
  plansTableName: true,
379
421
  planLimitsTableId: true,
380
422
  planLimitsTableName: true,
423
+ planPricingTableId: true,
424
+ planOverridesTableId: true,
381
425
  applyPlanFunction: true,
382
426
  applyPlanAggregateFunction: true,
383
427
  prefix: true,
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI commands for PubkeySetting
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { CLIOptions, Inquirerer } from 'inquirerer';
7
+ declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
8
+ export default _default;