@constructive-sdk/cli 0.3.0 → 0.7.0

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 (319) hide show
  1. package/admin/cli/commands/app-admin-grant.js +2 -2
  2. package/admin/cli/commands/app-grant.js +2 -2
  3. package/admin/cli/commands/app-membership-default.js +4 -4
  4. package/admin/cli/commands/app-membership.js +14 -14
  5. package/admin/cli/commands/app-owner-grant.js +2 -2
  6. package/admin/cli/commands/claimed-invite.js +2 -2
  7. package/admin/cli/commands/invite.js +6 -6
  8. package/admin/cli/commands/org-admin-grant.js +2 -2
  9. package/admin/cli/commands/org-chart-edge-grant.js +2 -2
  10. package/admin/cli/commands/org-claimed-invite.js +2 -2
  11. package/admin/cli/commands/org-grant.js +2 -2
  12. package/admin/cli/commands/org-invite.js +6 -6
  13. package/admin/cli/commands/org-member.js +2 -2
  14. package/admin/cli/commands/org-membership-default.js +6 -6
  15. package/admin/cli/commands/org-membership.js +12 -12
  16. package/admin/cli/commands/org-owner-grant.js +2 -2
  17. package/admin/cli/commands/submit-invite-code.js +1 -1
  18. package/admin/cli/commands/submit-org-invite-code.js +1 -1
  19. package/admin/cli/index.js +2 -2
  20. package/admin/cli/utils.d.ts +13 -0
  21. package/admin/cli/utils.js +25 -0
  22. package/admin/orm/input-types.d.ts +7 -280
  23. package/admin/orm/query-builder.d.ts +6 -4
  24. package/admin/orm/query-builder.js +13 -3
  25. package/admin/orm/select-types.d.ts +4 -2
  26. package/auth/cli/commands/audit-log.js +2 -2
  27. package/auth/cli/commands/check-password.js +1 -1
  28. package/auth/cli/commands/confirm-delete-account.js +1 -1
  29. package/auth/cli/commands/connected-account.js +4 -4
  30. package/auth/cli/commands/crypto-address.js +4 -4
  31. package/auth/cli/commands/email.js +4 -4
  32. package/auth/cli/commands/extend-token-expires.js +1 -1
  33. package/auth/cli/commands/forgot-password.js +1 -1
  34. package/auth/cli/commands/one-time-token.js +1 -1
  35. package/auth/cli/commands/phone-number.js +4 -4
  36. package/auth/cli/commands/reset-password.js +1 -1
  37. package/auth/cli/commands/send-account-deletion-email.js +1 -1
  38. package/auth/cli/commands/send-verification-email.js +1 -1
  39. package/auth/cli/commands/set-password.js +1 -1
  40. package/auth/cli/commands/sign-in-one-time-token.js +1 -1
  41. package/auth/cli/commands/sign-in.js +1 -1
  42. package/auth/cli/commands/sign-out.js +1 -1
  43. package/auth/cli/commands/sign-up.js +1 -1
  44. package/auth/cli/commands/verify-email.js +1 -1
  45. package/auth/cli/commands/verify-password.js +1 -1
  46. package/auth/cli/commands/verify-totp.js +1 -1
  47. package/auth/cli/index.js +2 -2
  48. package/auth/cli/utils.d.ts +13 -0
  49. package/auth/cli/utils.js +25 -0
  50. package/auth/orm/input-types.d.ts +7 -63
  51. package/auth/orm/query-builder.d.ts +6 -4
  52. package/auth/orm/query-builder.js +13 -3
  53. package/auth/orm/select-types.d.ts +4 -2
  54. package/esm/admin/cli/commands/app-admin-grant.js +2 -2
  55. package/esm/admin/cli/commands/app-grant.js +2 -2
  56. package/esm/admin/cli/commands/app-membership-default.js +4 -4
  57. package/esm/admin/cli/commands/app-membership.js +14 -14
  58. package/esm/admin/cli/commands/app-owner-grant.js +2 -2
  59. package/esm/admin/cli/commands/claimed-invite.js +2 -2
  60. package/esm/admin/cli/commands/invite.js +6 -6
  61. package/esm/admin/cli/commands/org-admin-grant.js +2 -2
  62. package/esm/admin/cli/commands/org-chart-edge-grant.js +2 -2
  63. package/esm/admin/cli/commands/org-claimed-invite.js +2 -2
  64. package/esm/admin/cli/commands/org-grant.js +2 -2
  65. package/esm/admin/cli/commands/org-invite.js +6 -6
  66. package/esm/admin/cli/commands/org-member.js +2 -2
  67. package/esm/admin/cli/commands/org-membership-default.js +6 -6
  68. package/esm/admin/cli/commands/org-membership.js +12 -12
  69. package/esm/admin/cli/commands/org-owner-grant.js +2 -2
  70. package/esm/admin/cli/commands/submit-invite-code.js +2 -2
  71. package/esm/admin/cli/commands/submit-org-invite-code.js +2 -2
  72. package/esm/admin/cli/index.js +2 -2
  73. package/esm/admin/cli/utils.d.ts +13 -0
  74. package/esm/admin/cli/utils.js +24 -0
  75. package/esm/admin/orm/input-types.d.ts +7 -280
  76. package/esm/admin/orm/query-builder.d.ts +6 -4
  77. package/esm/admin/orm/query-builder.js +13 -3
  78. package/esm/admin/orm/select-types.d.ts +4 -2
  79. package/esm/auth/cli/commands/audit-log.js +2 -2
  80. package/esm/auth/cli/commands/check-password.js +2 -2
  81. package/esm/auth/cli/commands/confirm-delete-account.js +2 -2
  82. package/esm/auth/cli/commands/connected-account.js +4 -4
  83. package/esm/auth/cli/commands/crypto-address.js +4 -4
  84. package/esm/auth/cli/commands/email.js +4 -4
  85. package/esm/auth/cli/commands/extend-token-expires.js +2 -2
  86. package/esm/auth/cli/commands/forgot-password.js +2 -2
  87. package/esm/auth/cli/commands/one-time-token.js +2 -2
  88. package/esm/auth/cli/commands/phone-number.js +4 -4
  89. package/esm/auth/cli/commands/reset-password.js +2 -2
  90. package/esm/auth/cli/commands/send-account-deletion-email.js +2 -2
  91. package/esm/auth/cli/commands/send-verification-email.js +2 -2
  92. package/esm/auth/cli/commands/set-password.js +2 -2
  93. package/esm/auth/cli/commands/sign-in-one-time-token.js +2 -2
  94. package/esm/auth/cli/commands/sign-in.js +2 -2
  95. package/esm/auth/cli/commands/sign-out.js +2 -2
  96. package/esm/auth/cli/commands/sign-up.js +2 -2
  97. package/esm/auth/cli/commands/verify-email.js +2 -2
  98. package/esm/auth/cli/commands/verify-password.js +2 -2
  99. package/esm/auth/cli/commands/verify-totp.js +2 -2
  100. package/esm/auth/cli/index.js +2 -2
  101. package/esm/auth/cli/utils.d.ts +13 -0
  102. package/esm/auth/cli/utils.js +24 -0
  103. package/esm/auth/orm/input-types.d.ts +7 -63
  104. package/esm/auth/orm/query-builder.d.ts +6 -4
  105. package/esm/auth/orm/query-builder.js +13 -3
  106. package/esm/auth/orm/select-types.d.ts +4 -2
  107. package/esm/objects/cli/commands/freeze-objects.js +2 -2
  108. package/esm/objects/cli/commands/get-all-record.js +1 -1
  109. package/esm/objects/cli/commands/init-empty-repo.js +2 -2
  110. package/esm/objects/cli/commands/insert-node-at-path.js +2 -2
  111. package/esm/objects/cli/commands/object.js +4 -4
  112. package/esm/objects/cli/commands/remove-node-at-path.js +2 -2
  113. package/esm/objects/cli/commands/set-and-commit.js +2 -2
  114. package/esm/objects/cli/commands/set-data-at-path.js +2 -2
  115. package/esm/objects/cli/commands/set-props-and-commit.js +2 -2
  116. package/esm/objects/cli/commands/update-node-at-path.js +2 -2
  117. package/esm/objects/cli/index.js +2 -2
  118. package/esm/objects/cli/utils.d.ts +13 -0
  119. package/esm/objects/cli/utils.js +24 -0
  120. package/esm/objects/orm/input-types.d.ts +7 -39
  121. package/esm/objects/orm/query-builder.d.ts +6 -4
  122. package/esm/objects/orm/query-builder.js +13 -3
  123. package/esm/objects/orm/select-types.d.ts +4 -2
  124. package/esm/public/cli/commands/api-module.js +2 -2
  125. package/esm/public/cli/commands/api.js +2 -2
  126. package/esm/public/cli/commands/app-admin-grant.js +2 -2
  127. package/esm/public/cli/commands/app-grant.js +2 -2
  128. package/esm/public/cli/commands/app-membership-default.js +4 -4
  129. package/esm/public/cli/commands/app-membership.js +14 -14
  130. package/esm/public/cli/commands/app-owner-grant.js +2 -2
  131. package/esm/public/cli/commands/apply-rls.js +2 -2
  132. package/esm/public/cli/commands/ast-migration.js +4 -4
  133. package/esm/public/cli/commands/audit-log.js +2 -2
  134. package/esm/public/cli/commands/bootstrap-user.js +2 -2
  135. package/esm/public/cli/commands/check-constraint.js +4 -4
  136. package/esm/public/cli/commands/check-password.js +2 -2
  137. package/esm/public/cli/commands/claimed-invite.js +2 -2
  138. package/esm/public/cli/commands/confirm-delete-account.js +2 -2
  139. package/esm/public/cli/commands/connected-account.js +4 -4
  140. package/esm/public/cli/commands/create-user-database.js +2 -2
  141. package/esm/public/cli/commands/crypto-address.js +4 -4
  142. package/esm/public/cli/commands/database-provision-module.js +4 -4
  143. package/esm/public/cli/commands/default-privilege.js +2 -2
  144. package/esm/public/cli/commands/denormalized-table-field.js +4 -4
  145. package/esm/public/cli/commands/email.js +4 -4
  146. package/esm/public/cli/commands/extend-token-expires.js +2 -2
  147. package/esm/public/cli/commands/field-module.js +2 -2
  148. package/esm/public/cli/commands/field.js +12 -12
  149. package/esm/public/cli/commands/foreign-key-constraint.js +2 -2
  150. package/esm/public/cli/commands/forgot-password.js +2 -2
  151. package/esm/public/cli/commands/freeze-objects.js +2 -2
  152. package/esm/public/cli/commands/get-all-record.js +1 -1
  153. package/esm/public/cli/commands/index.js +8 -8
  154. package/esm/public/cli/commands/init-empty-repo.js +2 -2
  155. package/esm/public/cli/commands/insert-node-at-path.js +2 -2
  156. package/esm/public/cli/commands/invite.js +6 -6
  157. package/esm/public/cli/commands/node-type-registry.js +2 -2
  158. package/esm/public/cli/commands/object.js +4 -4
  159. package/esm/public/cli/commands/one-time-token.js +2 -2
  160. package/esm/public/cli/commands/org-admin-grant.js +2 -2
  161. package/esm/public/cli/commands/org-chart-edge-grant.js +2 -2
  162. package/esm/public/cli/commands/org-claimed-invite.js +2 -2
  163. package/esm/public/cli/commands/org-grant.js +2 -2
  164. package/esm/public/cli/commands/org-invite.js +6 -6
  165. package/esm/public/cli/commands/org-member.js +2 -2
  166. package/esm/public/cli/commands/org-membership-default.js +6 -6
  167. package/esm/public/cli/commands/org-membership.js +12 -12
  168. package/esm/public/cli/commands/org-owner-grant.js +2 -2
  169. package/esm/public/cli/commands/phone-number.js +4 -4
  170. package/esm/public/cli/commands/policy.js +8 -8
  171. package/esm/public/cli/commands/primary-key-constraint.js +2 -2
  172. package/esm/public/cli/commands/provision-database-with-user.js +2 -2
  173. package/esm/public/cli/commands/relation-provision.js +12 -12
  174. package/esm/public/cli/commands/remove-node-at-path.js +2 -2
  175. package/esm/public/cli/commands/reset-password.js +2 -2
  176. package/esm/public/cli/commands/schema.js +4 -4
  177. package/esm/public/cli/commands/secure-table-provision.js +10 -10
  178. package/esm/public/cli/commands/send-account-deletion-email.js +2 -2
  179. package/esm/public/cli/commands/send-verification-email.js +2 -2
  180. package/esm/public/cli/commands/set-and-commit.js +2 -2
  181. package/esm/public/cli/commands/set-data-at-path.js +2 -2
  182. package/esm/public/cli/commands/set-field-order.js +2 -2
  183. package/esm/public/cli/commands/set-password.js +2 -2
  184. package/esm/public/cli/commands/set-props-and-commit.js +2 -2
  185. package/esm/public/cli/commands/sign-in-one-time-token.js +2 -2
  186. package/esm/public/cli/commands/sign-in.js +2 -2
  187. package/esm/public/cli/commands/sign-out.js +2 -2
  188. package/esm/public/cli/commands/sign-up.js +2 -2
  189. package/esm/public/cli/commands/site-module.js +2 -2
  190. package/esm/public/cli/commands/site-theme.js +2 -2
  191. package/esm/public/cli/commands/sql-migration.js +1 -1
  192. package/esm/public/cli/commands/submit-invite-code.js +2 -2
  193. package/esm/public/cli/commands/submit-org-invite-code.js +2 -2
  194. package/esm/public/cli/commands/table-grant.js +2 -2
  195. package/esm/public/cli/commands/table-module.js +4 -4
  196. package/esm/public/cli/commands/table-template-module.js +2 -2
  197. package/esm/public/cli/commands/table.js +8 -8
  198. package/esm/public/cli/commands/trigger.js +2 -2
  199. package/esm/public/cli/commands/unique-constraint.js +2 -2
  200. package/esm/public/cli/commands/update-node-at-path.js +2 -2
  201. package/esm/public/cli/commands/verify-email.js +2 -2
  202. package/esm/public/cli/commands/verify-password.js +2 -2
  203. package/esm/public/cli/commands/verify-totp.js +2 -2
  204. package/esm/public/cli/commands/view-grant.js +4 -4
  205. package/esm/public/cli/commands/view.js +10 -10
  206. package/esm/public/cli/index.js +2 -2
  207. package/esm/public/cli/utils.d.ts +13 -0
  208. package/esm/public/cli/utils.js +24 -0
  209. package/esm/public/orm/input-types.d.ts +7 -1196
  210. package/esm/public/orm/query-builder.d.ts +6 -4
  211. package/esm/public/orm/query-builder.js +13 -3
  212. package/esm/public/orm/select-types.d.ts +4 -2
  213. package/objects/cli/commands/freeze-objects.js +1 -1
  214. package/objects/cli/commands/get-all-record.js +1 -1
  215. package/objects/cli/commands/init-empty-repo.js +1 -1
  216. package/objects/cli/commands/insert-node-at-path.js +1 -1
  217. package/objects/cli/commands/object.js +4 -4
  218. package/objects/cli/commands/remove-node-at-path.js +1 -1
  219. package/objects/cli/commands/set-and-commit.js +1 -1
  220. package/objects/cli/commands/set-data-at-path.js +1 -1
  221. package/objects/cli/commands/set-props-and-commit.js +1 -1
  222. package/objects/cli/commands/update-node-at-path.js +1 -1
  223. package/objects/cli/index.js +2 -2
  224. package/objects/cli/utils.d.ts +13 -0
  225. package/objects/cli/utils.js +25 -0
  226. package/objects/orm/input-types.d.ts +7 -39
  227. package/objects/orm/query-builder.d.ts +6 -4
  228. package/objects/orm/query-builder.js +13 -3
  229. package/objects/orm/select-types.d.ts +4 -2
  230. package/package.json +6 -6
  231. package/public/cli/commands/api-module.js +2 -2
  232. package/public/cli/commands/api.js +2 -2
  233. package/public/cli/commands/app-admin-grant.js +2 -2
  234. package/public/cli/commands/app-grant.js +2 -2
  235. package/public/cli/commands/app-membership-default.js +4 -4
  236. package/public/cli/commands/app-membership.js +14 -14
  237. package/public/cli/commands/app-owner-grant.js +2 -2
  238. package/public/cli/commands/apply-rls.js +1 -1
  239. package/public/cli/commands/ast-migration.js +4 -4
  240. package/public/cli/commands/audit-log.js +2 -2
  241. package/public/cli/commands/bootstrap-user.js +1 -1
  242. package/public/cli/commands/check-constraint.js +4 -4
  243. package/public/cli/commands/check-password.js +1 -1
  244. package/public/cli/commands/claimed-invite.js +2 -2
  245. package/public/cli/commands/confirm-delete-account.js +1 -1
  246. package/public/cli/commands/connected-account.js +4 -4
  247. package/public/cli/commands/create-user-database.js +1 -1
  248. package/public/cli/commands/crypto-address.js +4 -4
  249. package/public/cli/commands/database-provision-module.js +4 -4
  250. package/public/cli/commands/default-privilege.js +2 -2
  251. package/public/cli/commands/denormalized-table-field.js +4 -4
  252. package/public/cli/commands/email.js +4 -4
  253. package/public/cli/commands/extend-token-expires.js +1 -1
  254. package/public/cli/commands/field-module.js +2 -2
  255. package/public/cli/commands/field.js +12 -12
  256. package/public/cli/commands/foreign-key-constraint.js +2 -2
  257. package/public/cli/commands/forgot-password.js +1 -1
  258. package/public/cli/commands/freeze-objects.js +1 -1
  259. package/public/cli/commands/get-all-record.js +1 -1
  260. package/public/cli/commands/index.js +8 -8
  261. package/public/cli/commands/init-empty-repo.js +1 -1
  262. package/public/cli/commands/insert-node-at-path.js +1 -1
  263. package/public/cli/commands/invite.js +6 -6
  264. package/public/cli/commands/node-type-registry.js +2 -2
  265. package/public/cli/commands/object.js +4 -4
  266. package/public/cli/commands/one-time-token.js +1 -1
  267. package/public/cli/commands/org-admin-grant.js +2 -2
  268. package/public/cli/commands/org-chart-edge-grant.js +2 -2
  269. package/public/cli/commands/org-claimed-invite.js +2 -2
  270. package/public/cli/commands/org-grant.js +2 -2
  271. package/public/cli/commands/org-invite.js +6 -6
  272. package/public/cli/commands/org-member.js +2 -2
  273. package/public/cli/commands/org-membership-default.js +6 -6
  274. package/public/cli/commands/org-membership.js +12 -12
  275. package/public/cli/commands/org-owner-grant.js +2 -2
  276. package/public/cli/commands/phone-number.js +4 -4
  277. package/public/cli/commands/policy.js +8 -8
  278. package/public/cli/commands/primary-key-constraint.js +2 -2
  279. package/public/cli/commands/provision-database-with-user.js +1 -1
  280. package/public/cli/commands/relation-provision.js +12 -12
  281. package/public/cli/commands/remove-node-at-path.js +1 -1
  282. package/public/cli/commands/reset-password.js +1 -1
  283. package/public/cli/commands/schema.js +4 -4
  284. package/public/cli/commands/secure-table-provision.js +10 -10
  285. package/public/cli/commands/send-account-deletion-email.js +1 -1
  286. package/public/cli/commands/send-verification-email.js +1 -1
  287. package/public/cli/commands/set-and-commit.js +1 -1
  288. package/public/cli/commands/set-data-at-path.js +1 -1
  289. package/public/cli/commands/set-field-order.js +1 -1
  290. package/public/cli/commands/set-password.js +1 -1
  291. package/public/cli/commands/set-props-and-commit.js +1 -1
  292. package/public/cli/commands/sign-in-one-time-token.js +1 -1
  293. package/public/cli/commands/sign-in.js +1 -1
  294. package/public/cli/commands/sign-out.js +1 -1
  295. package/public/cli/commands/sign-up.js +1 -1
  296. package/public/cli/commands/site-module.js +2 -2
  297. package/public/cli/commands/site-theme.js +2 -2
  298. package/public/cli/commands/sql-migration.js +1 -1
  299. package/public/cli/commands/submit-invite-code.js +1 -1
  300. package/public/cli/commands/submit-org-invite-code.js +1 -1
  301. package/public/cli/commands/table-grant.js +2 -2
  302. package/public/cli/commands/table-module.js +4 -4
  303. package/public/cli/commands/table-template-module.js +2 -2
  304. package/public/cli/commands/table.js +8 -8
  305. package/public/cli/commands/trigger.js +2 -2
  306. package/public/cli/commands/unique-constraint.js +2 -2
  307. package/public/cli/commands/update-node-at-path.js +1 -1
  308. package/public/cli/commands/verify-email.js +1 -1
  309. package/public/cli/commands/verify-password.js +1 -1
  310. package/public/cli/commands/verify-totp.js +1 -1
  311. package/public/cli/commands/view-grant.js +4 -4
  312. package/public/cli/commands/view.js +10 -10
  313. package/public/cli/index.js +2 -2
  314. package/public/cli/utils.d.ts +13 -0
  315. package/public/cli/utils.js +25 -0
  316. package/public/orm/input-types.d.ts +7 -1196
  317. package/public/orm/query-builder.d.ts +6 -4
  318. package/public/orm/query-builder.js +13 -3
  319. package/public/orm/select-types.d.ts +4 -2
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.coerceAnswers = coerceAnswers;
7
7
  exports.stripUndefined = stripUndefined;
