@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,626 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * CLI commands for BillingProviderModule
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
+ schemaId: 'uuid',
15
+ privateSchemaId: 'uuid',
16
+ provider: 'string',
17
+ productsTableId: 'uuid',
18
+ pricesTableId: 'uuid',
19
+ subscriptionsTableId: 'uuid',
20
+ billingCustomersTableId: 'uuid',
21
+ billingCustomersTableName: 'string',
22
+ billingProductsTableId: 'uuid',
23
+ billingProductsTableName: 'string',
24
+ billingPricesTableId: 'uuid',
25
+ billingPricesTableName: 'string',
26
+ billingSubscriptionsTableId: 'uuid',
27
+ billingSubscriptionsTableName: 'string',
28
+ billingWebhookEventsTableId: 'uuid',
29
+ billingWebhookEventsTableName: 'string',
30
+ processBillingEventFunction: 'string',
31
+ prefix: 'string',
32
+ };
33
+ const usage = '\nbilling-provider-module <command>\n\nCommands:\n list List billingProviderModule records\n find-first Find first matching billingProviderModule record\n get Get a billingProviderModule by ID\n create Create a new billingProviderModule\n update Update an existing billingProviderModule\n delete Delete a billingProviderModule\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';
34
+ exports.default = async (argv, prompter, _options) => {
35
+ if (argv.help || argv.h) {
36
+ console.log(usage);
37
+ process.exit(0);
38
+ }
39
+ const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
40
+ if (!subcommand) {
41
+ const answer = await prompter.prompt(argv, [
42
+ {
43
+ type: 'autocomplete',
44
+ name: 'subcommand',
45
+ message: 'What do you want to do?',
46
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
47
+ },
48
+ ]);
49
+ return handleTableSubcommand(answer.subcommand, newArgv, prompter);
50
+ }
51
+ return handleTableSubcommand(subcommand, newArgv, prompter);
52
+ };
53
+ async function handleTableSubcommand(subcommand, argv, prompter) {
54
+ switch (subcommand) {
55
+ case 'list':
56
+ return handleList(argv, prompter);
57
+ case 'find-first':
58
+ return handleFindFirst(argv, prompter);
59
+ case 'get':
60
+ return handleGet(argv, prompter);
61
+ case 'create':
62
+ return handleCreate(argv, prompter);
63
+ case 'update':
64
+ return handleUpdate(argv, prompter);
65
+ case 'delete':
66
+ return handleDelete(argv, prompter);
67
+ default:
68
+ console.log(usage);
69
+ process.exit(1);
70
+ }
71
+ }
72
+ async function handleList(argv, _prompter) {
73
+ try {
74
+ const defaultSelect = {
75
+ id: true,
76
+ databaseId: true,
77
+ schemaId: true,
78
+ privateSchemaId: true,
79
+ provider: true,
80
+ productsTableId: true,
81
+ pricesTableId: true,
82
+ subscriptionsTableId: true,
83
+ billingCustomersTableId: true,
84
+ billingCustomersTableName: true,
85
+ billingProductsTableId: true,
86
+ billingProductsTableName: true,
87
+ billingPricesTableId: true,
88
+ billingPricesTableName: true,
89
+ billingSubscriptionsTableId: true,
90
+ billingSubscriptionsTableName: true,
91
+ billingWebhookEventsTableId: true,
92
+ billingWebhookEventsTableName: true,
93
+ processBillingEventFunction: true,
94
+ prefix: true,
95
+ };
96
+ const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
97
+ const client = (0, executor_1.getClient)();
98
+ const result = await client.billingProviderModule.findMany(findManyArgs).execute();
99
+ console.log(JSON.stringify(result, null, 2));
100
+ }
101
+ catch (error) {
102
+ console.error('Failed to list records.');
103
+ if (error instanceof Error) {
104
+ console.error(error.message);
105
+ }
106
+ process.exit(1);
107
+ }
108
+ }
109
+ async function handleFindFirst(argv, _prompter) {
110
+ try {
111
+ const defaultSelect = {
112
+ id: true,
113
+ databaseId: true,
114
+ schemaId: true,
115
+ privateSchemaId: true,
116
+ provider: true,
117
+ productsTableId: true,
118
+ pricesTableId: true,
119
+ subscriptionsTableId: true,
120
+ billingCustomersTableId: true,
121
+ billingCustomersTableName: true,
122
+ billingProductsTableId: true,
123
+ billingProductsTableName: true,
124
+ billingPricesTableId: true,
125
+ billingPricesTableName: true,
126
+ billingSubscriptionsTableId: true,
127
+ billingSubscriptionsTableName: true,
128
+ billingWebhookEventsTableId: true,
129
+ billingWebhookEventsTableName: true,
130
+ processBillingEventFunction: true,
131
+ prefix: true,
132
+ };
133
+ const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
134
+ const client = (0, executor_1.getClient)();
135
+ const result = await client.billingProviderModule.findFirst(findFirstArgs).execute();
136
+ console.log(JSON.stringify(result, null, 2));
137
+ }
138
+ catch (error) {
139
+ console.error('Failed to find record.');
140
+ if (error instanceof Error) {
141
+ console.error(error.message);
142
+ }
143
+ process.exit(1);
144
+ }
145
+ }
146
+ async function handleGet(argv, prompter) {
147
+ try {
148
+ const answers = await prompter.prompt(argv, [
149
+ {
150
+ type: 'text',
151
+ name: 'id',
152
+ message: 'id',
153
+ required: true,
154
+ },
155
+ ]);
156
+ const client = (0, executor_1.getClient)();
157
+ const result = await client.billingProviderModule
158
+ .findOne({
159
+ id: answers.id,
160
+ select: {
161
+ id: true,
162
+ databaseId: true,
163
+ schemaId: true,
164
+ privateSchemaId: true,
165
+ provider: true,
166
+ productsTableId: true,
167
+ pricesTableId: true,
168
+ subscriptionsTableId: true,
169
+ billingCustomersTableId: true,
170
+ billingCustomersTableName: true,
171
+ billingProductsTableId: true,
172
+ billingProductsTableName: true,
173
+ billingPricesTableId: true,
174
+ billingPricesTableName: true,
175
+ billingSubscriptionsTableId: true,
176
+ billingSubscriptionsTableName: true,
177
+ billingWebhookEventsTableId: true,
178
+ billingWebhookEventsTableName: true,
179
+ processBillingEventFunction: true,
180
+ prefix: true,
181
+ },
182
+ })
183
+ .execute();
184
+ console.log(JSON.stringify(result, null, 2));
185
+ }
186
+ catch (error) {
187
+ console.error('Record not found.');
188
+ if (error instanceof Error) {
189
+ console.error(error.message);
190
+ }
191
+ process.exit(1);
192
+ }
193
+ }
194
+ async function handleCreate(argv, prompter) {
195
+ try {
196
+ const rawAnswers = await prompter.prompt(argv, [
197
+ {
198
+ type: 'text',
199
+ name: 'databaseId',
200
+ message: 'databaseId',
201
+ required: true,
202
+ },
203
+ {
204
+ type: 'text',
205
+ name: 'schemaId',
206
+ message: 'schemaId',
207
+ required: false,
208
+ skipPrompt: true,
209
+ },
210
+ {
211
+ type: 'text',
212
+ name: 'privateSchemaId',
213
+ message: 'privateSchemaId',
214
+ required: false,
215
+ skipPrompt: true,
216
+ },
217
+ {
218
+ type: 'text',
219
+ name: 'provider',
220
+ message: 'provider',
221
+ required: false,
222
+ skipPrompt: true,
223
+ },
224
+ {
225
+ type: 'text',
226
+ name: 'productsTableId',
227
+ message: 'productsTableId',
228
+ required: false,
229
+ skipPrompt: true,
230
+ },
231
+ {
232
+ type: 'text',
233
+ name: 'pricesTableId',
234
+ message: 'pricesTableId',
235
+ required: false,
236
+ skipPrompt: true,
237
+ },
238
+ {
239
+ type: 'text',
240
+ name: 'subscriptionsTableId',
241
+ message: 'subscriptionsTableId',
242
+ required: false,
243
+ skipPrompt: true,
244
+ },
245
+ {
246
+ type: 'text',
247
+ name: 'billingCustomersTableId',
248
+ message: 'billingCustomersTableId',
249
+ required: false,
250
+ skipPrompt: true,
251
+ },
252
+ {
253
+ type: 'text',
254
+ name: 'billingCustomersTableName',
255
+ message: 'billingCustomersTableName',
256
+ required: false,
257
+ skipPrompt: true,
258
+ },
259
+ {
260
+ type: 'text',
261
+ name: 'billingProductsTableId',
262
+ message: 'billingProductsTableId',
263
+ required: false,
264
+ skipPrompt: true,
265
+ },
266
+ {
267
+ type: 'text',
268
+ name: 'billingProductsTableName',
269
+ message: 'billingProductsTableName',
270
+ required: false,
271
+ skipPrompt: true,
272
+ },
273
+ {
274
+ type: 'text',
275
+ name: 'billingPricesTableId',
276
+ message: 'billingPricesTableId',
277
+ required: false,
278
+ skipPrompt: true,
279
+ },
280
+ {
281
+ type: 'text',
282
+ name: 'billingPricesTableName',
283
+ message: 'billingPricesTableName',
284
+ required: false,
285
+ skipPrompt: true,
286
+ },
287
+ {
288
+ type: 'text',
289
+ name: 'billingSubscriptionsTableId',
290
+ message: 'billingSubscriptionsTableId',
291
+ required: false,
292
+ skipPrompt: true,
293
+ },
294
+ {
295
+ type: 'text',
296
+ name: 'billingSubscriptionsTableName',
297
+ message: 'billingSubscriptionsTableName',
298
+ required: false,
299
+ skipPrompt: true,
300
+ },
301
+ {
302
+ type: 'text',
303
+ name: 'billingWebhookEventsTableId',
304
+ message: 'billingWebhookEventsTableId',
305
+ required: false,
306
+ skipPrompt: true,
307
+ },
308
+ {
309
+ type: 'text',
310
+ name: 'billingWebhookEventsTableName',
311
+ message: 'billingWebhookEventsTableName',
312
+ required: false,
313
+ skipPrompt: true,
314
+ },
315
+ {
316
+ type: 'text',
317
+ name: 'processBillingEventFunction',
318
+ message: 'processBillingEventFunction',
319
+ required: false,
320
+ skipPrompt: true,
321
+ },
322
+ {
323
+ type: 'text',
324
+ name: 'prefix',
325
+ message: 'prefix',
326
+ required: false,
327
+ skipPrompt: true,
328
+ },
329
+ ]);
330
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
331
+ const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
332
+ const client = (0, executor_1.getClient)();
333
+ const result = await client.billingProviderModule
334
+ .create({
335
+ data: {
336
+ databaseId: cleanedData.databaseId,
337
+ schemaId: cleanedData.schemaId,
338
+ privateSchemaId: cleanedData.privateSchemaId,
339
+ provider: cleanedData.provider,
340
+ productsTableId: cleanedData.productsTableId,
341
+ pricesTableId: cleanedData.pricesTableId,
342
+ subscriptionsTableId: cleanedData.subscriptionsTableId,
343
+ billingCustomersTableId: cleanedData.billingCustomersTableId,
344
+ billingCustomersTableName: cleanedData.billingCustomersTableName,
345
+ billingProductsTableId: cleanedData.billingProductsTableId,
346
+ billingProductsTableName: cleanedData.billingProductsTableName,
347
+ billingPricesTableId: cleanedData.billingPricesTableId,
348
+ billingPricesTableName: cleanedData.billingPricesTableName,
349
+ billingSubscriptionsTableId: cleanedData.billingSubscriptionsTableId,
350
+ billingSubscriptionsTableName: cleanedData.billingSubscriptionsTableName,
351
+ billingWebhookEventsTableId: cleanedData.billingWebhookEventsTableId,
352
+ billingWebhookEventsTableName: cleanedData.billingWebhookEventsTableName,
353
+ processBillingEventFunction: cleanedData.processBillingEventFunction,
354
+ prefix: cleanedData.prefix,
355
+ },
356
+ select: {
357
+ id: true,
358
+ databaseId: true,
359
+ schemaId: true,
360
+ privateSchemaId: true,
361
+ provider: true,
362
+ productsTableId: true,
363
+ pricesTableId: true,
364
+ subscriptionsTableId: true,
365
+ billingCustomersTableId: true,
366
+ billingCustomersTableName: true,
367
+ billingProductsTableId: true,
368
+ billingProductsTableName: true,
369
+ billingPricesTableId: true,
370
+ billingPricesTableName: true,
371
+ billingSubscriptionsTableId: true,
372
+ billingSubscriptionsTableName: true,
373
+ billingWebhookEventsTableId: true,
374
+ billingWebhookEventsTableName: true,
375
+ processBillingEventFunction: true,
376
+ prefix: true,
377
+ },
378
+ })
379
+ .execute();
380
+ console.log(JSON.stringify(result, null, 2));
381
+ }
382
+ catch (error) {
383
+ console.error('Failed to create record.');
384
+ if (error instanceof Error) {
385
+ console.error(error.message);
386
+ }
387
+ process.exit(1);
388
+ }
389
+ }
390
+ async function handleUpdate(argv, prompter) {
391
+ try {
392
+ const rawAnswers = await prompter.prompt(argv, [
393
+ {
394
+ type: 'text',
395
+ name: 'id',
396
+ message: 'id',
397
+ required: true,
398
+ },
399
+ {
400
+ type: 'text',
401
+ name: 'databaseId',
402
+ message: 'databaseId',
403
+ required: false,
404
+ },
405
+ {
406
+ type: 'text',
407
+ name: 'schemaId',
408
+ message: 'schemaId',
409
+ required: false,
410
+ skipPrompt: true,
411
+ },
412
+ {
413
+ type: 'text',
414
+ name: 'privateSchemaId',
415
+ message: 'privateSchemaId',
416
+ required: false,
417
+ skipPrompt: true,
418
+ },
419
+ {
420
+ type: 'text',
421
+ name: 'provider',
422
+ message: 'provider',
423
+ required: false,
424
+ skipPrompt: true,
425
+ },
426
+ {
427
+ type: 'text',
428
+ name: 'productsTableId',
429
+ message: 'productsTableId',
430
+ required: false,
431
+ skipPrompt: true,
432
+ },
433
+ {
434
+ type: 'text',
435
+ name: 'pricesTableId',
436
+ message: 'pricesTableId',
437
+ required: false,
438
+ skipPrompt: true,
439
+ },
440
+ {
441
+ type: 'text',
442
+ name: 'subscriptionsTableId',
443
+ message: 'subscriptionsTableId',
444
+ required: false,
445
+ skipPrompt: true,
446
+ },
447
+ {
448
+ type: 'text',
449
+ name: 'billingCustomersTableId',
450
+ message: 'billingCustomersTableId',
451
+ required: false,
452
+ skipPrompt: true,
453
+ },
454
+ {
455
+ type: 'text',
456
+ name: 'billingCustomersTableName',
457
+ message: 'billingCustomersTableName',
458
+ required: false,
459
+ skipPrompt: true,
460
+ },
461
+ {
462
+ type: 'text',
463
+ name: 'billingProductsTableId',
464
+ message: 'billingProductsTableId',
465
+ required: false,
466
+ skipPrompt: true,
467
+ },
468
+ {
469
+ type: 'text',
470
+ name: 'billingProductsTableName',
471
+ message: 'billingProductsTableName',
472
+ required: false,
473
+ skipPrompt: true,
474
+ },
475
+ {
476
+ type: 'text',
477
+ name: 'billingPricesTableId',
478
+ message: 'billingPricesTableId',
479
+ required: false,
480
+ skipPrompt: true,
481
+ },
482
+ {
483
+ type: 'text',
484
+ name: 'billingPricesTableName',
485
+ message: 'billingPricesTableName',
486
+ required: false,
487
+ skipPrompt: true,
488
+ },
489
+ {
490
+ type: 'text',
491
+ name: 'billingSubscriptionsTableId',
492
+ message: 'billingSubscriptionsTableId',
493
+ required: false,
494
+ skipPrompt: true,
495
+ },
496
+ {
497
+ type: 'text',
498
+ name: 'billingSubscriptionsTableName',
499
+ message: 'billingSubscriptionsTableName',
500
+ required: false,
501
+ skipPrompt: true,
502
+ },
503
+ {
504
+ type: 'text',
505
+ name: 'billingWebhookEventsTableId',
506
+ message: 'billingWebhookEventsTableId',
507
+ required: false,
508
+ skipPrompt: true,
509
+ },
510
+ {
511
+ type: 'text',
512
+ name: 'billingWebhookEventsTableName',
513
+ message: 'billingWebhookEventsTableName',
514
+ required: false,
515
+ skipPrompt: true,
516
+ },
517
+ {
518
+ type: 'text',
519
+ name: 'processBillingEventFunction',
520
+ message: 'processBillingEventFunction',
521
+ required: false,
522
+ skipPrompt: true,
523
+ },
524
+ {
525
+ type: 'text',
526
+ name: 'prefix',
527
+ message: 'prefix',
528
+ required: false,
529
+ skipPrompt: true,
530
+ },
531
+ ]);
532
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
533
+ const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
534
+ const client = (0, executor_1.getClient)();
535
+ const result = await client.billingProviderModule
536
+ .update({
537
+ where: {
538
+ id: answers.id,
539
+ },
540
+ data: {
541
+ databaseId: cleanedData.databaseId,
542
+ schemaId: cleanedData.schemaId,
543
+ privateSchemaId: cleanedData.privateSchemaId,
544
+ provider: cleanedData.provider,
545
+ productsTableId: cleanedData.productsTableId,
546
+ pricesTableId: cleanedData.pricesTableId,
547
+ subscriptionsTableId: cleanedData.subscriptionsTableId,
548
+ billingCustomersTableId: cleanedData.billingCustomersTableId,
549
+ billingCustomersTableName: cleanedData.billingCustomersTableName,
550
+ billingProductsTableId: cleanedData.billingProductsTableId,
551
+ billingProductsTableName: cleanedData.billingProductsTableName,
552
+ billingPricesTableId: cleanedData.billingPricesTableId,
553
+ billingPricesTableName: cleanedData.billingPricesTableName,
554
+ billingSubscriptionsTableId: cleanedData.billingSubscriptionsTableId,
555
+ billingSubscriptionsTableName: cleanedData.billingSubscriptionsTableName,
556
+ billingWebhookEventsTableId: cleanedData.billingWebhookEventsTableId,
557
+ billingWebhookEventsTableName: cleanedData.billingWebhookEventsTableName,
558
+ processBillingEventFunction: cleanedData.processBillingEventFunction,
559
+ prefix: cleanedData.prefix,
560
+ },
561
+ select: {
562
+ id: true,
563
+ databaseId: true,
564
+ schemaId: true,
565
+ privateSchemaId: true,
566
+ provider: true,
567
+ productsTableId: true,
568
+ pricesTableId: true,
569
+ subscriptionsTableId: true,
570
+ billingCustomersTableId: true,
571
+ billingCustomersTableName: true,
572
+ billingProductsTableId: true,
573
+ billingProductsTableName: true,
574
+ billingPricesTableId: true,
575
+ billingPricesTableName: true,
576
+ billingSubscriptionsTableId: true,
577
+ billingSubscriptionsTableName: true,
578
+ billingWebhookEventsTableId: true,
579
+ billingWebhookEventsTableName: true,
580
+ processBillingEventFunction: true,
581
+ prefix: true,
582
+ },
583
+ })
584
+ .execute();
585
+ console.log(JSON.stringify(result, null, 2));
586
+ }
587
+ catch (error) {
588
+ console.error('Failed to update record.');
589
+ if (error instanceof Error) {
590
+ console.error(error.message);
591
+ }
592
+ process.exit(1);
593
+ }
594
+ }
595
+ async function handleDelete(argv, prompter) {
596
+ try {
597
+ const rawAnswers = await prompter.prompt(argv, [
598
+ {
599
+ type: 'text',
600
+ name: 'id',
601
+ message: 'id',
602
+ required: true,
603
+ },
604
+ ]);
605
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
606
+ const client = (0, executor_1.getClient)();
607
+ const result = await client.billingProviderModule
608
+ .delete({
609
+ where: {
610
+ id: answers.id,
611
+ },
612
+ select: {
613
+ id: true,
614
+ },
615
+ })
616
+ .execute();
617
+ console.log(JSON.stringify(result, null, 2));
618
+ }
619
+ catch (error) {
620
+ console.error('Failed to delete record.');
621
+ if (error instanceof Error) {
622
+ console.error(error.message);
623
+ }
624
+ process.exit(1);
625
+ }
626
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI commands for CorsSetting
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;