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