@constructive-sdk/cli 0.12.7 → 0.12.8

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 (333) hide show
  1. package/admin/cli/commands/app-achievement.js +38 -15
  2. package/admin/cli/commands/app-admin-grant.js +38 -15
  3. package/admin/cli/commands/app-grant.js +40 -16
  4. package/admin/cli/commands/app-level-requirement.js +42 -17
  5. package/admin/cli/commands/app-level.js +40 -16
  6. package/admin/cli/commands/app-limit-default.js +32 -12
  7. package/admin/cli/commands/app-limit.js +36 -14
  8. package/admin/cli/commands/app-membership-default.js +40 -16
  9. package/admin/cli/commands/app-membership.js +58 -25
  10. package/admin/cli/commands/app-owner-grant.js +38 -15
  11. package/admin/cli/commands/app-permission-default.js +30 -11
  12. package/admin/cli/commands/app-permission.js +36 -14
  13. package/admin/cli/commands/app-step.js +38 -15
  14. package/admin/cli/commands/claimed-invite.js +38 -15
  15. package/admin/cli/commands/invite.js +50 -21
  16. package/admin/cli/commands/membership-type.js +34 -13
  17. package/admin/cli/commands/org-admin-grant.js +40 -16
  18. package/admin/cli/commands/org-chart-edge-grant.js +44 -18
  19. package/admin/cli/commands/org-chart-edge.js +42 -17
  20. package/admin/cli/commands/org-claimed-invite.js +40 -16
  21. package/admin/cli/commands/org-get-managers-record.js +30 -11
  22. package/admin/cli/commands/org-get-subordinates-record.js +30 -11
  23. package/admin/cli/commands/org-grant.js +42 -17
  24. package/admin/cli/commands/org-invite.js +54 -23
  25. package/admin/cli/commands/org-limit-default.js +32 -12
  26. package/admin/cli/commands/org-limit.js +38 -15
  27. package/admin/cli/commands/org-member.js +34 -13
  28. package/admin/cli/commands/org-membership-default.js +44 -18
  29. package/admin/cli/commands/org-membership.js +58 -25
  30. package/admin/cli/commands/org-owner-grant.js +40 -16
  31. package/admin/cli/commands/org-permission-default.js +32 -12
  32. package/admin/cli/commands/org-permission.js +36 -14
  33. package/admin/cli/utils.d.ts +38 -0
  34. package/admin/cli/utils.js +96 -0
  35. package/auth/cli/commands/audit-log.js +42 -17
  36. package/auth/cli/commands/connected-account.js +42 -17
  37. package/auth/cli/commands/crypto-address.js +40 -16
  38. package/auth/cli/commands/email.js +40 -16
  39. package/auth/cli/commands/phone-number.js +42 -17
  40. package/auth/cli/commands/role-type.js +30 -11
  41. package/auth/cli/commands/user.js +80 -16
  42. package/auth/cli/utils.d.ts +38 -0
  43. package/auth/cli/utils.js +96 -0
  44. package/esm/admin/cli/commands/app-achievement.js +39 -16
  45. package/esm/admin/cli/commands/app-admin-grant.js +39 -16
  46. package/esm/admin/cli/commands/app-grant.js +41 -17
  47. package/esm/admin/cli/commands/app-level-requirement.js +43 -18
  48. package/esm/admin/cli/commands/app-level.js +41 -17
  49. package/esm/admin/cli/commands/app-limit-default.js +33 -13
  50. package/esm/admin/cli/commands/app-limit.js +37 -15
  51. package/esm/admin/cli/commands/app-membership-default.js +41 -17
  52. package/esm/admin/cli/commands/app-membership.js +59 -26
  53. package/esm/admin/cli/commands/app-owner-grant.js +39 -16
  54. package/esm/admin/cli/commands/app-permission-default.js +31 -12
  55. package/esm/admin/cli/commands/app-permission.js +37 -15
  56. package/esm/admin/cli/commands/app-step.js +39 -16
  57. package/esm/admin/cli/commands/claimed-invite.js +39 -16
  58. package/esm/admin/cli/commands/invite.js +51 -22
  59. package/esm/admin/cli/commands/membership-type.js +35 -14
  60. package/esm/admin/cli/commands/org-admin-grant.js +41 -17
  61. package/esm/admin/cli/commands/org-chart-edge-grant.js +45 -19
  62. package/esm/admin/cli/commands/org-chart-edge.js +43 -18
  63. package/esm/admin/cli/commands/org-claimed-invite.js +41 -17
  64. package/esm/admin/cli/commands/org-get-managers-record.js +31 -12
  65. package/esm/admin/cli/commands/org-get-subordinates-record.js +31 -12
  66. package/esm/admin/cli/commands/org-grant.js +43 -18
  67. package/esm/admin/cli/commands/org-invite.js +55 -24
  68. package/esm/admin/cli/commands/org-limit-default.js +33 -13
  69. package/esm/admin/cli/commands/org-limit.js +39 -16
  70. package/esm/admin/cli/commands/org-member.js +35 -14
  71. package/esm/admin/cli/commands/org-membership-default.js +45 -19
  72. package/esm/admin/cli/commands/org-membership.js +59 -26
  73. package/esm/admin/cli/commands/org-owner-grant.js +41 -17
  74. package/esm/admin/cli/commands/org-permission-default.js +33 -13
  75. package/esm/admin/cli/commands/org-permission.js +37 -15
  76. package/esm/admin/cli/utils.d.ts +38 -0
  77. package/esm/admin/cli/utils.js +90 -0
  78. package/esm/auth/cli/commands/audit-log.js +43 -18
  79. package/esm/auth/cli/commands/connected-account.js +43 -18
  80. package/esm/auth/cli/commands/crypto-address.js +41 -17
  81. package/esm/auth/cli/commands/email.js +41 -17
  82. package/esm/auth/cli/commands/phone-number.js +43 -18
  83. package/esm/auth/cli/commands/role-type.js +31 -12
  84. package/esm/auth/cli/commands/user.js +81 -17
  85. package/esm/auth/cli/utils.d.ts +38 -0
  86. package/esm/auth/cli/utils.js +90 -0
  87. package/esm/objects/cli/commands/commit.js +45 -19
  88. package/esm/objects/cli/commands/get-all-record.js +31 -12
  89. package/esm/objects/cli/commands/object.js +41 -17
  90. package/esm/objects/cli/commands/ref.js +37 -15
  91. package/esm/objects/cli/commands/store.js +37 -15
  92. package/esm/objects/cli/utils.d.ts +38 -0
  93. package/esm/objects/cli/utils.js +90 -0
  94. package/esm/public/cli/commands/api-module.js +37 -15
  95. package/esm/public/cli/commands/api-schema.js +35 -14
  96. package/esm/public/cli/commands/api.js +41 -17
  97. package/esm/public/cli/commands/app-achievement.js +39 -16
  98. package/esm/public/cli/commands/app-admin-grant.js +39 -16
  99. package/esm/public/cli/commands/app-grant.js +41 -17
  100. package/esm/public/cli/commands/app-level-requirement.js +43 -18
  101. package/esm/public/cli/commands/app-level.js +41 -17
  102. package/esm/public/cli/commands/app-limit-default.js +33 -13
  103. package/esm/public/cli/commands/app-limit.js +37 -15
  104. package/esm/public/cli/commands/app-membership-default.js +41 -17
  105. package/esm/public/cli/commands/app-membership.js +59 -26
  106. package/esm/public/cli/commands/app-owner-grant.js +39 -16
  107. package/esm/public/cli/commands/app-permission-default.js +31 -12
  108. package/esm/public/cli/commands/app-permission.js +37 -15
  109. package/esm/public/cli/commands/app-step.js +39 -16
  110. package/esm/public/cli/commands/app.js +45 -19
  111. package/esm/public/cli/commands/ast-migration.js +53 -23
  112. package/esm/public/cli/commands/audit-log.js +43 -18
  113. package/esm/public/cli/commands/blueprint-template.js +67 -30
  114. package/esm/public/cli/commands/blueprint.js +61 -27
  115. package/esm/public/cli/commands/check-constraint.js +55 -24
  116. package/esm/public/cli/commands/claimed-invite.js +39 -16
  117. package/esm/public/cli/commands/commit.js +45 -19
  118. package/esm/public/cli/commands/connected-account.js +43 -18
  119. package/esm/public/cli/commands/connected-accounts-module.js +41 -17
  120. package/esm/public/cli/commands/crypto-address.js +41 -17
  121. package/esm/public/cli/commands/crypto-addresses-module.js +43 -18
  122. package/esm/public/cli/commands/crypto-auth-module.js +55 -24
  123. package/esm/public/cli/commands/database-provision-module.js +55 -24
  124. package/esm/public/cli/commands/database-transfer.js +55 -24
  125. package/esm/public/cli/commands/database.js +43 -18
  126. package/esm/public/cli/commands/default-ids-module.js +31 -12
  127. package/esm/public/cli/commands/default-privilege.js +41 -17
  128. package/esm/public/cli/commands/denormalized-table-field.js +51 -22
  129. package/esm/public/cli/commands/domain.js +39 -16
  130. package/esm/public/cli/commands/email.js +41 -17
  131. package/esm/public/cli/commands/emails-module.js +41 -17
  132. package/esm/public/cli/commands/embedding-chunk.js +63 -28
  133. package/esm/public/cli/commands/encrypted-secrets-module.js +37 -15
  134. package/esm/public/cli/commands/enum.js +51 -22
  135. package/esm/public/cli/commands/field.js +75 -34
  136. package/esm/public/cli/commands/foreign-key-constraint.js +63 -28
  137. package/esm/public/cli/commands/full-text-search.js +45 -19
  138. package/esm/public/cli/commands/get-all-record.js +31 -12
  139. package/esm/public/cli/commands/hierarchy-module.js +67 -30
  140. package/esm/public/cli/commands/index.js +65 -29
  141. package/esm/public/cli/commands/invite.js +51 -22
  142. package/esm/public/cli/commands/invites-module.js +55 -24
  143. package/esm/public/cli/commands/levels-module.js +79 -36
  144. package/esm/public/cli/commands/limits-module.js +63 -28
  145. package/esm/public/cli/commands/membership-type.js +35 -14
  146. package/esm/public/cli/commands/membership-types-module.js +37 -15
  147. package/esm/public/cli/commands/memberships-module.js +89 -41
  148. package/esm/public/cli/commands/migrate-file.js +33 -13
  149. package/esm/public/cli/commands/node-type-registry.js +89 -19
  150. package/esm/public/cli/commands/object.js +41 -17
  151. package/esm/public/cli/commands/org-admin-grant.js +41 -17
  152. package/esm/public/cli/commands/org-chart-edge-grant.js +45 -19
  153. package/esm/public/cli/commands/org-chart-edge.js +43 -18
  154. package/esm/public/cli/commands/org-claimed-invite.js +41 -17
  155. package/esm/public/cli/commands/org-get-managers-record.js +31 -12
  156. package/esm/public/cli/commands/org-get-subordinates-record.js +31 -12
  157. package/esm/public/cli/commands/org-grant.js +43 -18
  158. package/esm/public/cli/commands/org-invite.js +55 -24
  159. package/esm/public/cli/commands/org-limit-default.js +33 -13
  160. package/esm/public/cli/commands/org-limit.js +39 -16
  161. package/esm/public/cli/commands/org-member.js +35 -14
  162. package/esm/public/cli/commands/org-membership-default.js +45 -19
  163. package/esm/public/cli/commands/org-membership.js +59 -26
  164. package/esm/public/cli/commands/org-owner-grant.js +41 -17
  165. package/esm/public/cli/commands/org-permission-default.js +33 -13
  166. package/esm/public/cli/commands/org-permission.js +37 -15
  167. package/esm/public/cli/commands/permissions-module.js +61 -27
  168. package/esm/public/cli/commands/phone-number.js +43 -18
  169. package/esm/public/cli/commands/phone-numbers-module.js +41 -17
  170. package/esm/public/cli/commands/policy.js +61 -27
  171. package/esm/public/cli/commands/primary-key-constraint.js +53 -23
  172. package/esm/public/cli/commands/profiles-module.js +63 -28
  173. package/esm/public/cli/commands/ref.js +37 -15
  174. package/esm/public/cli/commands/relation-provision.js +89 -41
  175. package/esm/public/cli/commands/rls-module.js +49 -21
  176. package/esm/public/cli/commands/role-type.js +31 -12
  177. package/esm/public/cli/commands/schema-grant.js +39 -16
  178. package/esm/public/cli/commands/schema.js +55 -24
  179. package/esm/public/cli/commands/secrets-module.js +37 -15
  180. package/esm/public/cli/commands/secure-table-provision.js +63 -28
  181. package/esm/public/cli/commands/sessions-module.js +49 -21
  182. package/esm/public/cli/commands/site-metadatum.js +39 -16
  183. package/esm/public/cli/commands/site-module.js +37 -15
  184. package/esm/public/cli/commands/site-theme.js +35 -14
  185. package/esm/public/cli/commands/site.js +45 -19
  186. package/esm/public/cli/commands/sql-action.js +53 -23
  187. package/esm/public/cli/commands/store.js +37 -15
  188. package/esm/public/cli/commands/table-grant.js +45 -19
  189. package/esm/public/cli/commands/table-template-module.js +45 -19
  190. package/esm/public/cli/commands/table.js +65 -29
  191. package/esm/public/cli/commands/trigger-function.js +39 -16
  192. package/esm/public/cli/commands/trigger.js +53 -23
  193. package/esm/public/cli/commands/unique-constraint.js +55 -24
  194. package/esm/public/cli/commands/user-auth-module.js +79 -36
  195. package/esm/public/cli/commands/user.js +81 -17
  196. package/esm/public/cli/commands/users-module.js +41 -17
  197. package/esm/public/cli/commands/view-grant.js +41 -17
  198. package/esm/public/cli/commands/view-rule.js +39 -16
  199. package/esm/public/cli/commands/view-table.js +35 -14
  200. package/esm/public/cli/commands/view.js +59 -26
  201. package/esm/public/cli/commands.js +3 -3
  202. package/esm/public/cli/executor.d.ts +1 -1
  203. package/esm/public/cli/utils.d.ts +38 -0
  204. package/esm/public/cli/utils.js +90 -0
  205. package/esm/public/orm/index.d.ts +2 -2
  206. package/esm/public/orm/index.js +2 -2
  207. package/esm/public/orm/input-types.d.ts +161 -147
  208. package/esm/public/orm/models/index.d.ts +1 -1
  209. package/esm/public/orm/models/index.js +1 -1
  210. package/objects/cli/commands/commit.js +44 -18
  211. package/objects/cli/commands/get-all-record.js +30 -11
  212. package/objects/cli/commands/object.js +40 -16
  213. package/objects/cli/commands/ref.js +36 -14
  214. package/objects/cli/commands/store.js +36 -14
  215. package/objects/cli/utils.d.ts +38 -0
  216. package/objects/cli/utils.js +96 -0
  217. package/package.json +3 -3
  218. package/public/cli/commands/api-module.js +36 -14
  219. package/public/cli/commands/api-schema.js +34 -13
  220. package/public/cli/commands/api.js +40 -16
  221. package/public/cli/commands/app-achievement.js +38 -15
  222. package/public/cli/commands/app-admin-grant.js +38 -15
  223. package/public/cli/commands/app-grant.js +40 -16
  224. package/public/cli/commands/app-level-requirement.js +42 -17
  225. package/public/cli/commands/app-level.js +40 -16
  226. package/public/cli/commands/app-limit-default.js +32 -12
  227. package/public/cli/commands/app-limit.js +36 -14
  228. package/public/cli/commands/app-membership-default.js +40 -16
  229. package/public/cli/commands/app-membership.js +58 -25
  230. package/public/cli/commands/app-owner-grant.js +38 -15
  231. package/public/cli/commands/app-permission-default.js +30 -11
  232. package/public/cli/commands/app-permission.js +36 -14
  233. package/public/cli/commands/app-step.js +38 -15
  234. package/public/cli/commands/app.js +44 -18
  235. package/public/cli/commands/ast-migration.js +52 -22
  236. package/public/cli/commands/audit-log.js +42 -17
  237. package/public/cli/commands/blueprint-template.js +66 -29
  238. package/public/cli/commands/blueprint.js +60 -26
  239. package/public/cli/commands/check-constraint.js +54 -23
  240. package/public/cli/commands/claimed-invite.js +38 -15
  241. package/public/cli/commands/commit.js +44 -18
  242. package/public/cli/commands/connected-account.js +42 -17
  243. package/public/cli/commands/connected-accounts-module.js +40 -16
  244. package/public/cli/commands/crypto-address.js +40 -16
  245. package/public/cli/commands/crypto-addresses-module.js +42 -17
  246. package/public/cli/commands/crypto-auth-module.js +54 -23
  247. package/public/cli/commands/database-provision-module.js +54 -23
  248. package/public/cli/commands/database-transfer.js +54 -23
  249. package/public/cli/commands/database.js +42 -17
  250. package/public/cli/commands/default-ids-module.js +30 -11
  251. package/public/cli/commands/default-privilege.js +40 -16
  252. package/public/cli/commands/denormalized-table-field.js +50 -21
  253. package/public/cli/commands/domain.js +38 -15
  254. package/public/cli/commands/email.js +40 -16
  255. package/public/cli/commands/emails-module.js +40 -16
  256. package/public/cli/commands/embedding-chunk.js +62 -27
  257. package/public/cli/commands/encrypted-secrets-module.js +36 -14
  258. package/public/cli/commands/enum.js +50 -21
  259. package/public/cli/commands/field.js +74 -33
  260. package/public/cli/commands/foreign-key-constraint.js +62 -27
  261. package/public/cli/commands/full-text-search.js +44 -18
  262. package/public/cli/commands/get-all-record.js +30 -11
  263. package/public/cli/commands/hierarchy-module.js +66 -29
  264. package/public/cli/commands/index.js +64 -28
  265. package/public/cli/commands/invite.js +50 -21
  266. package/public/cli/commands/invites-module.js +54 -23
  267. package/public/cli/commands/levels-module.js +78 -35
  268. package/public/cli/commands/limits-module.js +62 -27
  269. package/public/cli/commands/membership-type.js +34 -13
  270. package/public/cli/commands/membership-types-module.js +36 -14
  271. package/public/cli/commands/memberships-module.js +88 -40
  272. package/public/cli/commands/migrate-file.js +32 -12
  273. package/public/cli/commands/node-type-registry.js +88 -18
  274. package/public/cli/commands/object.js +40 -16
  275. package/public/cli/commands/org-admin-grant.js +40 -16
  276. package/public/cli/commands/org-chart-edge-grant.js +44 -18
  277. package/public/cli/commands/org-chart-edge.js +42 -17
  278. package/public/cli/commands/org-claimed-invite.js +40 -16
  279. package/public/cli/commands/org-get-managers-record.js +30 -11
  280. package/public/cli/commands/org-get-subordinates-record.js +30 -11
  281. package/public/cli/commands/org-grant.js +42 -17
  282. package/public/cli/commands/org-invite.js +54 -23
  283. package/public/cli/commands/org-limit-default.js +32 -12
  284. package/public/cli/commands/org-limit.js +38 -15
  285. package/public/cli/commands/org-member.js +34 -13
  286. package/public/cli/commands/org-membership-default.js +44 -18
  287. package/public/cli/commands/org-membership.js +58 -25
  288. package/public/cli/commands/org-owner-grant.js +40 -16
  289. package/public/cli/commands/org-permission-default.js +32 -12
  290. package/public/cli/commands/org-permission.js +36 -14
  291. package/public/cli/commands/permissions-module.js +60 -26
  292. package/public/cli/commands/phone-number.js +42 -17
  293. package/public/cli/commands/phone-numbers-module.js +40 -16
  294. package/public/cli/commands/policy.js +60 -26
  295. package/public/cli/commands/primary-key-constraint.js +52 -22
  296. package/public/cli/commands/profiles-module.js +62 -27
  297. package/public/cli/commands/ref.js +36 -14
  298. package/public/cli/commands/relation-provision.js +88 -40
  299. package/public/cli/commands/rls-module.js +48 -20
  300. package/public/cli/commands/role-type.js +30 -11
  301. package/public/cli/commands/schema-grant.js +38 -15
  302. package/public/cli/commands/schema.js +54 -23
  303. package/public/cli/commands/secrets-module.js +36 -14
  304. package/public/cli/commands/secure-table-provision.js +62 -27
  305. package/public/cli/commands/sessions-module.js +48 -20
  306. package/public/cli/commands/site-metadatum.js +38 -15
  307. package/public/cli/commands/site-module.js +36 -14
  308. package/public/cli/commands/site-theme.js +34 -13
  309. package/public/cli/commands/site.js +44 -18
  310. package/public/cli/commands/sql-action.js +52 -22
  311. package/public/cli/commands/store.js +36 -14
  312. package/public/cli/commands/table-grant.js +44 -18
  313. package/public/cli/commands/table-template-module.js +44 -18
  314. package/public/cli/commands/table.js +64 -28
  315. package/public/cli/commands/trigger-function.js +38 -15
  316. package/public/cli/commands/trigger.js +52 -22
  317. package/public/cli/commands/unique-constraint.js +54 -23
  318. package/public/cli/commands/user-auth-module.js +78 -35
  319. package/public/cli/commands/user.js +80 -16
  320. package/public/cli/commands/users-module.js +40 -16
  321. package/public/cli/commands/view-grant.js +40 -16
  322. package/public/cli/commands/view-rule.js +38 -15
  323. package/public/cli/commands/view-table.js +34 -13
  324. package/public/cli/commands/view.js +58 -25
  325. package/public/cli/commands.js +3 -3
  326. package/public/cli/executor.d.ts +1 -1
  327. package/public/cli/utils.d.ts +38 -0
  328. package/public/cli/utils.js +96 -0
  329. package/public/orm/index.d.ts +2 -2
  330. package/public/orm/index.js +2 -2
  331. package/public/orm/input-types.d.ts +161 -147
  332. package/public/orm/models/index.d.ts +1 -1
  333. package/public/orm/models/index.js +4 -4
