@constructive-sdk/cli 0.20.4 → 0.20.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/admin/cli/commands/{request-upload-url.d.ts → app-limit-cap.d.ts} +1 -1
  2. package/admin/cli/commands/app-limit-cap.js +272 -0
  3. package/{esm/admin/cli/commands/request-upload-url.d.ts → admin/cli/commands/app-limit-caps-default.d.ts} +1 -1
  4. package/admin/cli/commands/app-limit-caps-default.js +252 -0
  5. package/{auth/cli/commands/request-upload-url.d.ts → admin/cli/commands/app-limit-credit-code-item.d.ts} +1 -1
  6. package/admin/cli/commands/app-limit-credit-code-item.js +292 -0
  7. package/{esm/auth/cli/commands/request-upload-url.d.ts → admin/cli/commands/app-limit-credit-code.d.ts} +1 -1
  8. package/admin/cli/commands/app-limit-credit-code.js +296 -0
  9. package/admin/cli/commands/app-limit-credit-redemption.d.ts +8 -0
  10. package/admin/cli/commands/app-limit-credit-redemption.js +250 -0
  11. package/admin/cli/commands/app-limit-credit.d.ts +8 -0
  12. package/admin/cli/commands/app-limit-credit.js +316 -0
  13. package/admin/cli/commands/app-limit.js +66 -0
  14. package/admin/cli/commands/org-limit-aggregate.js +88 -0
  15. package/admin/cli/commands/org-limit-cap.d.ts +8 -0
  16. package/admin/cli/commands/org-limit-cap.js +272 -0
  17. package/admin/cli/commands/org-limit-caps-default.d.ts +8 -0
  18. package/admin/cli/commands/org-limit-caps-default.js +252 -0
  19. package/admin/cli/commands/org-limit-credit.d.ts +8 -0
  20. package/admin/cli/commands/org-limit-credit.js +338 -0
  21. package/admin/cli/commands/org-limit.js +66 -0
  22. package/admin/cli/commands.js +25 -9
  23. package/admin/cli/executor.d.ts +12 -8
  24. package/admin/orm/index.d.ts +24 -11
  25. package/admin/orm/index.js +24 -6
  26. package/admin/orm/input-types.d.ts +2108 -545
  27. package/admin/orm/input-types.js +13 -1
  28. package/admin/orm/models/appLimitCap.d.ts +56 -0
  29. package/admin/orm/models/appLimitCap.js +100 -0
  30. package/admin/orm/models/appLimitCapsDefault.d.ts +56 -0
  31. package/admin/orm/models/appLimitCapsDefault.js +100 -0
  32. package/admin/orm/models/appLimitCredit.d.ts +56 -0
  33. package/admin/orm/models/appLimitCredit.js +100 -0
  34. package/admin/orm/models/appLimitCreditCode.d.ts +56 -0
  35. package/admin/orm/models/appLimitCreditCode.js +100 -0
  36. package/admin/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  37. package/admin/orm/models/appLimitCreditCodeItem.js +100 -0
  38. package/admin/orm/models/appLimitCreditRedemption.d.ts +56 -0
  39. package/admin/orm/models/appLimitCreditRedemption.js +100 -0
  40. package/admin/orm/models/index.d.ts +12 -3
  41. package/admin/orm/models/index.js +25 -7
  42. package/admin/orm/models/orgLimitCap.d.ts +56 -0
  43. package/admin/orm/models/orgLimitCap.js +100 -0
  44. package/admin/orm/models/orgLimitCapsDefault.d.ts +56 -0
  45. package/admin/orm/models/orgLimitCapsDefault.js +100 -0
  46. package/admin/orm/models/orgLimitCredit.d.ts +56 -0
  47. package/admin/orm/models/orgLimitCredit.js +100 -0
  48. package/admin/orm/mutation/index.d.ts +1 -16
  49. package/admin/orm/mutation/index.js +0 -12
  50. package/admin/orm/query-builder.js +24 -0
  51. package/auth/cli/commands.js +1 -3
  52. package/auth/cli/executor.d.ts +0 -5
  53. package/auth/orm/index.d.ts +0 -5
  54. package/auth/orm/input-types.d.ts +0 -38
  55. package/auth/orm/mutation/index.d.ts +1 -16
  56. package/auth/orm/mutation/index.js +0 -12
  57. package/auth/orm/query-builder.js +24 -0
  58. package/esm/admin/cli/commands/app-limit-cap.d.ts +8 -0
  59. package/esm/admin/cli/commands/app-limit-cap.js +270 -0
  60. package/esm/admin/cli/commands/app-limit-caps-default.d.ts +8 -0
  61. package/esm/admin/cli/commands/app-limit-caps-default.js +250 -0
  62. package/esm/admin/cli/commands/app-limit-credit-code-item.d.ts +8 -0
  63. package/esm/admin/cli/commands/app-limit-credit-code-item.js +290 -0
  64. package/esm/admin/cli/commands/app-limit-credit-code.d.ts +8 -0
  65. package/esm/admin/cli/commands/app-limit-credit-code.js +294 -0
  66. package/esm/admin/cli/commands/app-limit-credit-redemption.d.ts +8 -0
  67. package/esm/admin/cli/commands/app-limit-credit-redemption.js +248 -0
  68. package/esm/admin/cli/commands/app-limit-credit.d.ts +8 -0
  69. package/esm/admin/cli/commands/app-limit-credit.js +314 -0
  70. package/esm/admin/cli/commands/app-limit.js +66 -0
  71. package/esm/admin/cli/commands/org-limit-aggregate.js +88 -0
  72. package/esm/admin/cli/commands/org-limit-cap.d.ts +8 -0
  73. package/esm/admin/cli/commands/org-limit-cap.js +270 -0
  74. package/esm/admin/cli/commands/org-limit-caps-default.d.ts +8 -0
  75. package/esm/admin/cli/commands/org-limit-caps-default.js +250 -0
  76. package/esm/admin/cli/commands/org-limit-credit.d.ts +8 -0
  77. package/esm/admin/cli/commands/org-limit-credit.js +336 -0
  78. package/esm/admin/cli/commands/org-limit.js +66 -0
  79. package/esm/admin/cli/commands.js +25 -9
  80. package/esm/admin/cli/executor.d.ts +12 -8
  81. package/esm/admin/orm/index.d.ts +24 -11
  82. package/esm/admin/orm/index.js +24 -6
  83. package/esm/admin/orm/input-types.d.ts +2108 -545
  84. package/esm/admin/orm/input-types.js +13 -1
  85. package/esm/admin/orm/models/appLimitCap.d.ts +56 -0
  86. package/esm/admin/orm/models/appLimitCap.js +96 -0
  87. package/esm/admin/orm/models/appLimitCapsDefault.d.ts +56 -0
  88. package/esm/admin/orm/models/appLimitCapsDefault.js +96 -0
  89. package/esm/admin/orm/models/appLimitCredit.d.ts +56 -0
  90. package/esm/admin/orm/models/appLimitCredit.js +96 -0
  91. package/esm/admin/orm/models/appLimitCreditCode.d.ts +56 -0
  92. package/esm/admin/orm/models/appLimitCreditCode.js +96 -0
  93. package/esm/admin/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  94. package/esm/admin/orm/models/appLimitCreditCodeItem.js +96 -0
  95. package/esm/admin/orm/models/appLimitCreditRedemption.d.ts +56 -0
  96. package/esm/admin/orm/models/appLimitCreditRedemption.js +96 -0
  97. package/esm/admin/orm/models/index.d.ts +12 -3
  98. package/esm/admin/orm/models/index.js +12 -3
  99. package/esm/admin/orm/models/orgLimitCap.d.ts +56 -0
  100. package/esm/admin/orm/models/orgLimitCap.js +96 -0
  101. package/esm/admin/orm/models/orgLimitCapsDefault.d.ts +56 -0
  102. package/esm/admin/orm/models/orgLimitCapsDefault.js +96 -0
  103. package/esm/admin/orm/models/orgLimitCredit.d.ts +56 -0
  104. package/esm/admin/orm/models/orgLimitCredit.js +96 -0
  105. package/esm/admin/orm/mutation/index.d.ts +1 -16
  106. package/esm/admin/orm/mutation/index.js +0 -12
  107. package/esm/admin/orm/query-builder.js +24 -0
  108. package/esm/auth/cli/commands.js +1 -3
  109. package/esm/auth/cli/executor.d.ts +0 -5
  110. package/esm/auth/orm/index.d.ts +0 -5
  111. package/esm/auth/orm/input-types.d.ts +0 -38
  112. package/esm/auth/orm/mutation/index.d.ts +1 -16
  113. package/esm/auth/orm/mutation/index.js +0 -12
  114. package/esm/auth/orm/query-builder.js +24 -0
  115. package/esm/objects/cli/commands.js +1 -3
  116. package/esm/objects/cli/executor.d.ts +0 -5
  117. package/esm/objects/orm/index.d.ts +0 -5
  118. package/esm/objects/orm/input-types.d.ts +0 -38
  119. package/esm/objects/orm/mutation/index.d.ts +1 -16
  120. package/esm/objects/orm/mutation/index.js +0 -12
  121. package/esm/objects/orm/query-builder.js +24 -0
  122. package/esm/public/cli/commands/api-setting.d.ts +8 -0
  123. package/esm/public/cli/commands/api-setting.js +468 -0
  124. package/esm/public/cli/commands/app-limit-cap.d.ts +8 -0
  125. package/esm/public/cli/commands/app-limit-cap.js +270 -0
  126. package/esm/public/cli/commands/app-limit-caps-default.d.ts +8 -0
  127. package/esm/public/cli/commands/app-limit-caps-default.js +250 -0
  128. package/esm/public/cli/commands/app-limit-credit-code-item.d.ts +8 -0
  129. package/esm/public/cli/commands/app-limit-credit-code-item.js +290 -0
  130. package/esm/public/cli/commands/app-limit-credit-code.d.ts +8 -0
  131. package/esm/public/cli/commands/app-limit-credit-code.js +294 -0
  132. package/esm/public/cli/commands/app-limit-credit-redemption.d.ts +8 -0
  133. package/esm/public/cli/commands/app-limit-credit-redemption.js +248 -0
  134. package/esm/public/cli/commands/app-limit-credit.d.ts +8 -0
  135. package/esm/public/cli/commands/app-limit-credit.js +314 -0
  136. package/esm/public/cli/commands/app-limit.js +66 -0
  137. package/esm/public/cli/commands/append-smart-tags.d.ts +8 -0
  138. package/esm/{admin/cli/commands/request-upload-url.js → public/cli/commands/append-smart-tags.js} +3 -3
  139. package/esm/public/cli/commands/billing-provider-module.d.ts +8 -0
  140. package/esm/public/cli/commands/billing-provider-module.js +624 -0
  141. package/esm/public/cli/commands/cors-setting.d.ts +8 -0
  142. package/esm/public/cli/commands/cors-setting.js +272 -0
  143. package/esm/public/cli/commands/database-setting.d.ts +8 -0
  144. package/esm/public/cli/commands/database-setting.js +448 -0
  145. package/esm/public/cli/commands/entity-type-provision.js +22 -0
  146. package/esm/public/cli/commands/function.d.ts +8 -0
  147. package/esm/public/cli/commands/function.js +268 -0
  148. package/esm/public/cli/commands/limits-module.js +198 -0
  149. package/esm/public/cli/commands/org-limit-aggregate.js +88 -0
  150. package/esm/public/cli/commands/org-limit-cap.d.ts +8 -0
  151. package/esm/public/cli/commands/org-limit-cap.js +270 -0
  152. package/esm/public/cli/commands/org-limit-caps-default.d.ts +8 -0
  153. package/esm/public/cli/commands/org-limit-caps-default.js +250 -0
  154. package/esm/public/cli/commands/org-limit-credit.d.ts +8 -0
  155. package/esm/public/cli/commands/org-limit-credit.js +336 -0
  156. package/esm/public/cli/commands/org-limit.js +66 -0
  157. package/esm/public/cli/commands/partition.d.ts +8 -0
  158. package/esm/public/cli/commands/partition.js +388 -0
  159. package/esm/public/cli/commands/plans-module.js +44 -0
  160. package/esm/public/cli/commands/pubkey-setting.d.ts +8 -0
  161. package/esm/public/cli/commands/pubkey-setting.js +382 -0
  162. package/esm/public/cli/commands/rls-setting.d.ts +8 -0
  163. package/esm/public/cli/commands/rls-setting.js +404 -0
  164. package/esm/public/cli/commands/storage-module.js +198 -0
  165. package/esm/public/cli/commands/webauthn-setting.d.ts +8 -0
  166. package/esm/public/cli/commands/webauthn-setting.js +580 -0
  167. package/esm/public/cli/commands.js +41 -5
  168. package/esm/public/cli/executor.d.ts +24 -6
  169. package/esm/public/orm/index.d.ts +43 -7
  170. package/esm/public/orm/index.js +38 -2
  171. package/esm/public/orm/input-types.d.ts +4601 -321
  172. package/esm/public/orm/input-types.js +21 -0
  173. package/esm/public/orm/models/apiSetting.d.ts +56 -0
  174. package/esm/public/orm/models/apiSetting.js +96 -0
  175. package/esm/public/orm/models/appLimitCap.d.ts +56 -0
  176. package/esm/public/orm/models/appLimitCap.js +96 -0
  177. package/esm/public/orm/models/appLimitCapsDefault.d.ts +56 -0
  178. package/esm/public/orm/models/appLimitCapsDefault.js +96 -0
  179. package/esm/public/orm/models/appLimitCredit.d.ts +56 -0
  180. package/esm/public/orm/models/appLimitCredit.js +96 -0
  181. package/esm/public/orm/models/appLimitCreditCode.d.ts +56 -0
  182. package/esm/public/orm/models/appLimitCreditCode.js +96 -0
  183. package/esm/public/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  184. package/esm/public/orm/models/appLimitCreditCodeItem.js +96 -0
  185. package/esm/public/orm/models/appLimitCreditRedemption.d.ts +56 -0
  186. package/esm/public/orm/models/appLimitCreditRedemption.js +96 -0
  187. package/esm/public/orm/models/billingProviderModule.d.ts +56 -0
  188. package/esm/public/orm/models/billingProviderModule.js +96 -0
  189. package/esm/public/orm/models/corsSetting.d.ts +56 -0
  190. package/esm/public/orm/models/corsSetting.js +96 -0
  191. package/esm/public/orm/models/databaseSetting.d.ts +56 -0
  192. package/esm/public/orm/models/databaseSetting.js +96 -0
  193. package/esm/public/orm/models/function.d.ts +56 -0
  194. package/esm/public/orm/models/function.js +96 -0
  195. package/esm/public/orm/models/index.d.ts +19 -1
  196. package/esm/public/orm/models/index.js +19 -1
  197. package/esm/public/orm/models/orgLimitCap.d.ts +56 -0
  198. package/esm/public/orm/models/orgLimitCap.js +96 -0
  199. package/esm/public/orm/models/orgLimitCapsDefault.d.ts +56 -0
  200. package/esm/public/orm/models/orgLimitCapsDefault.js +96 -0
  201. package/esm/public/orm/models/orgLimitCredit.d.ts +56 -0
  202. package/esm/public/orm/models/orgLimitCredit.js +96 -0
  203. package/esm/public/orm/models/partition.d.ts +56 -0
  204. package/esm/public/orm/models/partition.js +96 -0
  205. package/esm/public/orm/models/pubkeySetting.d.ts +56 -0
  206. package/esm/public/orm/models/pubkeySetting.js +96 -0
  207. package/esm/public/orm/models/rlsSetting.d.ts +56 -0
  208. package/esm/public/orm/models/rlsSetting.js +96 -0
  209. package/esm/public/orm/models/webauthnSetting.d.ts +56 -0
  210. package/esm/public/orm/models/webauthnSetting.js +96 -0
  211. package/esm/public/orm/mutation/index.d.ts +9 -16
  212. package/esm/public/orm/mutation/index.js +12 -12
  213. package/esm/public/orm/query-builder.js +24 -0
  214. package/objects/cli/commands.js +1 -3
  215. package/objects/cli/executor.d.ts +0 -5
  216. package/objects/orm/index.d.ts +0 -5
  217. package/objects/orm/input-types.d.ts +0 -38
  218. package/objects/orm/mutation/index.d.ts +1 -16
  219. package/objects/orm/mutation/index.js +0 -12
  220. package/objects/orm/query-builder.js +24 -0
  221. package/package.json +4 -4
  222. package/public/cli/commands/api-setting.d.ts +8 -0
  223. package/public/cli/commands/api-setting.js +470 -0
  224. package/public/cli/commands/app-limit-cap.d.ts +8 -0
  225. package/public/cli/commands/app-limit-cap.js +272 -0
  226. package/public/cli/commands/app-limit-caps-default.d.ts +8 -0
  227. package/public/cli/commands/app-limit-caps-default.js +252 -0
  228. package/public/cli/commands/app-limit-credit-code-item.d.ts +8 -0
  229. package/public/cli/commands/app-limit-credit-code-item.js +292 -0
  230. package/public/cli/commands/app-limit-credit-code.d.ts +8 -0
  231. package/public/cli/commands/app-limit-credit-code.js +296 -0
  232. package/public/cli/commands/app-limit-credit-redemption.d.ts +8 -0
  233. package/public/cli/commands/app-limit-credit-redemption.js +250 -0
  234. package/public/cli/commands/app-limit-credit.d.ts +8 -0
  235. package/public/cli/commands/app-limit-credit.js +316 -0
  236. package/public/cli/commands/app-limit.js +66 -0
  237. package/public/cli/commands/append-smart-tags.d.ts +8 -0
  238. package/{objects/cli/commands/request-upload-url.js → public/cli/commands/append-smart-tags.js} +3 -3
  239. package/public/cli/commands/billing-provider-module.d.ts +8 -0
  240. package/public/cli/commands/billing-provider-module.js +626 -0
  241. package/public/cli/commands/cors-setting.d.ts +8 -0
  242. package/public/cli/commands/cors-setting.js +274 -0
  243. package/public/cli/commands/database-setting.d.ts +8 -0
  244. package/public/cli/commands/database-setting.js +450 -0
  245. package/public/cli/commands/entity-type-provision.js +22 -0
  246. package/public/cli/commands/function.d.ts +8 -0
  247. package/public/cli/commands/function.js +270 -0
  248. package/public/cli/commands/limits-module.js +198 -0
  249. package/public/cli/commands/org-limit-aggregate.js +88 -0
  250. package/public/cli/commands/org-limit-cap.d.ts +8 -0
  251. package/public/cli/commands/org-limit-cap.js +272 -0
  252. package/public/cli/commands/org-limit-caps-default.d.ts +8 -0
  253. package/public/cli/commands/org-limit-caps-default.js +252 -0
  254. package/public/cli/commands/org-limit-credit.d.ts +8 -0
  255. package/public/cli/commands/org-limit-credit.js +338 -0
  256. package/public/cli/commands/org-limit.js +66 -0
  257. package/public/cli/commands/partition.d.ts +8 -0
  258. package/public/cli/commands/partition.js +390 -0
  259. package/public/cli/commands/plans-module.js +44 -0
  260. package/public/cli/commands/pubkey-setting.d.ts +8 -0
  261. package/public/cli/commands/pubkey-setting.js +384 -0
  262. package/public/cli/commands/rls-setting.d.ts +8 -0
  263. package/public/cli/commands/rls-setting.js +406 -0
  264. package/public/cli/commands/storage-module.js +198 -0
  265. package/public/cli/commands/webauthn-setting.d.ts +8 -0
  266. package/public/cli/commands/webauthn-setting.js +582 -0
  267. package/public/cli/commands.js +41 -5
  268. package/public/cli/executor.d.ts +24 -6
  269. package/public/orm/index.d.ts +43 -7
  270. package/public/orm/index.js +38 -2
  271. package/public/orm/input-types.d.ts +4601 -321
  272. package/public/orm/input-types.js +21 -0
  273. package/public/orm/models/apiSetting.d.ts +56 -0
  274. package/public/orm/models/apiSetting.js +100 -0
  275. package/public/orm/models/appLimitCap.d.ts +56 -0
  276. package/public/orm/models/appLimitCap.js +100 -0
  277. package/public/orm/models/appLimitCapsDefault.d.ts +56 -0
  278. package/public/orm/models/appLimitCapsDefault.js +100 -0
  279. package/public/orm/models/appLimitCredit.d.ts +56 -0
  280. package/public/orm/models/appLimitCredit.js +100 -0
  281. package/public/orm/models/appLimitCreditCode.d.ts +56 -0
  282. package/public/orm/models/appLimitCreditCode.js +100 -0
  283. package/public/orm/models/appLimitCreditCodeItem.d.ts +56 -0
  284. package/public/orm/models/appLimitCreditCodeItem.js +100 -0
  285. package/public/orm/models/appLimitCreditRedemption.d.ts +56 -0
  286. package/public/orm/models/appLimitCreditRedemption.js +100 -0
  287. package/public/orm/models/billingProviderModule.d.ts +56 -0
  288. package/public/orm/models/billingProviderModule.js +100 -0
  289. package/public/orm/models/corsSetting.d.ts +56 -0
  290. package/public/orm/models/corsSetting.js +100 -0
  291. package/public/orm/models/databaseSetting.d.ts +56 -0
  292. package/public/orm/models/databaseSetting.js +100 -0
  293. package/public/orm/models/function.d.ts +56 -0
  294. package/public/orm/models/function.js +100 -0
  295. package/public/orm/models/index.d.ts +19 -1
  296. package/public/orm/models/index.js +41 -5
  297. package/public/orm/models/orgLimitCap.d.ts +56 -0
  298. package/public/orm/models/orgLimitCap.js +100 -0
  299. package/public/orm/models/orgLimitCapsDefault.d.ts +56 -0
  300. package/public/orm/models/orgLimitCapsDefault.js +100 -0
  301. package/public/orm/models/orgLimitCredit.d.ts +56 -0
  302. package/public/orm/models/orgLimitCredit.js +100 -0
  303. package/public/orm/models/partition.d.ts +56 -0
  304. package/public/orm/models/partition.js +100 -0
  305. package/public/orm/models/pubkeySetting.d.ts +56 -0
  306. package/public/orm/models/pubkeySetting.js +100 -0
  307. package/public/orm/models/rlsSetting.d.ts +56 -0
  308. package/public/orm/models/rlsSetting.js +100 -0
  309. package/public/orm/models/webauthnSetting.d.ts +56 -0
  310. package/public/orm/models/webauthnSetting.js +100 -0
  311. package/public/orm/mutation/index.d.ts +9 -16
  312. package/public/orm/mutation/index.js +12 -12
  313. package/public/orm/query-builder.js +24 -0
  314. package/admin/cli/commands/request-upload-url.js +0 -36
  315. package/auth/cli/commands/request-upload-url.js +0 -36
  316. package/esm/auth/cli/commands/request-upload-url.js +0 -34
  317. package/esm/objects/cli/commands/request-upload-url.d.ts +0 -8
  318. package/esm/objects/cli/commands/request-upload-url.js +0 -34
  319. package/esm/public/cli/commands/request-upload-url.d.ts +0 -8
  320. package/esm/public/cli/commands/request-upload-url.js +0 -34
  321. package/objects/cli/commands/request-upload-url.d.ts +0 -8
  322. package/public/cli/commands/request-upload-url.d.ts +0 -8
  323. package/public/cli/commands/request-upload-url.js +0 -36
