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