@@ -5,14 +5,14 @@
5
5
  */
6
6
  import { extractFirst } from 'inquirerer';
7
7
  import { getClient } from '../executor';
8
- import { coerceAnswers, stripUndefined } from '../utils';
8
+ import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils';
9
9
  const fieldSchema = {
10
10
  id: 'int',
11
11
  name: 'string',
12
12
  description: 'string',
13
13
  prefix: 'string',
14
14
  };
15
- const usage = '\nmembership-type <command>\n\nCommands:\n list List all membershipType records\n get Get a membershipType by ID\n create Create a new membershipType\n update Update an existing membershipType\n delete Delete a membershipType\n\n --help, -h Show this help message\n';
15
+ const usage = '\nmembership-type <command>\n\nCommands:\n list List membershipType records\n find-first Find first matching membershipType record\n get Get a membershipType by ID\n create Create a new membershipType\n update Update an existing membershipType\n delete Delete a membershipType\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';
16
16
  export default async (argv, prompter, _options) => {
17
17
  if (argv.help || argv.h) {
18
18
  console.log(usage);
@@ -25,7 +25,7 @@ export default async (argv, prompter, _options) => {
25
25
  type: 'autocomplete',
26
26
  name: 'subcommand',
27
27
  message: 'What do you want to do?',
28
- options: ['list', 'get', 'create', 'update', 'delete'],
28
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
29
29
  },
30
30
  ]);
