@constructive-sdk/cli 0.20.3 → 0.20.5

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