@constructive-sdk/cli 0.20.3 → 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,8 @@
1
+ /**
2
+ * CLI commands for OrgLimitCredit
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;
@@ -0,0 +1,336 @@
1
+ /**
2
+ * CLI commands for OrgLimitCredit
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
+ id: 'uuid',
11
+ defaultLimitId: 'uuid',
12
+ actorId: 'uuid',
13
+ entityId: 'uuid',
14
+ amount: 'int',
15
+ creditType: 'string',
16
+ reason: 'string',
17
+ };
18
+ const usage = '\norg-limit-credit <command>\n\nCommands:\n list List orgLimitCredit records\n find-first Find first matching orgLimitCredit record\n get Get a orgLimitCredit by ID\n create Create a new orgLimitCredit\n update Update an existing orgLimitCredit\n delete Delete a orgLimitCredit\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';
19
+ export default async (argv, prompter, _options) => {
20
+ if (argv.help || argv.h) {
21
+ console.log(usage);
22
+ process.exit(0);
23
+ }
24
+ const { first: subcommand, newArgv } = extractFirst(argv);
25
+ if (!subcommand) {
26
+ const answer = await prompter.prompt(argv, [
27
+ {
28
+ type: 'autocomplete',
29
+ name: 'subcommand',
30
+ message: 'What do you want to do?',
31
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
32
+ },
33
+ ]);
34
+ return handleTableSubcommand(answer.subcommand, newArgv, prompter);
35
+ }
36
+ return handleTableSubcommand(subcommand, newArgv, prompter);
37
+ };
38
+ async function handleTableSubcommand(subcommand, argv, prompter) {
39
+ switch (subcommand) {
40
+ case 'list':
41
+ return handleList(argv, prompter);
42
+ case 'find-first':
43
+ return handleFindFirst(argv, prompter);
44
+ case 'get':
45
+ return handleGet(argv, prompter);
46
+ case 'create':
47
+ return handleCreate(argv, prompter);
48
+ case 'update':
49
+ return handleUpdate(argv, prompter);
50
+ case 'delete':
51
+ return handleDelete(argv, prompter);
52
+ default:
53
+ console.log(usage);
54
+ process.exit(1);
55
+ }
56
+ }
57
+ async function handleList(argv, _prompter) {
58
+ try {
59
+ const defaultSelect = {
60
+ id: true,
61
+ defaultLimitId: true,
62
+ actorId: true,
63
+ entityId: true,
64
+ amount: true,
65
+ creditType: true,
66
+ reason: true,
67
+ };
68
+ const findManyArgs = parseFindManyArgs(argv, defaultSelect);
69
+ const client = getClient();
70
+ const result = await client.orgLimitCredit.findMany(findManyArgs).execute();
71
+ console.log(JSON.stringify(result, null, 2));
72
+ }
73
+ catch (error) {
74
+ console.error('Failed to list records.');
75
+ if (error instanceof Error) {
76
+ console.error(error.message);
77
+ }
78
+ process.exit(1);
79
+ }
80
+ }
81
+ async function handleFindFirst(argv, _prompter) {
82
+ try {
83
+ const defaultSelect = {
84
+ id: true,
85
+ defaultLimitId: true,
86
+ actorId: true,
87
+ entityId: true,
88
+ amount: true,
89
+ creditType: true,
90
+ reason: true,
91
+ };
92
+ const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
93
+ const client = getClient();
94
+ const result = await client.orgLimitCredit.findFirst(findFirstArgs).execute();
95
+ console.log(JSON.stringify(result, null, 2));
96
+ }
97
+ catch (error) {
98
+ console.error('Failed to find record.');
99
+ if (error instanceof Error) {
100
+ console.error(error.message);
101
+ }
102
+ process.exit(1);
103
+ }
104
+ }
105
+ async function handleGet(argv, prompter) {
106
+ try {
107
+ const answers = await prompter.prompt(argv, [
108
+ {
109
+ type: 'text',
110
+ name: 'id',
111
+ message: 'id',
112
+ required: true,
113
+ },
114
+ ]);
115
+ const client = getClient();
116
+ const result = await client.orgLimitCredit
117
+ .findOne({
118
+ id: answers.id,
119
+ select: {
120
+ id: true,
121
+ defaultLimitId: true,
122
+ actorId: true,
123
+ entityId: true,
124
+ amount: true,
125
+ creditType: true,
126
+ reason: true,
127
+ },
128
+ })
129
+ .execute();
130
+ console.log(JSON.stringify(result, null, 2));
131
+ }
132
+ catch (error) {
133
+ console.error('Record not found.');
134
+ if (error instanceof Error) {
135
+ console.error(error.message);
136
+ }
137
+ process.exit(1);
138
+ }
139
+ }
140
+ async function handleCreate(argv, prompter) {
141
+ try {
142
+ const rawAnswers = await prompter.prompt(argv, [
143
+ {
144
+ type: 'text',
145
+ name: 'defaultLimitId',
146
+ message: 'defaultLimitId',
147
+ required: true,
148
+ },
149
+ {
150
+ type: 'text',
151
+ name: 'actorId',
152
+ message: 'actorId',
153
+ required: false,
154
+ skipPrompt: true,
155
+ },
156
+ {
157
+ type: 'text',
158
+ name: 'entityId',
159
+ message: 'entityId',
160
+ required: false,
161
+ skipPrompt: true,
162
+ },
163
+ {
164
+ type: 'text',
165
+ name: 'amount',
166
+ message: 'amount',
167
+ required: true,
168
+ },
169
+ {
170
+ type: 'text',
171
+ name: 'creditType',
172
+ message: 'creditType',
173
+ required: false,
174
+ skipPrompt: true,
175
+ },
176
+ {
177
+ type: 'text',
178
+ name: 'reason',
179
+ message: 'reason',
180
+ required: false,
181
+ skipPrompt: true,
182
+ },
183
+ ]);
184
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
185
+ const cleanedData = stripUndefined(answers, fieldSchema);
186
+ const client = getClient();
187
+ const result = await client.orgLimitCredit
188
+ .create({
189
+ data: {
190
+ defaultLimitId: cleanedData.defaultLimitId,
191
+ actorId: cleanedData.actorId,
192
+ entityId: cleanedData.entityId,
193
+ amount: cleanedData.amount,
194
+ creditType: cleanedData.creditType,
195
+ reason: cleanedData.reason,
196
+ },
197
+ select: {
198
+ id: true,
199
+ defaultLimitId: true,
200
+ actorId: true,
201
+ entityId: true,
202
+ amount: true,
203
+ creditType: true,
204
+ reason: true,
205
+ },
206
+ })
207
+ .execute();
208
+ console.log(JSON.stringify(result, null, 2));
209
+ }
210
+ catch (error) {
211
+ console.error('Failed to create record.');
212
+ if (error instanceof Error) {
213
+ console.error(error.message);
214
+ }
215
+ process.exit(1);
216
+ }
217
+ }
218
+ async function handleUpdate(argv, prompter) {
219
+ try {
220
+ const rawAnswers = await prompter.prompt(argv, [
221
+ {
222
+ type: 'text',
223
+ name: 'id',
224
+ message: 'id',
225
+ required: true,
226
+ },
227
+ {
228
+ type: 'text',
229
+ name: 'defaultLimitId',
230
+ message: 'defaultLimitId',
231
+ required: false,
232
+ },
233
+ {
234
+ type: 'text',
235
+ name: 'actorId',
236
+ message: 'actorId',
237
+ required: false,
238
+ skipPrompt: true,
239
+ },
240
+ {
241
+ type: 'text',
242
+ name: 'entityId',
243
+ message: 'entityId',
244
+ required: false,
245
+ skipPrompt: true,
246
+ },
247
+ {
248
+ type: 'text',
249
+ name: 'amount',
250
+ message: 'amount',
251
+ required: false,
252
+ },
253
+ {
254
+ type: 'text',
255
+ name: 'creditType',
256
+ message: 'creditType',
257
+ required: false,
258
+ skipPrompt: true,
259
+ },
260
+ {
261
+ type: 'text',
262
+ name: 'reason',
263
+ message: 'reason',
264
+ required: false,
265
+ skipPrompt: true,
266
+ },
267
+ ]);
268
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
269
+ const cleanedData = stripUndefined(answers, fieldSchema);
270
+ const client = getClient();
271
+ const result = await client.orgLimitCredit
272
+ .update({
273
+ where: {
274
+ id: answers.id,
275
+ },
276
+ data: {
277
+ defaultLimitId: cleanedData.defaultLimitId,
278
+ actorId: cleanedData.actorId,
279
+ entityId: cleanedData.entityId,
280
+ amount: cleanedData.amount,
281
+ creditType: cleanedData.creditType,
282
+ reason: cleanedData.reason,
283
+ },
284
+ select: {
285
+ id: true,
286
+ defaultLimitId: true,
287
+ actorId: true,
288
+ entityId: true,
289
+ amount: true,
290
+ creditType: true,
291
+ reason: true,
292
+ },
293
+ })
294
+ .execute();
295
+ console.log(JSON.stringify(result, null, 2));
296
+ }
297
+ catch (error) {
298
+ console.error('Failed to update record.');
299
+ if (error instanceof Error) {
300
+ console.error(error.message);
301
+ }
302
+ process.exit(1);
303
+ }
304
+ }
305
+ async function handleDelete(argv, prompter) {
306
+ try {
307
+ const rawAnswers = await prompter.prompt(argv, [
308
+ {
309
+ type: 'text',
310
+ name: 'id',
311
+ message: 'id',
312
+ required: true,
313
+ },
314
+ ]);
315
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
316
+ const client = getClient();
317
+ const result = await client.orgLimitCredit
318
+ .delete({
319
+ where: {
320
+ id: answers.id,
321
+ },
322
+ select: {
323
+ id: true,
324
+ },
325
+ })
326
+ .execute();
327
+ console.log(JSON.stringify(result, null, 2));
328
+ }
329
+ catch (error) {
330
+ console.error('Failed to delete record.');
331
+ if (error instanceof Error) {
332
+ console.error(error.message);
333
+ }
334
+ process.exit(1);
335
+ }
336
+ }
@@ -15,6 +15,9 @@ const fieldSchema = {
15
15
  softMax: 'int',
16
16
  windowStart: 'string',
17
17
  windowDuration: 'string',
18
+ planMax: 'int',
19
+ purchasedCredits: 'int',
20
+ periodCredits: 'int',
18
21
  entityId: 'uuid',
19
22
  };
20
23
  const usage = '\norg-limit <command>\n\nCommands:\n list List orgLimit records\n find-first Find first matching orgLimit record\n get Get a orgLimit by ID\n create Create a new orgLimit\n update Update an existing orgLimit\n delete Delete a orgLimit\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';
@@ -67,6 +70,9 @@ async function handleList(argv, _prompter) {
67
70
  softMax: true,
68
71
  windowStart: true,
69
72
  windowDuration: true,
73
+ planMax: true,
74
+ purchasedCredits: true,
75
+ periodCredits: true,
70
76
  entityId: true,
71
77
  };
72
78
  const findManyArgs = parseFindManyArgs(argv, defaultSelect);
@@ -93,6 +99,9 @@ async function handleFindFirst(argv, _prompter) {
93
99
  softMax: true,
94
100
  windowStart: true,
95
101
  windowDuration: true,
102
+ planMax: true,
103
+ purchasedCredits: true,
104
+ periodCredits: true,
96
105
  entityId: true,
97
106
  };
98
107
  const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
@@ -131,6 +140,9 @@ async function handleGet(argv, prompter) {
131
140
  softMax: true,
132
141
  windowStart: true,
133
142
  windowDuration: true,
143
+ planMax: true,
144
+ purchasedCredits: true,
145
+ periodCredits: true,
134
146
  entityId: true,
135
147
  },
136
148
  })
@@ -196,6 +208,27 @@ async function handleCreate(argv, prompter) {
196
208
  required: false,
197
209
  skipPrompt: true,
198
210
  },
211
+ {
212
+ type: 'text',
213
+ name: 'planMax',
214
+ message: 'planMax',
215
+ required: false,
216
+ skipPrompt: true,
217
+ },
218
+ {
219
+ type: 'text',
220
+ name: 'purchasedCredits',
221
+ message: 'purchasedCredits',
222
+ required: false,
223
+ skipPrompt: true,
224
+ },
225
+ {
226
+ type: 'text',
227
+ name: 'periodCredits',
228
+ message: 'periodCredits',
229
+ required: false,
230
+ skipPrompt: true,
231
+ },
199
232
  {
200
233
  type: 'text',
201
234
  name: 'entityId',
@@ -216,6 +249,9 @@ async function handleCreate(argv, prompter) {
216
249
  softMax: cleanedData.softMax,
217
250
  windowStart: cleanedData.windowStart,
218
251
  windowDuration: cleanedData.windowDuration,
252
+ planMax: cleanedData.planMax,
253
+ purchasedCredits: cleanedData.purchasedCredits,
254
+ periodCredits: cleanedData.periodCredits,
219
255
  entityId: cleanedData.entityId,
220
256
  },
221
257
  select: {
@@ -227,6 +263,9 @@ async function handleCreate(argv, prompter) {
227
263
  softMax: true,
228
264
  windowStart: true,
229
265
  windowDuration: true,
266
+ planMax: true,
267
+ purchasedCredits: true,
268
+ periodCredits: true,
230
269
  entityId: true,
231
270
  },
232
271
  })
@@ -298,6 +337,27 @@ async function handleUpdate(argv, prompter) {
298
337
  required: false,
299
338
  skipPrompt: true,
300
339
  },
340
+ {
341
+ type: 'text',
342
+ name: 'planMax',
343
+ message: 'planMax',
344
+ required: false,
345
+ skipPrompt: true,
346
+ },
347
+ {
348
+ type: 'text',
349
+ name: 'purchasedCredits',
350
+ message: 'purchasedCredits',
351
+ required: false,
352
+ skipPrompt: true,
353
+ },
354
+ {
355
+ type: 'text',
356
+ name: 'periodCredits',
357
+ message: 'periodCredits',
358
+ required: false,
359
+ skipPrompt: true,
360
+ },
301
361
  {
302
362
  type: 'text',
303
363
  name: 'entityId',
@@ -321,6 +381,9 @@ async function handleUpdate(argv, prompter) {
321
381
  softMax: cleanedData.softMax,
322
382
  windowStart: cleanedData.windowStart,
323
383
  windowDuration: cleanedData.windowDuration,
384
+ planMax: cleanedData.planMax,
385
+ purchasedCredits: cleanedData.purchasedCredits,
386
+ periodCredits: cleanedData.periodCredits,
324
387
  entityId: cleanedData.entityId,
325
388
  },
326
389
  select: {
@@ -332,6 +395,9 @@ async function handleUpdate(argv, prompter) {
332
395
  softMax: true,
333
396
  windowStart: true,
334
397
  windowDuration: true,
398
+ planMax: true,
399
+ purchasedCredits: true,
400
+ periodCredits: true,
335
401
  entityId: true,
336
402
  },
337
403
  })
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI commands for Partition
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;