@@ -0,0 +1,96 @@
1
+ import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, buildUpdateByPkDocument, buildDeleteByPkDocument, } from '../query-builder';
2
+ import { connectionFieldsMap } from '../input-types';
3
+ export class OrgLimitCapsDefaultModel {
4
+ client;
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ findMany(args) {
9
+ const { document, variables } = buildFindManyDocument('OrgLimitCapsDefault', 'orgLimitCapsDefaults', args.select, {
10
+ where: args?.where,
11
+ orderBy: args?.orderBy,
12
+ first: args?.first,
13
+ last: args?.last,
14
+ after: args?.after,
15
+ before: args?.before,
16
+ offset: args?.offset,
17
+ }, 'OrgLimitCapsDefaultFilter', 'OrgLimitCapsDefaultOrderBy', connectionFieldsMap);
18
+ return new QueryBuilder({
19
+ client: this.client,
20
+ operation: 'query',
21
+ operationName: 'OrgLimitCapsDefault',
22
+ fieldName: 'orgLimitCapsDefaults',
23
+ document,
24
+ variables,
25
+ });
26
+ }
27
+ findFirst(args) {
28
+ const { document, variables } = buildFindFirstDocument('OrgLimitCapsDefault', 'orgLimitCapsDefaults', args.select, {
29
+ where: args?.where,
30
+ }, 'OrgLimitCapsDefaultFilter', connectionFieldsMap);
31
+ return new QueryBuilder({
32
+ client: this.client,
33
+ operation: 'query',
34
+ operationName: 'OrgLimitCapsDefault',
35
+ fieldName: 'orgLimitCapsDefaults',
36
+ document,
37
+ variables,
38
+ });
39
+ }
40
+ findOne(args) {
41
+ const { document, variables } = buildFindManyDocument('OrgLimitCapsDefault', 'orgLimitCapsDefaults', args.select, {
42
+ where: {
43
+ id: {
44
+ equalTo: args.id,
45
+ },
46
+ },
47
+ first: 1,
48
+ }, 'OrgLimitCapsDefaultFilter', 'OrgLimitCapsDefaultOrderBy', connectionFieldsMap);
49
+ return new QueryBuilder({
50
+ client: this.client,
51
+ operation: 'query',
52
+ operationName: 'OrgLimitCapsDefault',
53
+ fieldName: 'orgLimitCapsDefault',
54
+ document,
55
+ variables,
56
+ transform: (data) => ({
57
+ orgLimitCapsDefault: data.orgLimitCapsDefaults?.nodes?.[0] ?? null,
58
+ }),
59
+ });
60
+ }
61
+ create(args) {
62
+ const { document, variables } = buildCreateDocument('OrgLimitCapsDefault', 'createOrgLimitCapsDefault', 'orgLimitCapsDefault', args.select, args.data, 'CreateOrgLimitCapsDefaultInput', connectionFieldsMap);
63
+ return new QueryBuilder({
64
+ client: this.client,
65
+ operation: 'mutation',
66
+ operationName: 'OrgLimitCapsDefault',
67
+ fieldName: 'createOrgLimitCapsDefault',
68
+ document,
69
+ variables,
70
+ });
71
+ }
72
+ update(args) {
73
+ const { document, variables } = buildUpdateByPkDocument('OrgLimitCapsDefault', 'updateOrgLimitCapsDefault', 'orgLimitCapsDefault', args.select, args.where.id, args.data, 'UpdateOrgLimitCapsDefaultInput', 'id', 'orgLimitCapsDefaultPatch', connectionFieldsMap);
74
+ return new QueryBuilder({
75
+ client: this.client,
76
+ operation: 'mutation',
77
+ operationName: 'OrgLimitCapsDefault',
78
+ fieldName: 'updateOrgLimitCapsDefault',
79
+ document,
80
+ variables,
81
+ });
82
+ }
83
+ delete(args) {
84
+ const { document, variables } = buildDeleteByPkDocument('OrgLimitCapsDefault', 'deleteOrgLimitCapsDefault', 'orgLimitCapsDefault', {
85
+ id: args.where.id,
86
+ }, 'DeleteOrgLimitCapsDefaultInput', args.select, connectionFieldsMap);
87
+ return new QueryBuilder({
88
+ client: this.client,
89
+ operation: 'mutation',
90
+ operationName: 'OrgLimitCapsDefault',
91
+ fieldName: 'deleteOrgLimitCapsDefault',
92
+ document,
93
+ variables,
94
+ });
95
+ }
96
+ }
@@ -0,0 +1,56 @@
1
+ /**
2
+ * OrgLimitCredit model for ORM client
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { OrmClient } from '../client';
7
+ import { QueryBuilder } from '../query-builder';
8
+ import type { ConnectionResult, FindManyArgs, FindFirstArgs, CreateArgs, UpdateArgs, DeleteArgs, InferSelectResult, StrictSelect } from '../select-types';
9
+ import type { OrgLimitCreditWithRelations, OrgLimitCreditSelect, OrgLimitCreditFilter, OrgLimitCreditOrderBy, CreateOrgLimitCreditInput, OrgLimitCreditPatch } from '../input-types';
10
+ export declare class OrgLimitCreditModel {
11
+ private client;
12
+ constructor(client: OrmClient);
13
+ findMany<S extends OrgLimitCreditSelect>(args: FindManyArgs<S, OrgLimitCreditFilter, OrgLimitCreditOrderBy> & {
14
+ select: S;
15
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
16
+ orgLimitCredits: ConnectionResult<InferSelectResult<OrgLimitCreditWithRelations, S>>;
17
+ }>;
18
+ findFirst<S extends OrgLimitCreditSelect>(args: FindFirstArgs<S, OrgLimitCreditFilter> & {
19
+ select: S;
20
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
21
+ orgLimitCredits: {
22
+ nodes: InferSelectResult<OrgLimitCreditWithRelations, S>[];
23
+ };
24
+ }>;
25
+ findOne<S extends OrgLimitCreditSelect>(args: {
26
+ id: string;
27
+ select: S;
28
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
29
+ orgLimitCredit: InferSelectResult<OrgLimitCreditWithRelations, S> | null;
30
+ }>;
31
+ create<S extends OrgLimitCreditSelect>(args: CreateArgs<S, CreateOrgLimitCreditInput['orgLimitCredit']> & {
32
+ select: S;
33
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
34
+ createOrgLimitCredit: {
35
+ orgLimitCredit: InferSelectResult<OrgLimitCreditWithRelations, S>;
36
+ };
37
+ }>;
38
+ update<S extends OrgLimitCreditSelect>(args: UpdateArgs<S, {
39
+ id: string;
40
+ }, OrgLimitCreditPatch> & {
41
+ select: S;
42
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
43
+ updateOrgLimitCredit: {
44
+ orgLimitCredit: InferSelectResult<OrgLimitCreditWithRelations, S>;
45
+ };
46
+ }>;
47
+ delete<S extends OrgLimitCreditSelect>(args: DeleteArgs<{
48
+ id: string;
49
+ }, S> & {
50
+ select: S;
51
+ } & StrictSelect<S, OrgLimitCreditSelect>): QueryBuilder<{
52
+ deleteOrgLimitCredit: {
53
+ orgLimitCredit: InferSelectResult<OrgLimitCreditWithRelations, S>;
54
+ };
55
+ }>;
56
+ }
@@ -0,0 +1,96 @@
1
+ import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, buildUpdateByPkDocument, buildDeleteByPkDocument, } from '../query-builder';
2
+ import { connectionFieldsMap } from '../input-types';
3
+ export class OrgLimitCreditModel {
4
+ client;
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ findMany(args) {
9
+ const { document, variables } = buildFindManyDocument('OrgLimitCredit', 'orgLimitCredits', args.select, {
10
+ where: args?.where,
11
+ orderBy: args?.orderBy,
12
+ first: args?.first,
13
+ last: args?.last,
14
+ after: args?.after,
15
+ before: args?.before,
16
+ offset: args?.offset,
17
+ }, 'OrgLimitCreditFilter', 'OrgLimitCreditOrderBy', connectionFieldsMap);
18
+ return new QueryBuilder({
19
+ client: this.client,
20
+ operation: 'query',
21
+ operationName: 'OrgLimitCredit',
22
+ fieldName: 'orgLimitCredits',
23
+ document,
24
+ variables,
25
+ });
26
+ }
27
+ findFirst(args) {
28
+ const { document, variables } = buildFindFirstDocument('OrgLimitCredit', 'orgLimitCredits', args.select, {
29
+ where: args?.where,
30
+ }, 'OrgLimitCreditFilter', connectionFieldsMap);
31
+ return new QueryBuilder({
32
+ client: this.client,
33
+ operation: 'query',
34
+ operationName: 'OrgLimitCredit',
35
+ fieldName: 'orgLimitCredits',
36
+ document,
37
+ variables,
38
+ });
39
+ }
40
+ findOne(args) {
41
+ const { document, variables } = buildFindManyDocument('OrgLimitCredit', 'orgLimitCredits', args.select, {
42
+ where: {
43
+ id: {
44
+ equalTo: args.id,
45
+ },
46
+ },
47
+ first: 1,
48
+ }, 'OrgLimitCreditFilter', 'OrgLimitCreditOrderBy', connectionFieldsMap);
49
+ return new QueryBuilder({
50
+ client: this.client,
51
+ operation: 'query',
52
+ operationName: 'OrgLimitCredit',
53
+ fieldName: 'orgLimitCredit',
54
+ document,
55
+ variables,
56
+ transform: (data) => ({
57
+ orgLimitCredit: data.orgLimitCredits?.nodes?.[0] ?? null,
58
+ }),
59
+ });
60
+ }
61
+ create(args) {
62
+ const { document, variables } = buildCreateDocument('OrgLimitCredit', 'createOrgLimitCredit', 'orgLimitCredit', args.select, args.data, 'CreateOrgLimitCreditInput', connectionFieldsMap);
63
+ return new QueryBuilder({
64
+ client: this.client,
65
+ operation: 'mutation',
66
+ operationName: 'OrgLimitCredit',
67
+ fieldName: 'createOrgLimitCredit',
68
+ document,
69
+ variables,
70
+ });
71
+ }
72
+ update(args) {
73
+ const { document, variables } = buildUpdateByPkDocument('OrgLimitCredit', 'updateOrgLimitCredit', 'orgLimitCredit', args.select, args.where.id, args.data, 'UpdateOrgLimitCreditInput', 'id', 'orgLimitCreditPatch', connectionFieldsMap);
74
+ return new QueryBuilder({
75
+ client: this.client,
76
+ operation: 'mutation',
77
+ operationName: 'OrgLimitCredit',
78
+ fieldName: 'updateOrgLimitCredit',
79
+ document,
80
+ variables,
81
+ });
82
+ }
83
+ delete(args) {
84
+ const { document, variables } = buildDeleteByPkDocument('OrgLimitCredit', 'deleteOrgLimitCredit', 'orgLimitCredit', {
85
+ id: args.where.id,
86
+ }, 'DeleteOrgLimitCreditInput', args.select, connectionFieldsMap);
87
+ return new QueryBuilder({
88
+ client: this.client,
89
+ operation: 'mutation',
90
+ operationName: 'OrgLimitCredit',
91
+ fieldName: 'deleteOrgLimitCredit',
92
+ document,
93
+ variables,
94
+ });
95
+ }
96
+ }
@@ -6,23 +6,13 @@
6
6
  import { OrmClient } from '../client';
7
7
  import { QueryBuilder } from '../query-builder';
8
8
  import type { InferSelectResult, StrictSelect } from '../select-types';
9
- import type { SubmitAppInviteCodeInput, SubmitOrgInviteCodeInput, RequestUploadUrlInput, ProvisionBucketInput, SubmitAppInviteCodePayload, SubmitOrgInviteCodePayload, RequestUploadUrlPayload, ProvisionBucketPayload, SubmitAppInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, RequestUploadUrlPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
9
+ import type { SubmitAppInviteCodeInput, SubmitOrgInviteCodeInput, ProvisionBucketInput, SubmitAppInviteCodePayload, SubmitOrgInviteCodePayload, ProvisionBucketPayload, SubmitAppInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
10
10
  export interface SubmitAppInviteCodeVariables {
11
11
  input: SubmitAppInviteCodeInput;
12
12
  }
13
13
  export interface SubmitOrgInviteCodeVariables {
14
14
  input: SubmitOrgInviteCodeInput;
15
15
  }
16
- /**
17
- * Variables for requestUploadUrl
18
- * Request a presigned URL for uploading a file directly to S3.
19
- Client computes SHA-256 of the file content and provides it here.
20
- If a file with the same hash already exists (dedup), returns the
21
- existing file ID and deduplicated=true with no uploadUrl.
22
- */
23
- export interface RequestUploadUrlVariables {
24
- input: RequestUploadUrlInput;
25
- }
26
16
  /**
27
17
  * Variables for provisionBucket
28
18
  * Provision an S3 bucket for a logical bucket in the database.
@@ -44,11 +34,6 @@ export declare function createMutationOperations(client: OrmClient): {
44
34
  } & StrictSelect<S, SubmitOrgInviteCodePayloadSelect>) => QueryBuilder<{
45
35
  submitOrgInviteCode: InferSelectResult<SubmitOrgInviteCodePayload, S> | null;
46
36
  }>;
47
- requestUploadUrl: <S extends RequestUploadUrlPayloadSelect>(args: RequestUploadUrlVariables, options: {
48
- select: S;
49
- } & StrictSelect<S, RequestUploadUrlPayloadSelect>) => QueryBuilder<{
50
- requestUploadUrl: InferSelectResult<RequestUploadUrlPayload, S> | null;
51
- }>;
52
37
  provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
53
38
  select: S;
54
39
  } & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
@@ -26,18 +26,6 @@ export function createMutationOperations(client) {
26
26
  },
27
27
  ], connectionFieldsMap, 'SubmitOrgInviteCodePayload'),
28
28
  }),
29
- requestUploadUrl: (args, options) => new QueryBuilder({
30
- client,
31
- operation: 'mutation',
32
- operationName: 'RequestUploadUrl',
33
- fieldName: 'requestUploadUrl',
34
- ...buildCustomDocument('mutation', 'RequestUploadUrl', 'requestUploadUrl', options.select, args, [
35
- {
36
- name: 'input',
37
- type: 'RequestUploadUrlInput!',
38
- },
39
- ], connectionFieldsMap, 'RequestUploadUrlPayload'),
40
- }),
41
29
  provisionBucket: (args, options) => new QueryBuilder({
42
30
  client,
43
31
  operation: 'mutation',
@@ -89,6 +89,30 @@ export function buildSelections(select, connectionFieldsMap, entityType) {
89
89
  }
90
90
  if (typeof value === 'object' && value !== null) {
91
91
  const nested = value;
92
+ // Field with arguments (e.g. requestUploadUrl on bucket types)
93
+ if (nested.args && typeof nested.args === 'object') {
94
+ const fieldArgs = Object.entries(nested.args).map(([argName, argValue]) => t.argument({ name: argName, value: buildValueAst(argValue) }));
95
+ const nestedSelect = nested.select;
96
+ if (nestedSelect && typeof nestedSelect === 'object') {
97
+ const subSelections = Object.entries(nestedSelect)
98
+ .filter(([, v]) => v)
99
+ .map(([name]) => t.field({ name }));
100
+ fields.push(t.field({
101
+ name: key,
102
+ args: fieldArgs.length ? fieldArgs : undefined,
103
+ selectionSet: subSelections.length
104
+ ? t.selectionSet({ selections: subSelections })
105
+ : undefined,
106
+ }));
107
+ }
108
+ else {
109
+ fields.push(t.field({
110
+ name: key,
111
+ args: fieldArgs.length ? fieldArgs : undefined,
112
+ }));
113
+ }
114
+ continue;
115
+ }
92
116
  if (!nested.select || typeof nested.select !== 'object') {
93
117
  throw new Error(`Invalid selection for field "${key}": nested selections must include a "select" object.`);
94
118
  }
@@ -41,7 +41,6 @@ import extendTokenExpiresCmd from './commands/extend-token-expires';
41
41
  import createApiKeyCmd from './commands/create-api-key';
42
42
  import forgotPasswordCmd from './commands/forgot-password';
43
43
  import sendVerificationEmailCmd from './commands/send-verification-email';
44
- import requestUploadUrlCmd from './commands/request-upload-url';
45
44
  import provisionBucketCmd from './commands/provision-bucket';
46
45
  const createCommandMap = () => ({
47
46
  context: contextCmd,
@@ -81,10 +80,9 @@ const createCommandMap = () => ({
81
80
  'create-api-key': createApiKeyCmd,
82
81
  'forgot-password': forgotPasswordCmd,
83
82
  'send-verification-email': sendVerificationEmailCmd,
84
- 'request-upload-url': requestUploadUrlCmd,
85
83
  'provision-bucket': provisionBucketCmd,
86
84
  });
87
- const usage = '\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n webauthn-credential webauthnCredential CRUD operations\n audit-log auditLog CRUD operations\n identity-provider identityProvider CRUD operations\n role-type roleType CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n user user CRUD operations\n current-user-agent currentUserAgent\n current-ip-address currentIpAddress\n current-user-id currentUserId\n require-step-up requireStepUp\n current-user currentUser\n sign-out signOut\n send-account-deletion-email sendAccountDeletionEmail\n check-password checkPassword\n disconnect-account disconnectAccount\n revoke-api-key revokeApiKey\n revoke-session revokeSession\n verify-password verifyPassword\n verify-totp verifyTotp\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n provision-new-user provisionNewUser\n reset-password resetPassword\n sign-in-cross-origin signInCrossOrigin\n sign-up signUp\n request-cross-origin-token requestCrossOriginToken\n sign-in signIn\n extend-token-expires extendTokenExpires\n create-api-key createApiKey\n forgot-password forgotPassword\n send-verification-email sendVerificationEmail\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n';
85
+ const usage = '\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n webauthn-credential webauthnCredential CRUD operations\n audit-log auditLog CRUD operations\n identity-provider identityProvider CRUD operations\n role-type roleType CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n user user CRUD operations\n current-user-agent currentUserAgent\n current-ip-address currentIpAddress\n current-user-id currentUserId\n require-step-up requireStepUp\n current-user currentUser\n sign-out signOut\n send-account-deletion-email sendAccountDeletionEmail\n check-password checkPassword\n disconnect-account disconnectAccount\n revoke-api-key revokeApiKey\n revoke-session revokeSession\n verify-password verifyPassword\n verify-totp verifyTotp\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n provision-new-user provisionNewUser\n reset-password resetPassword\n sign-in-cross-origin signInCrossOrigin\n sign-up signUp\n request-cross-origin-token requestCrossOriginToken\n sign-in signIn\n extend-token-expires extendTokenExpires\n create-api-key createApiKey\n forgot-password forgotPassword\n send-verification-email sendVerificationEmail\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n';
88
86
  export const commands = async (argv, prompter, options) => {
89
87
  if (argv.help || argv.h) {
90
88
  console.log(usage);
@@ -142,11 +142,6 @@ export declare function getClient(contextName?: string): {
142
142
  } & import("..").StrictSelect<S, import("../orm/input-types").SendVerificationEmailPayloadSelect>) => import("..").QueryBuilder<{
143
143
  sendVerificationEmail: import("..").InferSelectResult<import("../orm/input-types").SendVerificationEmailPayload, S> | null;
144
144
  }>;
145
- requestUploadUrl: <S extends import("../orm/input-types").RequestUploadUrlPayloadSelect>(args: import("../orm/mutation").RequestUploadUrlVariables, options: {
146
- select: S;
147
- } & import("..").StrictSelect<S, import("../orm/input-types").RequestUploadUrlPayloadSelect>) => import("..").QueryBuilder<{
148
- requestUploadUrl: import("..").InferSelectResult<import("../orm/input-types").RequestUploadUrlPayload, S> | null;
149
- }>;
150
145
  provisionBucket: <S extends import("../orm/input-types").ProvisionBucketPayloadSelect>(args: import("../orm/mutation").ProvisionBucketVariables, options: {
151
146
  select: S;
152
147
  } & import("..").StrictSelect<S, import("../orm/input-types").ProvisionBucketPayloadSelect>) => import("..").QueryBuilder<{
@@ -182,11 +182,6 @@ export declare function createClient(config: OrmClientConfig): {
182
182
  } & import("./select-types").StrictSelect<S, import("./input-types").SendVerificationEmailPayloadSelect>) => import("./query-builder").QueryBuilder<{
183
183
  sendVerificationEmail: import("./select-types").InferSelectResult<import("./input-types").SendVerificationEmailPayload, S> | null;
184
184
  }>;
185
- requestUploadUrl: <S extends import("./input-types").RequestUploadUrlPayloadSelect>(args: import("./mutation").RequestUploadUrlVariables, options: {
186
- select: S;
187
- } & import("./select-types").StrictSelect<S, import("./input-types").RequestUploadUrlPayloadSelect>) => import("./query-builder").QueryBuilder<{
188
- requestUploadUrl: import("./select-types").InferSelectResult<import("./input-types").RequestUploadUrlPayload, S> | null;
189
- }>;
190
185
  provisionBucket: <S extends import("./input-types").ProvisionBucketPayloadSelect>(args: import("./mutation").ProvisionBucketVariables, options: {
191
186
  select: S;
192
187
  } & import("./select-types").StrictSelect<S, import("./input-types").ProvisionBucketPayloadSelect>) => import("./query-builder").QueryBuilder<{
@@ -1162,25 +1162,6 @@ export interface SendVerificationEmailInput {
1162
1162
  clientMutationId?: string;
1163
1163
  email?: ConstructiveInternalTypeEmail;
1164
1164
  }
1165
- export interface RequestUploadUrlInput {
1166
- /** Bucket key (e.g., "public", "private") */
1167
- bucketKey: string;
1168
- /**
1169
- * Owner entity ID for entity-scoped uploads.
1170
- * Omit for app-level (database-wide) storage.
1171
- * When provided, resolves the storage module for the entity type
1172
- * that owns this entity instance (e.g., a data room ID, team ID).
1173
- */
1174
- ownerId?: string;
1175
- /** SHA-256 content hash computed by the client (hex-encoded, 64 chars) */
1176
- contentHash: string;
1177
- /** MIME type of the file (e.g., "image/png") */
1178
- contentType: string;
1179
- /** File size in bytes */
1180
- size: number;
1181
- /** Original filename (optional, for display and Content-Disposition) */
1182
- filename?: string;
1183
- }
1184
1165
  export interface ProvisionBucketInput {
1185
1166
  /** The logical bucket key (e.g., "public", "private") */
1186
1167
  bucketKey: string;
@@ -2237,25 +2218,6 @@ export type SendVerificationEmailPayloadSelect = {
2237
2218
  clientMutationId?: boolean;
2238
2219
  result?: boolean;
2239
2220
  };
2240
- export interface RequestUploadUrlPayload {
2241
- /** Presigned PUT URL (null if file was deduplicated) */
2242
- uploadUrl?: string | null;
2243
- /** The file ID (existing if deduplicated, new if fresh upload) */
2244
- fileId: string;
2245
- /** The S3 object key */
2246
- key: string;
2247
- /** Whether this file was deduplicated (already exists with same hash) */
2248
- deduplicated: boolean;
2249
- /** Presigned URL expiry time (null if deduplicated) */
2250
- expiresAt?: string | null;
2251
- }
2252
- export type RequestUploadUrlPayloadSelect = {
2253
- uploadUrl?: boolean;
2254
- fileId?: boolean;
2255
- key?: boolean;
2256
- deduplicated?: boolean;
2257
- expiresAt?: boolean;
2258
- };
2259
2221
  export interface ProvisionBucketPayload {
2260
2222
  /** Whether provisioning succeeded */
2261
2223
  success: boolean;
@@ -6,7 +6,7 @@
6
6
  import { OrmClient } from '../client';
7
7
  import { QueryBuilder } from '../query-builder';
8
8
  import type { InferSelectResult, StrictSelect } from '../select-types';
9
- import type { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, ProvisionNewUserInput, ResetPasswordInput, SignInCrossOriginInput, SignUpInput, RequestCrossOriginTokenInput, SignInInput, ExtendTokenExpiresInput, CreateApiKeyInput, ForgotPasswordInput, SendVerificationEmailInput, RequestUploadUrlInput, ProvisionBucketInput, SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, ProvisionNewUserPayload, ResetPasswordPayload, SignInCrossOriginPayload, SignUpPayload, RequestCrossOriginTokenPayload, SignInPayload, ExtendTokenExpiresPayload, CreateApiKeyPayload, ForgotPasswordPayload, SendVerificationEmailPayload, RequestUploadUrlPayload, ProvisionBucketPayload, SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, SignInCrossOriginPayloadSelect, SignUpPayloadSelect, RequestCrossOriginTokenPayloadSelect, SignInPayloadSelect, ExtendTokenExpiresPayloadSelect, CreateApiKeyPayloadSelect, ForgotPasswordPayloadSelect, SendVerificationEmailPayloadSelect, RequestUploadUrlPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
9
+ import type { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, DisconnectAccountInput, RevokeApiKeyInput, RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, ProvisionNewUserInput, ResetPasswordInput, SignInCrossOriginInput, SignUpInput, RequestCrossOriginTokenInput, SignInInput, ExtendTokenExpiresInput, CreateApiKeyInput, ForgotPasswordInput, SendVerificationEmailInput, ProvisionBucketInput, SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, DisconnectAccountPayload, RevokeApiKeyPayload, RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, ProvisionNewUserPayload, ResetPasswordPayload, SignInCrossOriginPayload, SignUpPayload, RequestCrossOriginTokenPayload, SignInPayload, ExtendTokenExpiresPayload, CreateApiKeyPayload, ForgotPasswordPayload, SendVerificationEmailPayload, ProvisionBucketPayload, SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, DisconnectAccountPayloadSelect, RevokeApiKeyPayloadSelect, RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, SignInCrossOriginPayloadSelect, SignUpPayloadSelect, RequestCrossOriginTokenPayloadSelect, SignInPayloadSelect, ExtendTokenExpiresPayloadSelect, CreateApiKeyPayloadSelect, ForgotPasswordPayloadSelect, SendVerificationEmailPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
10
10
  export interface SignOutVariables {
11
11
  input: SignOutInput;
12
12
  }
@@ -70,16 +70,6 @@ export interface ForgotPasswordVariables {
70
70
  export interface SendVerificationEmailVariables {
71
71
  input: SendVerificationEmailInput;
72
72
  }
73
- /**
74
- * Variables for requestUploadUrl
75
- * Request a presigned URL for uploading a file directly to S3.
76
- Client computes SHA-256 of the file content and provides it here.
77
- If a file with the same hash already exists (dedup), returns the
78
- existing file ID and deduplicated=true with no uploadUrl.
79
- */
80
- export interface RequestUploadUrlVariables {
81
- input: RequestUploadUrlInput;
82
- }
83
73
  /**
84
74
  * Variables for provisionBucket
85
75
  * Provision an S3 bucket for a logical bucket in the database.
@@ -196,11 +186,6 @@ export declare function createMutationOperations(client: OrmClient): {
196
186
  } & StrictSelect<S, SendVerificationEmailPayloadSelect>) => QueryBuilder<{
197
187
  sendVerificationEmail: InferSelectResult<SendVerificationEmailPayload, S> | null;
198
188
  }>;
199
- requestUploadUrl: <S extends RequestUploadUrlPayloadSelect>(args: RequestUploadUrlVariables, options: {
200
- select: S;
201
- } & StrictSelect<S, RequestUploadUrlPayloadSelect>) => QueryBuilder<{
202
- requestUploadUrl: InferSelectResult<RequestUploadUrlPayload, S> | null;
203
- }>;
204
189
  provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
205
190
  select: S;
206
191
  } & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
@@ -254,18 +254,6 @@ export function createMutationOperations(client) {
254
254
  },
255
255
  ], connectionFieldsMap, 'SendVerificationEmailPayload'),
256
256
  }),
257
- requestUploadUrl: (args, options) => new QueryBuilder({
258
- client,
259
- operation: 'mutation',
260
- operationName: 'RequestUploadUrl',
261
- fieldName: 'requestUploadUrl',
262
- ...buildCustomDocument('mutation', 'RequestUploadUrl', 'requestUploadUrl', options.select, args, [
263
- {
264
- name: 'input',
265
- type: 'RequestUploadUrlInput!',
266
- },
267
- ], connectionFieldsMap, 'RequestUploadUrlPayload'),
268
- }),
269
257
  provisionBucket: (args, options) => new QueryBuilder({
270
258
  client,
271
259
  operation: 'mutation',
@@ -89,6 +89,30 @@ export function buildSelections(select, connectionFieldsMap, entityType) {
89
89
  }
90
90
  if (typeof value === 'object' && value !== null) {
91
91
  const nested = value;
92
+ // Field with arguments (e.g. requestUploadUrl on bucket types)
93
+ if (nested.args && typeof nested.args === 'object') {
94
+ const fieldArgs = Object.entries(nested.args).map(([argName, argValue]) => t.argument({ name: argName, value: buildValueAst(argValue) }));
95
+ const nestedSelect = nested.select;
96
+ if (nestedSelect && typeof nestedSelect === 'object') {
97
+ const subSelections = Object.entries(nestedSelect)
98
+ .filter(([, v]) => v)
99
+ .map(([name]) => t.field({ name }));
100
+ fields.push(t.field({
101
+ name: key,
102
+ args: fieldArgs.length ? fieldArgs : undefined,
103
+ selectionSet: subSelections.length
104
+ ? t.selectionSet({ selections: subSelections })
105
+ : undefined,
106
+ }));
107
+ }
108
+ else {
109
+ fields.push(t.field({
110
+ name: key,
111
+ args: fieldArgs.length ? fieldArgs : undefined,
112
+ }));
113
+ }
114
+ continue;
115
+ }
92
116
  if (!nested.select || typeof nested.select !== 'object') {
93
117
  throw new Error(`Invalid selection for field "${key}": nested selections must include a "select" object.`);
94
118
  }
@@ -23,7 +23,6 @@ import setPropsAndCommitCmd from './commands/set-props-and-commit';
23
23
  import insertNodeAtPathCmd from './commands/insert-node-at-path';
24
24
  import updateNodeAtPathCmd from './commands/update-node-at-path';
25
25
  import setAndCommitCmd from './commands/set-and-commit';
26
- import requestUploadUrlCmd from './commands/request-upload-url';
27
26
  import provisionBucketCmd from './commands/provision-bucket';
28
27
  const createCommandMap = () => ({
29
28
  context: contextCmd,
@@ -45,10 +44,9 @@ const createCommandMap = () => ({
45
44
  'insert-node-at-path': insertNodeAtPathCmd,
46
45
  'update-node-at-path': updateNodeAtPathCmd,
47
46
  'set-and-commit': setAndCommitCmd,
48
- 'request-upload-url': requestUploadUrlCmd,
49
47
  'provision-bucket': provisionBucketCmd,
50
48
  });
51
- const usage = '\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n get-all-record getAllRecord CRUD operations\n object object CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n commit commit CRUD operations\n rev-parse revParse\n get-all-objects-from-root Reads and enables pagination through a set of `Object`.\n get-path-objects-from-root Reads and enables pagination through a set of `Object`.\n get-object-at-path getObjectAtPath\n freeze-objects freezeObjects\n init-empty-repo initEmptyRepo\n remove-node-at-path removeNodeAtPath\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n';
49
+ const usage = '\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n get-all-record getAllRecord CRUD operations\n object object CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n commit commit CRUD operations\n rev-parse revParse\n get-all-objects-from-root Reads and enables pagination through a set of `Object`.\n get-path-objects-from-root Reads and enables pagination through a set of `Object`.\n get-object-at-path getObjectAtPath\n freeze-objects freezeObjects\n init-empty-repo initEmptyRepo\n remove-node-at-path removeNodeAtPath\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n';
52
50
  export const commands = async (argv, prompter, options) => {
53
51
  if (argv.help || argv.h) {
54
52
  console.log(usage);
@@ -68,11 +68,6 @@ export declare function getClient(contextName?: string): {
68
68
  } & import("..").StrictSelect<S, import("../orm/input-types").SetAndCommitPayloadSelect>) => import("..").QueryBuilder<{
69
69
  setAndCommit: import("..").InferSelectResult<import("../orm/input-types").SetAndCommitPayload, S> | null;
70
70
  }>;
71
- requestUploadUrl: <S extends import("../orm/input-types").RequestUploadUrlPayloadSelect>(args: import("../orm/mutation").RequestUploadUrlVariables, options: {
72
- select: S;
73
- } & import("..").StrictSelect<S, import("../orm/input-types").RequestUploadUrlPayloadSelect>) => import("..").QueryBuilder<{
74
- requestUploadUrl: import("..").InferSelectResult<import("../orm/input-types").RequestUploadUrlPayload, S> | null;
75
- }>;
76
71
  provisionBucket: <S extends import("../orm/input-types").ProvisionBucketPayloadSelect>(args: import("../orm/mutation").ProvisionBucketVariables, options: {
77
72
  select: S;
78
73
  } & import("..").StrictSelect<S, import("../orm/input-types").ProvisionBucketPayloadSelect>) => import("..").QueryBuilder<{
@@ -104,11 +104,6 @@ export declare function createClient(config: OrmClientConfig): {
104
104
  } & import("./select-types").StrictSelect<S, import("./input-types").SetAndCommitPayloadSelect>) => import("./query-builder").QueryBuilder<{
105
105
  setAndCommit: import("./select-types").InferSelectResult<import("./input-types").SetAndCommitPayload, S> | null;
106
106
  }>;
107
- requestUploadUrl: <S extends import("./input-types").RequestUploadUrlPayloadSelect>(args: import("./mutation").RequestUploadUrlVariables, options: {
108
- select: S;
109
- } & import("./select-types").StrictSelect<S, import("./input-types").RequestUploadUrlPayloadSelect>) => import("./query-builder").QueryBuilder<{
110
- requestUploadUrl: import("./select-types").InferSelectResult<import("./input-types").RequestUploadUrlPayload, S> | null;
111
- }>;
112
107
  provisionBucket: <S extends import("./input-types").ProvisionBucketPayloadSelect>(args: import("./mutation").ProvisionBucketVariables, options: {
113
108
  select: S;
114
109
  } & import("./select-types").StrictSelect<S, import("./input-types").ProvisionBucketPayloadSelect>) => import("./query-builder").QueryBuilder<{
@@ -629,25 +629,6 @@ export interface SetAndCommitInput {
629
629
  kids?: string[];
630
630
  ktree?: string[];
631
631
  }
632
- export interface RequestUploadUrlInput {
633
- /** Bucket key (e.g., "public", "private") */
634
- bucketKey: string;
635
- /**
636
- * Owner entity ID for entity-scoped uploads.
637
- * Omit for app-level (database-wide) storage.
638
- * When provided, resolves the storage module for the entity type
639
- * that owns this entity instance (e.g., a data room ID, team ID).
640
- */
641
- ownerId?: string;
642
- /** SHA-256 content hash computed by the client (hex-encoded, 64 chars) */
643
- contentHash: string;
644
- /** MIME type of the file (e.g., "image/png") */
645
- contentType: string;
646
- /** File size in bytes */
647
- size: number;
648
- /** Original filename (optional, for display and Content-Disposition) */
649
- filename?: string;
650
- }
651
632
  export interface ProvisionBucketInput {
652
633
  /** The logical bucket key (e.g., "public", "private") */
653
634
  bucketKey: string;
@@ -736,25 +717,6 @@ export type SetAndCommitPayloadSelect = {
736
717
  clientMutationId?: boolean;
737
718
  result?: boolean;
738
719
  };
739
- export interface RequestUploadUrlPayload {
740
- /** Presigned PUT URL (null if file was deduplicated) */
741
- uploadUrl?: string | null;
742
- /** The file ID (existing if deduplicated, new if fresh upload) */
743
- fileId: string;
744
- /** The S3 object key */
745
- key: string;
746
- /** Whether this file was deduplicated (already exists with same hash) */
747
- deduplicated: boolean;
748
- /** Presigned URL expiry time (null if deduplicated) */
749
- expiresAt?: string | null;
750
- }
751
- export type RequestUploadUrlPayloadSelect = {
752
- uploadUrl?: boolean;
753
- fileId?: boolean;
754
- key?: boolean;
755
- deduplicated?: boolean;
756
- expiresAt?: boolean;
757
- };
758
720
  export interface ProvisionBucketPayload {
759
721
  /** Whether provisioning succeeded */
760
722
  success: boolean;