31
31
  return handleTableSubcommand(answer.subcommand, newArgv, prompter);
@@ -36,6 +36,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
36
36
  switch (subcommand) {
37
37
  case 'list':
38
38
  return handleList(argv, prompter);
39
+ case 'find-first':
40
+ return handleFindFirst(argv, prompter);
39
41
  case 'get':
40
42
  return handleGet(argv, prompter);
41
43
  case 'create':
@@ -49,19 +51,17 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
49
51
  process.exit(1);
50
52
  }
51
53
  }
52
- async function handleList(_argv, _prompter) {
54
+ async function handleList(argv, _prompter) {
53
55
  try {
56
+ const defaultSelect = {
57
+ id: true,
58
+ name: true,
59
+ description: true,
60
+ prefix: true,
61
+ };
62
+ const findManyArgs = parseFindManyArgs(argv, defaultSelect);
54
63
  const client = getClient();
55
- const result = await client.membershipType
56
- .findMany({
57
- select: {
58
- id: true,
59
- name: true,
60
- description: true,
61
- prefix: true,
62
- },
63
- })
64
- .execute();
64
+ const result = await client.membershipType.findMany(findManyArgs).execute();
65
65
  console.log(JSON.stringify(result, null, 2));
66
66
  }
67
67
  catch (error) {
@@ -72,6 +72,27 @@ async function handleList(_argv, _prompter) {
72
72
  process.exit(1);
73
73
  }
74
74
  }
75
+ async function handleFindFirst(argv, _prompter) {
76
+ try {
77
+ const defaultSelect = {
78
+ id: true,
79
+ name: true,
80
+ description: true,
81
+ prefix: true,
82
+ };
83
+ const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
84
+ const client = getClient();
85
+ const result = await client.membershipType.findFirst(findFirstArgs).execute();
86
+ console.log(JSON.stringify(result, null, 2));
87
+ }
88
+ catch (error) {
89
+ console.error('Failed to find record.');
90
+ if (error instanceof Error) {
91
+ console.error(error.message);
92
+ }
93
+ process.exit(1);
94
+ }
95
+ }
75
96
  async function handleGet(argv, prompter) {
76
97
  try {
77
98
  const answers = await prompter.prompt(argv, [
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { extractFirst } from 'inquirerer';
7
7
  import { getClient } from '../executor';
8
- import { coerceAnswers, stripUndefined } from '../utils';
8
+ import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils';
9
9
  const fieldSchema = {
10
10
  id: 'uuid',
11
11
  databaseId: 'uuid',
@@ -13,7 +13,7 @@ const fieldSchema = {
13
13
  tableId: 'uuid',
14
14
  tableName: 'string',
15
15
  };
16
- const usage = '\nmembership-types-module <command>\n\nCommands:\n list List all membershipTypesModule records\n get Get a membershipTypesModule by ID\n create Create a new membershipTypesModule\n update Update an existing membershipTypesModule\n delete Delete a membershipTypesModule\n\n --help, -h Show this help message\n';
16
+ const usage = '\nmembership-types-module <command>\n\nCommands:\n list List membershipTypesModule records\n find-first Find first matching membershipTypesModule record\n get Get a membershipTypesModule by ID\n create Create a new membershipTypesModule\n update Update an existing membershipTypesModule\n delete Delete a membershipTypesModule\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n\n --help, -h Show this help message\n';
17
17
  export default async (argv, prompter, _options) => {
18
18
  if (argv.help || argv.h) {
19
19
  console.log(usage);
@@ -26,7 +26,7 @@ export default async (argv, prompter, _options) => {
26
26
  type: 'autocomplete',
27
27
  name: 'subcommand',
28
28
  message: 'What do you want to do?',
29
- options: ['list', 'get', 'create', 'update', 'delete'],
29
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
30
30
  },
31
31
  ]);
32
32
  return handleTableSubcommand(answer.subcommand, newArgv, prompter);
@@ -37,6 +37,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
37
37
  switch (subcommand) {
38
38
  case 'list':
39
39
  return handleList(argv, prompter);
40
+ case 'find-first':
41
+ return handleFindFirst(argv, prompter);
40
42
  case 'get':
41
43
  return handleGet(argv, prompter);
42
44
  case 'create':
@@ -50,20 +52,18 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
50
52
  process.exit(1);
51
53
  }
52
54
  }
53
- async function handleList(_argv, _prompter) {
55
+ async function handleList(argv, _prompter) {
54
56
  try {
57
+ const defaultSelect = {
58
+ id: true,
59
+ databaseId: true,
60
+ schemaId: true,
61
+ tableId: true,
62
+ tableName: true,
63
+ };
64
+ const findManyArgs = parseFindManyArgs(argv, defaultSelect);
55
65
  const client = getClient();
56
- const result = await client.membershipTypesModule
57
- .findMany({
58
- select: {
59
- id: true,
60
- databaseId: true,
61
- schemaId: true,
62
- tableId: true,
63
- tableName: true,
64
- },
65
- })
66
- .execute();
66
+ const result = await client.membershipTypesModule.findMany(findManyArgs).execute();
67
67
  console.log(JSON.stringify(result, null, 2));
68
68
  }
69
69
  catch (error) {
@@ -74,6 +74,28 @@ async function handleList(_argv, _prompter) {
74
74
  process.exit(1);
75
75
  }
76
76
  }
77
+ async function handleFindFirst(argv, _prompter) {
78
+ try {
79
+ const defaultSelect = {
80
+ id: true,
81
+ databaseId: true,
82
+ schemaId: true,
83
+ tableId: true,
84
+ tableName: true,
85
+ };
86
+ const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
87
+ const client = getClient();
88
+ const result = await client.membershipTypesModule.findFirst(findFirstArgs).execute();
89
+ console.log(JSON.stringify(result, null, 2));
90
+ }
91
+ catch (error) {
92
+ console.error('Failed to find record.');
93
+ if (error instanceof Error) {
94
+ console.error(error.message);
95
+ }
96
+ process.exit(1);
97
+ }
98
+ }
77
99
  async function handleGet(argv, prompter) {
78
100
  try {
79
101
  const answers = await prompter.prompt(argv, [
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { extractFirst } from 'inquirerer';
7
7
  import { getClient } from '../executor';
8
- import { coerceAnswers, stripUndefined } from '../utils';
8
+ import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils';
9
9
  const fieldSchema = {
10
10
  id: 'uuid',
11
11
  databaseId: 'uuid',
@@ -39,7 +39,7 @@ const fieldSchema = {
39
39
  entityIdsByPerm: 'string',
40
40
  entityIdsFunction: 'string',
41
41
  };
42
- const usage = '\nmemberships-module <command>\n\nCommands:\n list List all membershipsModule records\n get Get a membershipsModule by ID\n create Create a new membershipsModule\n update Update an existing membershipsModule\n delete Delete a membershipsModule\n\n --help, -h Show this help message\n';
42
+ const usage = '\nmemberships-module <command>\n\nCommands:\n list List membershipsModule records\n find-first Find first matching membershipsModule record\n get Get a membershipsModule by ID\n create Create a new membershipsModule\n update Update an existing membershipsModule\n delete Delete a membershipsModule\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';
43
43
  export default async (argv, prompter, _options) => {
44
44
  if (argv.help || argv.h) {
45
45
  console.log(usage);
@@ -52,7 +52,7 @@ export default async (argv, prompter, _options) => {
52
52
  type: 'autocomplete',
53
53
  name: 'subcommand',
54
54
  message: 'What do you want to do?',
55
- options: ['list', 'get', 'create', 'update', 'delete'],
55
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
56
56
  },
57
57
  ]);
58
58
  return handleTableSubcommand(answer.subcommand, newArgv, prompter);
@@ -63,6 +63,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
63
63
  switch (subcommand) {
64
64
  case 'list':
65
65
  return handleList(argv, prompter);
66
+ case 'find-first':
67
+ return handleFindFirst(argv, prompter);
66
68
  case 'get':
67
69
  return handleGet(argv, prompter);
68
70
  case 'create':
@@ -76,46 +78,44 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
76
78
  process.exit(1);
77
79
  }
78
80
  }
79
- async function handleList(_argv, _prompter) {
81
+ async function handleList(argv, _prompter) {
80
82
  try {
83
+ const defaultSelect = {
84
+ id: true,
85
+ databaseId: true,
86
+ schemaId: true,
87
+ privateSchemaId: true,
88
+ membershipsTableId: true,
89
+ membershipsTableName: true,
90
+ membersTableId: true,
91
+ membersTableName: true,
92
+ membershipDefaultsTableId: true,
93
+ membershipDefaultsTableName: true,
94
+ grantsTableId: true,
95
+ grantsTableName: true,
96
+ actorTableId: true,
97
+ limitsTableId: true,
98
+ defaultLimitsTableId: true,
99
+ permissionsTableId: true,
100
+ defaultPermissionsTableId: true,
101
+ sprtTableId: true,
102
+ adminGrantsTableId: true,
103
+ adminGrantsTableName: true,
104
+ ownerGrantsTableId: true,
105
+ ownerGrantsTableName: true,
106
+ membershipType: true,
107
+ entityTableId: true,
108
+ entityTableOwnerId: true,
109
+ prefix: true,
110
+ actorMaskCheck: true,
111
+ actorPermCheck: true,
112
+ entityIdsByMask: true,
113
+ entityIdsByPerm: true,
114
+ entityIdsFunction: true,
115
+ };
116
+ const findManyArgs = parseFindManyArgs(argv, defaultSelect);
81
117
  const client = getClient();
82
- const result = await client.membershipsModule
83
- .findMany({
84
- select: {
85
- id: true,
86
- databaseId: true,
87
- schemaId: true,
88
- privateSchemaId: true,
89
- membershipsTableId: true,
90
- membershipsTableName: true,
91
- membersTableId: true,
92
- membersTableName: true,
93
- membershipDefaultsTableId: true,
94
- membershipDefaultsTableName: true,
95
- grantsTableId: true,
96
- grantsTableName: true,
97
- actorTableId: true,
98
- limitsTableId: true,
99
- defaultLimitsTableId: true,
100
- permissionsTableId: true,
101
- defaultPermissionsTableId: true,
102
- sprtTableId: true,
103
- adminGrantsTableId: true,
104
- adminGrantsTableName: true,
105
- ownerGrantsTableId: true,
106
- ownerGrantsTableName: true,
107
- membershipType: true,
108
- entityTableId: true,
109
- entityTableOwnerId: true,
110
- prefix: true,
111
- actorMaskCheck: true,
112
- actorPermCheck: true,
113
- entityIdsByMask: true,
114
- entityIdsByPerm: true,
115
- entityIdsFunction: true,
116
- },
117
- })
118
- .execute();
118
+ const result = await client.membershipsModule.findMany(findManyArgs).execute();
119
119
  console.log(JSON.stringify(result, null, 2));
120
120
  }
121
121
  catch (error) {
@@ -126,6 +126,54 @@ async function handleList(_argv, _prompter) {
126
126
  process.exit(1);
127
127
  }
128
128
  }
129
+ async function handleFindFirst(argv, _prompter) {
130
+ try {
131
+ const defaultSelect = {
132
+ id: true,
133
+ databaseId: true,
134
+ schemaId: true,
135
+ privateSchemaId: true,
136
+ membershipsTableId: true,
137
+ membershipsTableName: true,
138
+ membersTableId: true,
139
+ membersTableName: true,
140
+ membershipDefaultsTableId: true,
141
+ membershipDefaultsTableName: true,
142
+ grantsTableId: true,
143
+ grantsTableName: true,
144
+ actorTableId: true,
145
+ limitsTableId: true,
146
+ defaultLimitsTableId: true,
147
+ permissionsTableId: true,
148
+ defaultPermissionsTableId: true,
149
+ sprtTableId: true,
150
+ adminGrantsTableId: true,
151
+ adminGrantsTableName: true,
152
+ ownerGrantsTableId: true,
153
+ ownerGrantsTableName: true,
154
+ membershipType: true,
155
+ entityTableId: true,
156
+ entityTableOwnerId: true,
157
+ prefix: true,
158
+ actorMaskCheck: true,
159
+ actorPermCheck: true,
160
+ entityIdsByMask: true,
161
+ entityIdsByPerm: true,
162
+ entityIdsFunction: true,
163
+ };
164
+ const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
165
+ const client = getClient();
166
+ const result = await client.membershipsModule.findFirst(findFirstArgs).execute();
167
+ console.log(JSON.stringify(result, null, 2));
168
+ }
169
+ catch (error) {
170
+ console.error('Failed to find record.');
171
+ if (error instanceof Error) {
172
+ console.error(error.message);
173
+ }
174
+ process.exit(1);
175
+ }
176
+ }
129
177
  async function handleGet(argv, prompter) {
130
178
  try {
131
179
  const answers = await prompter.prompt(argv, [
@@ -5,13 +5,13 @@
5
5
  */
6
6
  import { extractFirst } from 'inquirerer';
7
7
  import { getClient } from '../executor';
8
- import { coerceAnswers, stripUndefined } from '../utils';
8
+ import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils';
9
9
  const fieldSchema = {
10
10
  id: 'uuid',
11
11
  databaseId: 'uuid',
12
12
  upload: 'string',
13
13
  };
14
- const usage = '\nmigrate-file <command>\n\nCommands:\n list List all migrateFile records\n create Create a new migrateFile\n\n --help, -h Show this help message\n';
14
+ const usage = '\nmigrate-file <command>\n\nCommands:\n list List migrateFile records\n find-first Find first matching migrateFile record\n create Create a new migrateFile\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';
15
15
  export default async (argv, prompter, _options) => {
16
16
  if (argv.help || argv.h) {
17
17
  console.log(usage);
@@ -24,7 +24,7 @@ export default async (argv, prompter, _options) => {
24
24
  type: 'autocomplete',
25
25
  name: 'subcommand',
26
26
  message: 'What do you want to do?',
27
- options: ['list', 'create'],
27
+ options: ['list', 'find-first', 'create'],
28
28
  },
29
29
  ]);
30
30
  return handleTableSubcommand(answer.subcommand, newArgv, prompter);
@@ -35,6 +35,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
35
35
  switch (subcommand) {
36
36
  case 'list':
37
37
  return handleList(argv, prompter);
38
+ case 'find-first':
39
+ return handleFindFirst(argv, prompter);
38
40
  case 'create':
39
41
  return handleCreate(argv, prompter);
40
42
  default:
@@ -42,18 +44,16 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
42
44
  process.exit(1);
43
45
  }
44
46
  }
45
- async function handleList(_argv, _prompter) {
47
+ async function handleList(argv, _prompter) {
46
48
  try {
49
+ const defaultSelect = {
50
+ id: true,
51
+ databaseId: true,
52
+ upload: true,
53
+ };
54
+ const findManyArgs = parseFindManyArgs(argv, defaultSelect);
47
55
  const client = getClient();
48
- const result = await client.migrateFile
49
- .findMany({
50
- select: {
51
- id: true,
52
- databaseId: true,
53
- upload: true,
54
- },
55
- })
56
- .execute();
56
+ const result = await client.migrateFile.findMany(findManyArgs).execute();
57
57
  console.log(JSON.stringify(result, null, 2));
58
58
  }
59
59
  catch (error) {
@@ -64,6 +64,26 @@ async function handleList(_argv, _prompter) {
64
64
  process.exit(1);
65
65
  }
66
66
  }
67
+ async function handleFindFirst(argv, _prompter) {
68
+ try {
69
+ const defaultSelect = {
70
+ id: true,
71
+ databaseId: true,
72
+ upload: true,
73
+ };
74
+ const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
75
+ const client = getClient();
76
+ const result = await client.migrateFile.findFirst(findFirstArgs).execute();
77
+ console.log(JSON.stringify(result, null, 2));
78
+ }
79
+ catch (error) {
80
+ console.error('Failed to find record.');
81
+ if (error instanceof Error) {
82
+ console.error(error.message);
83
+ }
84
+ process.exit(1);
85
+ }
86
+ }
67
87
  async function handleCreate(argv, prompter) {
68
88
  try {
69
89
  const rawAnswers = await prompter.prompt(argv, [
@@ -5,19 +5,21 @@
5
5
  */
6
6
  import { extractFirst } from 'inquirerer';
7
7
  import { getClient } from '../executor';
8
- import { coerceAnswers, stripUndefined } from '../utils';
8
+ import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils';
9
9
  const fieldSchema = {
10
10
  name: 'string',
11
11
  slug: 'string',
12
12
  category: 'string',
13
13
  displayName: 'string',
14
14
  description: 'string',
15
+ summary: 'string',
15
16
  parameterSchema: 'json',
17
+ guidance: 'json',
16
18
  tags: 'string',
17
19
  createdAt: 'string',
18
20
  updatedAt: 'string',
19
21
  };
20
- const usage = '\nnode-type-registry <command>\n\nCommands:\n list List all nodeTypeRegistry records\n get Get a nodeTypeRegistry by ID\n create Create a new nodeTypeRegistry\n update Update an existing nodeTypeRegistry\n delete Delete a nodeTypeRegistry\n\n --help, -h Show this help message\n';
22
+ const usage = '\nnode-type-registry <command>\n\nCommands:\n list List nodeTypeRegistry records\n find-first Find first matching nodeTypeRegistry record\n get Get a nodeTypeRegistry by ID\n create Create a new nodeTypeRegistry\n update Update an existing nodeTypeRegistry\n delete Delete a nodeTypeRegistry\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';
21
23
  export default async (argv, prompter, _options) => {
22
24
  if (argv.help || argv.h) {
23
25
  console.log(usage);
@@ -30,7 +32,7 @@ export default async (argv, prompter, _options) => {
30
32
  type: 'autocomplete',
31
33
  name: 'subcommand',
32
34
  message: 'What do you want to do?',
33
- options: ['list', 'get', 'create', 'update', 'delete'],
35
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
34
36
  },
35
37
  ]);
36
38
  return handleTableSubcommand(answer.subcommand, newArgv, prompter);
@@ -41,6 +43,8 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
41
43
  switch (subcommand) {
42
44
  case 'list':
43
45
  return handleList(argv, prompter);
46
+ case 'find-first':
47
+ return handleFindFirst(argv, prompter);
44
48
  case 'get':
45
49
  return handleGet(argv, prompter);
46
50
  case 'create':
@@ -54,24 +58,24 @@ async function handleTableSubcommand(subcommand, argv, prompter) {
54
58
  process.exit(1);
55
59
  }
56
60
  }
57
- async function handleList(_argv, _prompter) {
61
+ async function handleList(argv, _prompter) {
58
62
  try {
63
+ const defaultSelect = {
64
+ name: true,
65
+ slug: true,
66
+ category: true,
67
+ displayName: true,
68
+ description: true,
69
+ summary: true,
70
+ parameterSchema: true,
71
+ guidance: true,
72
+ tags: true,
73
+ createdAt: true,
74
+ updatedAt: true,
75
+ };
76
+ const findManyArgs = parseFindManyArgs(argv, defaultSelect);
59
77
  const client = getClient();
60
- const result = await client.nodeTypeRegistry
61
- .findMany({
62
- select: {
63
- name: true,
64
- slug: true,
65
- category: true,
66
- displayName: true,
67
- description: true,
68
- parameterSchema: true,
69
- tags: true,
70
- createdAt: true,
71
- updatedAt: true,
72
- },
73
- })
74
- .execute();
78
+ const result = await client.nodeTypeRegistry.findMany(findManyArgs).execute();
75
79
  console.log(JSON.stringify(result, null, 2));
76
80
  }
77
81
  catch (error) {
@@ -82,6 +86,34 @@ async function handleList(_argv, _prompter) {
82
86
  process.exit(1);
83
87
  }
84
88
  }
89
+ async function handleFindFirst(argv, _prompter) {
90
+ try {
91
+ const defaultSelect = {
92
+ name: true,
93
+ slug: true,
94
+ category: true,
95
+ displayName: true,
96
+ description: true,
97
+ summary: true,
98
+ parameterSchema: true,
99
+ guidance: true,
100
+ tags: true,
101
+ createdAt: true,
102
+ updatedAt: true,
103
+ };
104
+ const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
105
+ const client = getClient();
106
+ const result = await client.nodeTypeRegistry.findFirst(findFirstArgs).execute();
107
+ console.log(JSON.stringify(result, null, 2));
108
+ }
109
+ catch (error) {
110
+ console.error('Failed to find record.');
111
+ if (error instanceof Error) {
112
+ console.error(error.message);
113
+ }
114
+ process.exit(1);
115
+ }
116
+ }
85
117
  async function handleGet(argv, prompter) {
86
118
  try {
87
119
  const answers = await prompter.prompt(argv, [
@@ -102,7 +134,9 @@ async function handleGet(argv, prompter) {
102
134
  category: true,
103
135
  displayName: true,
104
136
  description: true,
137
+ summary: true,
105
138
  parameterSchema: true,
139
+ guidance: true,
106
140
  tags: true,
107
141
  createdAt: true,
108
142
  updatedAt: true,
@@ -154,6 +188,13 @@ async function handleCreate(argv, prompter) {
154
188
  required: false,
155
189
  skipPrompt: true,
156
190
  },
191
+ {
192
+ type: 'text',
193
+ name: 'summary',
194
+ message: 'summary',
195
+ required: false,
196
+ skipPrompt: true,
197
+ },
157
198
  {
158
199
  type: 'json',
159
200
  name: 'parameterSchema',
@@ -161,6 +202,13 @@ async function handleCreate(argv, prompter) {
161
202
  required: false,
162
203
  skipPrompt: true,
163
204
  },
205
+ {
206
+ type: 'json',
207
+ name: 'guidance',
208
+ message: 'guidance',
209
+ required: false,
210
+ skipPrompt: true,
211
+ },
164
212
  {
165
213
  type: 'text',
166
214
  name: 'tags',
@@ -180,7 +228,9 @@ async function handleCreate(argv, prompter) {
180
228
  category: cleanedData.category,
181
229
  displayName: cleanedData.displayName,
182
230
  description: cleanedData.description,
231
+ summary: cleanedData.summary,
183
232
  parameterSchema: cleanedData.parameterSchema,
233
+ guidance: cleanedData.guidance,
184
234
  tags: cleanedData.tags,
185
235
  },
186
236
  select: {
@@ -189,7 +239,9 @@ async function handleCreate(argv, prompter) {
189
239
  category: true,
190
240
  displayName: true,
191
241
  description: true,
242
+ summary: true,
192
243
  parameterSchema: true,
244
+ guidance: true,
193
245
  tags: true,
194
246
  createdAt: true,
195
247
  updatedAt: true,
@@ -241,6 +293,13 @@ async function handleUpdate(argv, prompter) {
241
293
  required: false,
242
294
  skipPrompt: true,
243
295
  },
296
+ {
297
+ type: 'text',
298
+ name: 'summary',
299
+ message: 'summary',
300
+ required: false,
301
+ skipPrompt: true,
302
+ },
244
303
  {
245
304
  type: 'json',
246
305
  name: 'parameterSchema',
@@ -248,6 +307,13 @@ async function handleUpdate(argv, prompter) {
248
307
  required: false,
249
308
  skipPrompt: true,
250
309
  },
310
+ {
311
+ type: 'json',
312
+ name: 'guidance',
313
+ message: 'guidance',
314
+ required: false,
315
+ skipPrompt: true,
316
+ },
251
317
  {
252
318
  type: 'text',
253
319
  name: 'tags',
@@ -269,7 +335,9 @@ async function handleUpdate(argv, prompter) {
269
335
  category: cleanedData.category,
270
336
  displayName: cleanedData.displayName,
271
337
  description: cleanedData.description,
338
+ summary: cleanedData.summary,
272
339
  parameterSchema: cleanedData.parameterSchema,
340
+ guidance: cleanedData.guidance,
273
341
  tags: cleanedData.tags,
274
342
  },
275
343
  select: {
@@ -278,7 +346,9 @@ async function handleUpdate(argv, prompter) {
278
346
  category: true,
279
347
  displayName: true,
280
348
  description: true,
349
+ summary: true,
281
350
  parameterSchema: true,
351
+ guidance: true,
282
352
  tags: true,
283
353
  createdAt: true,
284
354
  updatedAt: true,