8
8
  exports.parseMutationInput = parseMutationInput;
9
+ exports.unflattenDotNotation = unflattenDotNotation;
9
10
  exports.buildSelectFromPaths = buildSelectFromPaths;
10
11
  /**
11
12
  * CLI utility functions for type coercion and input handling
@@ -124,6 +125,30 @@ function parseMutationInput(answers) {
124
125
  }
125
126
  return answers;
126
127
  }
128
+ /**
129
+ * Reconstruct nested objects from dot-notation CLI answers.
130
+ * When INPUT_OBJECT args are flattened to dot-notation questions
131
+ * (e.g. `--input.email foo --input.password bar`), this function
132
+ * rebuilds the nested structure expected by the ORM:
133
+ *
134
+ * { 'input.email': 'foo', 'input.password': 'bar' }
135
+ * → { input: { email: 'foo', password: 'bar' } }
136
+ *
137
+ * Non-dotted keys are passed through unchanged.
138
+ * Uses `nested-obj` for safe nested property setting.
139
+ */
140
+ function unflattenDotNotation(answers) {
141
+ const result = {};
142
+ for (const [key, value] of Object.entries(answers)) {
143
+ if (key.includes('.')) {
144
+ nested_obj_1.default.set(result, key, value);
145
+ }
146
+ else {
147
+ result[key] = value;
148
+ }
149
+ }
150
+ return result;
151
+ }
127
152
  /**
128
153
  * Build a select object from a comma-separated list of dot-notation paths.
129
154
  * Uses `nested-obj` to parse paths like 'clientMutationId,result.accessToken,result.userId'
@@ -162,6 +162,13 @@ export interface InternetAddressFilter {
162
162
  export interface FullTextFilter {
163
163
  matches?: string;
164
164
  }
165
+ export interface VectorFilter {
166
+ isNull?: boolean;
167
+ equalTo?: number[];
168
+ notEqualTo?: number[];
169
+ distinctFrom?: number[];
170
+ notDistinctFrom?: number[];
171
+ }
165
172
  export interface StringListFilter {
166
173
  isNull?: boolean;
167
174
  equalTo?: string[];
@@ -1421,286 +1428,6 @@ export interface OrgInviteFilter {
1421
1428
  or?: OrgInviteFilter[];
1422
1429
  not?: OrgInviteFilter;
1423
1430
  }
1424
- export interface OrgGetManagersRecordCondition {
1425
- userId?: string | null;
1426
- depth?: number | null;
1427
- }
1428
- export interface OrgGetSubordinatesRecordCondition {
1429
- userId?: string | null;
1430
- depth?: number | null;
1431
- }
1432
- export interface AppPermissionCondition {
1433
- id?: string | null;
1434
- name?: string | null;
1435
- bitnum?: number | null;
1436
- bitstr?: string | null;
1437
- description?: string | null;
1438
- }
1439
- export interface OrgPermissionCondition {
1440
- id?: string | null;
1441
- name?: string | null;
1442
- bitnum?: number | null;
1443
- bitstr?: string | null;
1444
- description?: string | null;
1445
- }
1446
- export interface AppLevelRequirementCondition {
1447
- id?: string | null;
1448
- name?: string | null;
1449
- level?: string | null;
1450
- description?: string | null;
1451
- requiredCount?: number | null;
1452
- priority?: number | null;
1453
- createdAt?: string | null;
1454
- updatedAt?: string | null;
1455
- }
1456
- export interface OrgMemberCondition {
1457
- id?: string | null;
1458
- isAdmin?: boolean | null;
1459
- actorId?: string | null;
1460
- entityId?: string | null;
1461
- }
1462
- export interface AppPermissionDefaultCondition {
1463
- id?: string | null;
1464
- permissions?: string | null;
1465
- }
1466
- export interface OrgPermissionDefaultCondition {
1467
- id?: string | null;
1468
- permissions?: string | null;
1469
- entityId?: string | null;
1470
- }
1471
- export interface AppAdminGrantCondition {
1472
- id?: string | null;
1473
- isGrant?: boolean | null;
1474
- actorId?: string | null;
1475
- grantorId?: string | null;
1476
- createdAt?: string | null;
1477
- updatedAt?: string | null;
1478
- }
1479
- export interface AppOwnerGrantCondition {
1480
- id?: string | null;
1481
- isGrant?: boolean | null;
1482
- actorId?: string | null;
1483
- grantorId?: string | null;
1484
- createdAt?: string | null;
1485
- updatedAt?: string | null;
1486
- }
1487
- export interface OrgAdminGrantCondition {
1488
- id?: string | null;
1489
- isGrant?: boolean | null;
1490
- actorId?: string | null;
1491
- entityId?: string | null;
1492
- grantorId?: string | null;
1493
- createdAt?: string | null;
1494
- updatedAt?: string | null;
1495
- }
1496
- export interface OrgOwnerGrantCondition {
1497
- id?: string | null;
1498
- isGrant?: boolean | null;
1499
- actorId?: string | null;
1500
- entityId?: string | null;
1501
- grantorId?: string | null;
1502
- createdAt?: string | null;
1503
- updatedAt?: string | null;
1504
- }
1505
- export interface AppLimitDefaultCondition {
1506
- id?: string | null;
1507
- name?: string | null;
1508
- max?: number | null;
1509
- }
1510
- export interface OrgLimitDefaultCondition {
1511
- id?: string | null;
1512
- name?: string | null;
1513
- max?: number | null;
1514
- }
1515
- export interface MembershipTypeCondition {
1516
- id?: number | null;
1517
- name?: string | null;
1518
- description?: string | null;
1519
- prefix?: string | null;
1520
- }
1521
- export interface OrgChartEdgeGrantCondition {
1522
- id?: string | null;
1523
- entityId?: string | null;
1524
- childId?: string | null;
1525
- parentId?: string | null;
1526
- grantorId?: string | null;
1527
- isGrant?: boolean | null;
1528
- positionTitle?: string | null;
1529
- positionLevel?: number | null;
1530
- createdAt?: string | null;
1531
- }
1532
- export interface AppLimitCondition {
1533
- id?: string | null;
1534
- name?: string | null;
1535
- actorId?: string | null;
1536
- num?: number | null;
1537
- max?: number | null;
1538
- }
1539
- export interface AppAchievementCondition {
1540
- id?: string | null;
1541
- actorId?: string | null;
1542
- name?: string | null;
1543
- count?: number | null;
1544
- createdAt?: string | null;
1545
- updatedAt?: string | null;
1546
- }
1547
- export interface AppStepCondition {
1548
- id?: string | null;
1549
- actorId?: string | null;
1550
- name?: string | null;
1551
- count?: number | null;
1552
- createdAt?: string | null;
1553
- updatedAt?: string | null;
1554
- }
1555
- export interface ClaimedInviteCondition {
1556
- id?: string | null;
1557
- data?: unknown | null;
1558
- senderId?: string | null;
1559
- receiverId?: string | null;
1560
- createdAt?: string | null;
1561
- updatedAt?: string | null;
1562
- }
1563
- export interface AppGrantCondition {
1564
- id?: string | null;
1565
- permissions?: string | null;
1566
- isGrant?: boolean | null;
1567
- actorId?: string | null;
1568
- grantorId?: string | null;
1569
- createdAt?: string | null;
1570
- updatedAt?: string | null;
1571
- }
1572
- export interface AppMembershipDefaultCondition {
1573
- id?: string | null;
1574
- createdAt?: string | null;
1575
- updatedAt?: string | null;
1576
- createdBy?: string | null;
1577
- updatedBy?: string | null;
1578
- isApproved?: boolean | null;
1579
- isVerified?: boolean | null;
1580
- }
1581
- export interface OrgLimitCondition {
1582
- id?: string | null;
1583
- name?: string | null;
1584
- actorId?: string | null;
1585
- num?: number | null;
1586
- max?: number | null;
1587
- entityId?: string | null;
1588
- }
1589
- export interface OrgClaimedInviteCondition {
1590
- id?: string | null;
1591
- data?: unknown | null;
1592
- senderId?: string | null;
1593
- receiverId?: string | null;
1594
- createdAt?: string | null;
1595
- updatedAt?: string | null;
1596
- entityId?: string | null;
1597
- }
1598
- export interface OrgGrantCondition {
1599
- id?: string | null;
1600
- permissions?: string | null;
1601
- isGrant?: boolean | null;
1602
- actorId?: string | null;
1603
- entityId?: string | null;
1604
- grantorId?: string | null;
1605
- createdAt?: string | null;
1606
- updatedAt?: string | null;
1607
- }
1608
- export interface OrgChartEdgeCondition {
1609
- id?: string | null;
1610
- createdAt?: string | null;
1611
- updatedAt?: string | null;
1612
- entityId?: string | null;
1613
- childId?: string | null;
1614
- parentId?: string | null;
1615
- positionTitle?: string | null;
1616
- positionLevel?: number | null;
1617
- }
1618
- export interface OrgMembershipDefaultCondition {
1619
- id?: string | null;
1620
- createdAt?: string | null;
1621
- updatedAt?: string | null;
1622
- createdBy?: string | null;
1623
- updatedBy?: string | null;
1624
- isApproved?: boolean | null;
1625
- entityId?: string | null;
1626
- deleteMemberCascadeGroups?: boolean | null;
1627
- createGroupsCascadeMembers?: boolean | null;
1628
- }
1629
- export interface InviteCondition {
1630
- id?: string | null;
1631
- email?: unknown | null;
1632
- senderId?: string | null;
1633
- inviteToken?: string | null;
1634
- inviteValid?: boolean | null;
1635
- inviteLimit?: number | null;
1636
- inviteCount?: number | null;
1637
- multiple?: boolean | null;
1638
- data?: unknown | null;
1639
- expiresAt?: string | null;
1640
- createdAt?: string | null;
1641
- updatedAt?: string | null;
1642
- }
1643
- export interface AppLevelCondition {
1644
- id?: string | null;
1645
- name?: string | null;
1646
- description?: string | null;
1647
- image?: unknown | null;
1648
- ownerId?: string | null;
1649
- createdAt?: string | null;
1650
- updatedAt?: string | null;
1651
- }
1652
- export interface AppMembershipCondition {
1653
- id?: string | null;
1654
- createdAt?: string | null;
1655
- updatedAt?: string | null;
1656
- createdBy?: string | null;
1657
- updatedBy?: string | null;
1658
- isApproved?: boolean | null;
1659
- isBanned?: boolean | null;
1660
- isDisabled?: boolean | null;
1661
- isVerified?: boolean | null;
1662
- isActive?: boolean | null;
1663
- isOwner?: boolean | null;
1664
- isAdmin?: boolean | null;
1665
- permissions?: string | null;
1666
- granted?: string | null;
1667
- actorId?: string | null;
1668
- profileId?: string | null;
1669
- }
1670
- export interface OrgMembershipCondition {
1671
- id?: string | null;
1672
- createdAt?: string | null;
1673
- updatedAt?: string | null;
1674
- createdBy?: string | null;
1675
- updatedBy?: string | null;
1676
- isApproved?: boolean | null;
1677
- isBanned?: boolean | null;
1678
- isDisabled?: boolean | null;
1679
- isActive?: boolean | null;
1680
- isOwner?: boolean | null;
1681
- isAdmin?: boolean | null;
1682
- permissions?: string | null;
1683
- granted?: string | null;
1684
- actorId?: string | null;
1685
- entityId?: string | null;
1686
- profileId?: string | null;
1687
- }
1688
- export interface OrgInviteCondition {
1689
- id?: string | null;
1690
- email?: unknown | null;
1691
- senderId?: string | null;
1692
- receiverId?: string | null;
1693
- inviteToken?: string | null;
1694
- inviteValid?: boolean | null;
1695
- inviteLimit?: number | null;
1696
- inviteCount?: number | null;
1697
- multiple?: boolean | null;
1698
- data?: unknown | null;
1699
- expiresAt?: string | null;
1700
- createdAt?: string | null;
1701
- updatedAt?: string | null;
1702
- entityId?: string | null;
1703
- }
1704
1431
  export type OrgGetManagersRecordsOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'USER_ID_ASC' | 'USER_ID_DESC' | 'DEPTH_ASC' | 'DEPTH_DESC';
1705
1432
  export type OrgGetSubordinatesRecordsOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'USER_ID_ASC' | 'USER_ID_DESC' | 'DEPTH_ASC' | 'DEPTH_DESC';
1706
1433
  export type AppPermissionOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'BITNUM_ASC' | 'BITNUM_DESC' | 'BITSTR_ASC' | 'BITSTR_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC';
@@ -34,21 +34,23 @@ export declare class QueryBuilder<TResult> {
34
34
  getVariables(): Record<string, unknown> | undefined;
35
35
  }
36
36
  export declare function buildSelections(select: Record<string, unknown> | undefined, connectionFieldsMap?: Record<string, Record<string, string>>, entityType?: string): FieldNode[];
37
- export declare function buildFindManyDocument<TSelect, TWhere>(operationName: string, queryField: string, select: TSelect, args: {
37
+ export declare function buildFindManyDocument<TSelect, TWhere, TCondition = never>(operationName: string, queryField: string, select: TSelect, args: {
38
38
  where?: TWhere;
39
+ condition?: TCondition;
39
40
  orderBy?: string[];
40
41
  first?: number;
41
42
  last?: number;
42
43
  after?: string;
43
44
  before?: string;
44
45
  offset?: number;
45
- }, filterTypeName: string, orderByTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>): {
46
+ }, filterTypeName: string, orderByTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>, conditionTypeName?: string): {
46
47
  document: string;
47
48
  variables: Record<string, unknown>;
48
49
  };
49
- export declare function buildFindFirstDocument<TSelect, TWhere>(operationName: string, queryField: string, select: TSelect, args: {
50
+ export declare function buildFindFirstDocument<TSelect, TWhere, TCondition = never>(operationName: string, queryField: string, select: TSelect, args: {
50
51
  where?: TWhere;
51
- }, filterTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>): {
52
+ condition?: TCondition;
53
+ }, filterTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>, conditionTypeName?: string): {
52
54
  document: string;
53
55
  variables: Record<string, unknown>;
54
56
  };
@@ -178,13 +178,18 @@ function buildSelections(select, connectionFieldsMap, entityType) {
178
178
  // ============================================================================
179
179
  // Document Builders
180
180
  // ============================================================================
181
- function buildFindManyDocument(operationName, queryField, select, args, filterTypeName, orderByTypeName, connectionFieldsMap) {
181
+ function buildFindManyDocument(operationName, queryField, select, args, filterTypeName, orderByTypeName, connectionFieldsMap, conditionTypeName) {
182
182
  const selections = select
183
183
  ? buildSelections(select, connectionFieldsMap, operationName)
184
184
  : [t.field({ name: 'id' })];
185
185
  const variableDefinitions = [];
186
186
  const queryArgs = [];
187
187
  const variables = {};
188
+ addVariable({
189
+ varName: 'condition',
190
+ typeName: conditionTypeName,
191
+ value: args.condition,
192
+ }, variableDefinitions, queryArgs, variables);
188
193
  addVariable({
189
194
  varName: 'where',
190
195
  argName: 'filter',
@@ -223,7 +228,7 @@ function buildFindManyDocument(operationName, queryField, select, args, filterTy
223
228
  });
224
229
  return { document: (0, graphql_web_1.print)(document), variables };
225
230
  }
226
- function buildFindFirstDocument(operationName, queryField, select, args, filterTypeName, connectionFieldsMap) {
231
+ function buildFindFirstDocument(operationName, queryField, select, args, filterTypeName, connectionFieldsMap, conditionTypeName) {
227
232
  const selections = select
228
233
  ? buildSelections(select, connectionFieldsMap, operationName)
229
234
  : [t.field({ name: 'id' })];
@@ -232,6 +237,11 @@ function buildFindFirstDocument(operationName, queryField, select, args, filterT
232
237
  const variables = {};
233
238
  // Always add first: 1 for findFirst
234
239
  addVariable({ varName: 'first', typeName: 'Int', value: 1 }, variableDefinitions, queryArgs, variables);
240
+ addVariable({
241
+ varName: 'condition',
242
+ typeName: conditionTypeName,
243
+ value: args.condition,
244
+ }, variableDefinitions, queryArgs, variables);
235
245
  addVariable({
236
246
  varName: 'where',
237
247
  argName: 'filter',
@@ -566,7 +576,7 @@ function buildInputMutationDocument(config) {
566
576
  return (0, graphql_web_1.print)(document);
567
577
  }
568
578
  function addVariable(spec, definitions, args, variables) {
569
- if (spec.value === undefined)
579
+ if (spec.value === undefined || !spec.typeName)
570
580
  return;
571
581
  definitions.push(t.variableDefinition({
572
582
  variable: t.variable({ name: spec.varName }),
@@ -14,9 +14,10 @@ export interface PageInfo {
14
14
  startCursor?: string | null;
15
15
  endCursor?: string | null;
16
16
  }
17
- export interface FindManyArgs<TSelect, TWhere, TOrderBy> {
17
+ export interface FindManyArgs<TSelect, TWhere, TCondition = never, TOrderBy = never> {
18
18
  select?: TSelect;
19
19
  where?: TWhere;
20
+ condition?: TCondition;
20
21
  orderBy?: TOrderBy[];
21
22
  first?: number;
22
23
  last?: number;
@@ -24,9 +25,10 @@ export interface FindManyArgs<TSelect, TWhere, TOrderBy> {
24
25
  before?: string;
25
26
  offset?: number;
26
27
  }
27
- export interface FindFirstArgs<TSelect, TWhere> {
28
+ export interface FindFirstArgs<TSelect, TWhere, TCondition = never> {
28
29
  select?: TSelect;
29
30
  where?: TWhere;
31
+ condition?: TCondition;
30
32
  }
31
33
  export interface CreateArgs<TSelect, TData> {
32
34
  data: TData;
@@ -156,7 +156,7 @@ async function handleCreate(argv, prompter) {
156
156
  skipPrompt: true,
157
157
  },
158
158
  {
159
- type: 'text',
159
+ type: 'boolean',
160
160
  name: 'success',
161
161
  message: 'success',
162
162
  required: true,
@@ -241,7 +241,7 @@ async function handleUpdate(argv, prompter) {
241
241
  skipPrompt: true,
242
242
  },
243
243
  {
244
- type: 'text',
244
+ type: 'boolean',
245
245
  name: 'success',
246
246
  message: 'success',
247
247
  required: false,
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
17
17
  },
18
18
  ]);
19
19
  const client = (0, executor_1.getClient)();
20
- const parsedAnswers = (0, utils_1.parseMutationInput)(answers);
20
+ const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
21
21
  const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
22
22
  const result = await client.mutation
23
23
  .checkPassword(parsedAnswers, {
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
17
17
  },
18
18
  ]);
19
19
  const client = (0, executor_1.getClient)();
20
- const parsedAnswers = (0, utils_1.parseMutationInput)(answers);
20
+ const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
21
21
  const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
22
22
  const result = await client.mutation
23
23
  .confirmDeleteAccount(parsedAnswers, {
@@ -141,13 +141,13 @@ async function handleCreate(argv, prompter) {
141
141
  required: true,
142
142
  },
143
143
  {
144
- type: 'text',
144
+ type: 'json',
145
145
  name: 'details',
146
146
  message: 'details',
147
147
  required: true,
148
148
  },
149
149
  {
150
- type: 'text',
150
+ type: 'boolean',
151
151
  name: 'isVerified',
152
152
  message: 'isVerified',
153
153
  required: false,
@@ -217,13 +217,13 @@ async function handleUpdate(argv, prompter) {
217
217
  required: false,
218
218
  },
219
219
  {
220
- type: 'text',
220
+ type: 'json',
221
221
  name: 'details',
222
222
  message: 'details',
223
223
  required: false,
224
224
  },
225
225
  {
226
- type: 'text',
226
+ type: 'boolean',
227
227
  name: 'isVerified',
228
228
  message: 'isVerified',
229
229
  required: false,
@@ -132,14 +132,14 @@ async function handleCreate(argv, prompter) {
132
132
  required: true,
133
133
  },
134
134
  {
135
- type: 'text',
135
+ type: 'boolean',
136
136
  name: 'isVerified',
137
137
  message: 'isVerified',
138
138
  required: false,
139
139
  skipPrompt: true,
140
140
  },
141
141
  {
142
- type: 'text',
142
+ type: 'boolean',
143
143
  name: 'isPrimary',
144
144
  message: 'isPrimary',
145
145
  required: false,
@@ -201,14 +201,14 @@ async function handleUpdate(argv, prompter) {
201
201
  required: false,
202
202
  },
203
203
  {
204
- type: 'text',
204
+ type: 'boolean',
205
205
  name: 'isVerified',
206
206
  message: 'isVerified',
207
207
  required: false,
208
208
  skipPrompt: true,
209
209
  },
210
210
  {
211
- type: 'text',
211
+ type: 'boolean',
212
212
  name: 'isPrimary',
213
213
  message: 'isPrimary',
214
214
  required: false,
@@ -132,14 +132,14 @@ async function handleCreate(argv, prompter) {
132
132
  required: true,
133
133
  },
134
134
  {
135
- type: 'text',
135
+ type: 'boolean',
136
136
  name: 'isVerified',
137
137
  message: 'isVerified',
138
138
  required: false,
139
139
  skipPrompt: true,
140
140
  },
141
141
  {
142
- type: 'text',
142
+ type: 'boolean',
143
143
  name: 'isPrimary',
144
144
  message: 'isPrimary',
145
145
  required: false,
@@ -201,14 +201,14 @@ async function handleUpdate(argv, prompter) {
201
201
  required: false,
202
202
  },
203
203
  {
204
- type: 'text',
204
+ type: 'boolean',
205
205
  name: 'isVerified',
206
206
  message: 'isVerified',
207
207
  required: false,
208
208
  skipPrompt: true,
209
209
  },
210
210
  {
211
- type: 'text',
211
+ type: 'boolean',
212
212
  name: 'isPrimary',
213
213
  message: 'isPrimary',
214
214
  required: false,
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
17
17
  },
18
18
  ]);
19
19
  const client = (0, executor_1.getClient)();
20
- const parsedAnswers = (0, utils_1.parseMutationInput)(answers);
20
+ const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
21
21
  const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
22
22
  const result = await client.mutation
23
23
  .extendTokenExpires(parsedAnswers, {
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
17
17
  },
18
18
  ]);
19
19
  const client = (0, executor_1.getClient)();
20
- const parsedAnswers = (0, utils_1.parseMutationInput)(answers);
20
+ const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
21
21
  const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
22
22
  const result = await client.mutation
23
23
  .forgotPassword(parsedAnswers, {
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
17
17
  },
18
18
  ]);
19
19
  const client = (0, executor_1.getClient)();
20
- const parsedAnswers = (0, utils_1.parseMutationInput)(answers);
20
+ const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
21
21
  const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
22
22
  const result = await client.mutation
23
23
  .oneTimeToken(parsedAnswers, {
@@ -141,14 +141,14 @@ async function handleCreate(argv, prompter) {
141
141
  required: true,
142
142
  },
143
143
  {
144
- type: 'text',
144
+ type: 'boolean',
145
145
  name: 'isVerified',
146
146
  message: 'isVerified',
147
147
  required: false,
148
148
  skipPrompt: true,
149
149
  },
150
150
  {
151
- type: 'text',
151
+ type: 'boolean',
152
152
  name: 'isPrimary',
153
153
  message: 'isPrimary',
154
154
  required: false,
@@ -218,14 +218,14 @@ async function handleUpdate(argv, prompter) {
218
218
  required: false,
219
219
  },
220
220
  {
221
- type: 'text',
221
+ type: 'boolean',
222
222
  name: 'isVerified',
223
223
  message: 'isVerified',
224
224
  required: false,
225
225
  skipPrompt: true,
226
226
  },
227
227
  {
228
- type: 'text',
228
+ type: 'boolean',
229
229
  name: 'isPrimary',
230
230
  message: 'isPrimary',
231
231
  required: false,
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
17
17
  },
18
18
  ]);
19
19
  const client = (0, executor_1.getClient)();
20
- const parsedAnswers = (0, utils_1.parseMutationInput)(answers);
20
+ const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
21
21
  const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
22
22
  const result = await client.mutation
23
23
  .resetPassword(parsedAnswers, {
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
17
17
  },
18
18
  ]);
19
19
  const client = (0, executor_1.getClient)();
20
- const parsedAnswers = (0, utils_1.parseMutationInput)(answers);
20
+ const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
21
21
  const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
22
22
  const result = await client.mutation
23
23
  .sendAccountDeletionEmail(parsedAnswers, {
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
17
17
  },
18
18
  ]);
19
19
  const client = (0, executor_1.getClient)();
20
- const parsedAnswers = (0, utils_1.parseMutationInput)(answers);
20
+ const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
21
21
  const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
22
22
  const result = await client.mutation
23
23
  .sendVerificationEmail(parsedAnswers, {