@constructive-io/sdk 0.0.2

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 (723) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +84 -0
  3. package/admin/index.d.ts +5 -0
  4. package/admin/index.js +21 -0
  5. package/admin/orm/client.d.ts +55 -0
  6. package/admin/orm/client.js +105 -0
  7. package/admin/orm/index.d.ts +153 -0
  8. package/admin/orm/index.js +122 -0
  9. package/admin/orm/input-types.d.ts +3682 -0
  10. package/admin/orm/input-types.js +5 -0
  11. package/admin/orm/models/appAchievement.d.ts +56 -0
  12. package/admin/orm/models/appAchievement.js +98 -0
  13. package/admin/orm/models/appAdminGrant.d.ts +56 -0
  14. package/admin/orm/models/appAdminGrant.js +98 -0
  15. package/admin/orm/models/appGrant.d.ts +56 -0
  16. package/admin/orm/models/appGrant.js +98 -0
  17. package/admin/orm/models/appLevel.d.ts +56 -0
  18. package/admin/orm/models/appLevel.js +98 -0
  19. package/admin/orm/models/appLevelRequirement.d.ts +56 -0
  20. package/admin/orm/models/appLevelRequirement.js +98 -0
  21. package/admin/orm/models/appLimit.d.ts +56 -0
  22. package/admin/orm/models/appLimit.js +98 -0
  23. package/admin/orm/models/appLimitDefault.d.ts +56 -0
  24. package/admin/orm/models/appLimitDefault.js +98 -0
  25. package/admin/orm/models/appMembership.d.ts +56 -0
  26. package/admin/orm/models/appMembership.js +98 -0
  27. package/admin/orm/models/appMembershipDefault.d.ts +56 -0
  28. package/admin/orm/models/appMembershipDefault.js +98 -0
  29. package/admin/orm/models/appOwnerGrant.d.ts +56 -0
  30. package/admin/orm/models/appOwnerGrant.js +98 -0
  31. package/admin/orm/models/appPermission.d.ts +56 -0
  32. package/admin/orm/models/appPermission.js +98 -0
  33. package/admin/orm/models/appPermissionDefault.d.ts +56 -0
  34. package/admin/orm/models/appPermissionDefault.js +98 -0
  35. package/admin/orm/models/appStep.d.ts +56 -0
  36. package/admin/orm/models/appStep.js +98 -0
  37. package/admin/orm/models/claimedInvite.d.ts +56 -0
  38. package/admin/orm/models/claimedInvite.js +98 -0
  39. package/admin/orm/models/index.d.ts +33 -0
  40. package/admin/orm/models/index.js +64 -0
  41. package/admin/orm/models/invite.d.ts +56 -0
  42. package/admin/orm/models/invite.js +98 -0
  43. package/admin/orm/models/membershipType.d.ts +56 -0
  44. package/admin/orm/models/membershipType.js +98 -0
  45. package/admin/orm/models/orgAdminGrant.d.ts +56 -0
  46. package/admin/orm/models/orgAdminGrant.js +98 -0
  47. package/admin/orm/models/orgClaimedInvite.d.ts +56 -0
  48. package/admin/orm/models/orgClaimedInvite.js +98 -0
  49. package/admin/orm/models/orgGrant.d.ts +56 -0
  50. package/admin/orm/models/orgGrant.js +98 -0
  51. package/admin/orm/models/orgInvite.d.ts +56 -0
  52. package/admin/orm/models/orgInvite.js +98 -0
  53. package/admin/orm/models/orgLimit.d.ts +56 -0
  54. package/admin/orm/models/orgLimit.js +98 -0
  55. package/admin/orm/models/orgLimitDefault.d.ts +56 -0
  56. package/admin/orm/models/orgLimitDefault.js +98 -0
  57. package/admin/orm/models/orgMember.d.ts +56 -0
  58. package/admin/orm/models/orgMember.js +98 -0
  59. package/admin/orm/models/orgMembership.d.ts +56 -0
  60. package/admin/orm/models/orgMembership.js +98 -0
  61. package/admin/orm/models/orgMembershipDefault.d.ts +56 -0
  62. package/admin/orm/models/orgMembershipDefault.js +98 -0
  63. package/admin/orm/models/orgOwnerGrant.d.ts +56 -0
  64. package/admin/orm/models/orgOwnerGrant.js +98 -0
  65. package/admin/orm/models/orgPermission.d.ts +56 -0
  66. package/admin/orm/models/orgPermission.js +98 -0
  67. package/admin/orm/models/orgPermissionDefault.d.ts +56 -0
  68. package/admin/orm/models/orgPermissionDefault.js +98 -0
  69. package/admin/orm/mutation/index.d.ts +27 -0
  70. package/admin/orm/mutation/index.js +33 -0
  71. package/admin/orm/query/index.d.ts +101 -0
  72. package/admin/orm/query/index.js +173 -0
  73. package/admin/orm/query-builder.d.ts +89 -0
  74. package/admin/orm/query-builder.js +611 -0
  75. package/admin/orm/select-types.d.ts +101 -0
  76. package/admin/orm/select-types.js +2 -0
  77. package/admin/orm/types.d.ts +6 -0
  78. package/admin/orm/types.js +23 -0
  79. package/auth/index.d.ts +5 -0
  80. package/auth/index.js +21 -0
  81. package/auth/orm/client.d.ts +55 -0
  82. package/auth/orm/client.js +105 -0
  83. package/auth/orm/index.d.ts +151 -0
  84. package/auth/orm/index.js +80 -0
  85. package/auth/orm/input-types.d.ts +1412 -0
  86. package/auth/orm/input-types.js +5 -0
  87. package/auth/orm/models/auditLog.d.ts +56 -0
  88. package/auth/orm/models/auditLog.js +98 -0
  89. package/auth/orm/models/connectedAccount.d.ts +56 -0
  90. package/auth/orm/models/connectedAccount.js +98 -0
  91. package/auth/orm/models/cryptoAddress.d.ts +56 -0
  92. package/auth/orm/models/cryptoAddress.js +98 -0
  93. package/auth/orm/models/email.d.ts +56 -0
  94. package/auth/orm/models/email.js +98 -0
  95. package/auth/orm/models/index.d.ts +12 -0
  96. package/auth/orm/models/index.js +22 -0
  97. package/auth/orm/models/phoneNumber.d.ts +56 -0
  98. package/auth/orm/models/phoneNumber.js +98 -0
  99. package/auth/orm/models/roleType.d.ts +56 -0
  100. package/auth/orm/models/roleType.js +98 -0
  101. package/auth/orm/models/user.d.ts +56 -0
  102. package/auth/orm/models/user.js +98 -0
  103. package/auth/orm/mutation/index.d.ts +139 -0
  104. package/auth/orm/mutation/index.js +201 -0
  105. package/auth/orm/query/index.d.ts +31 -0
  106. package/auth/orm/query/index.js +37 -0
  107. package/auth/orm/query-builder.d.ts +89 -0
  108. package/auth/orm/query-builder.js +611 -0
  109. package/auth/orm/select-types.d.ts +101 -0
  110. package/auth/orm/select-types.js +2 -0
  111. package/auth/orm/types.d.ts +6 -0
  112. package/auth/orm/types.js +23 -0
  113. package/esm/admin/index.d.ts +5 -0
  114. package/esm/admin/index.js +5 -0
  115. package/esm/admin/orm/client.d.ts +55 -0
  116. package/esm/admin/orm/client.js +99 -0
  117. package/esm/admin/orm/index.d.ts +153 -0
  118. package/esm/admin/orm/index.js +100 -0
  119. package/esm/admin/orm/input-types.d.ts +3682 -0
  120. package/esm/admin/orm/input-types.js +2 -0
  121. package/esm/admin/orm/models/appAchievement.d.ts +56 -0
  122. package/esm/admin/orm/models/appAchievement.js +94 -0
  123. package/esm/admin/orm/models/appAdminGrant.d.ts +56 -0
  124. package/esm/admin/orm/models/appAdminGrant.js +94 -0
  125. package/esm/admin/orm/models/appGrant.d.ts +56 -0
  126. package/esm/admin/orm/models/appGrant.js +94 -0
  127. package/esm/admin/orm/models/appLevel.d.ts +56 -0
  128. package/esm/admin/orm/models/appLevel.js +94 -0
  129. package/esm/admin/orm/models/appLevelRequirement.d.ts +56 -0
  130. package/esm/admin/orm/models/appLevelRequirement.js +94 -0
  131. package/esm/admin/orm/models/appLimit.d.ts +56 -0
  132. package/esm/admin/orm/models/appLimit.js +94 -0
  133. package/esm/admin/orm/models/appLimitDefault.d.ts +56 -0
  134. package/esm/admin/orm/models/appLimitDefault.js +94 -0
  135. package/esm/admin/orm/models/appMembership.d.ts +56 -0
  136. package/esm/admin/orm/models/appMembership.js +94 -0
  137. package/esm/admin/orm/models/appMembershipDefault.d.ts +56 -0
  138. package/esm/admin/orm/models/appMembershipDefault.js +94 -0
  139. package/esm/admin/orm/models/appOwnerGrant.d.ts +56 -0
  140. package/esm/admin/orm/models/appOwnerGrant.js +94 -0
  141. package/esm/admin/orm/models/appPermission.d.ts +56 -0
  142. package/esm/admin/orm/models/appPermission.js +94 -0
  143. package/esm/admin/orm/models/appPermissionDefault.d.ts +56 -0
  144. package/esm/admin/orm/models/appPermissionDefault.js +94 -0
  145. package/esm/admin/orm/models/appStep.d.ts +56 -0
  146. package/esm/admin/orm/models/appStep.js +94 -0
  147. package/esm/admin/orm/models/claimedInvite.d.ts +56 -0
  148. package/esm/admin/orm/models/claimedInvite.js +94 -0
  149. package/esm/admin/orm/models/index.d.ts +33 -0
  150. package/esm/admin/orm/models/index.js +33 -0
  151. package/esm/admin/orm/models/invite.d.ts +56 -0
  152. package/esm/admin/orm/models/invite.js +94 -0
  153. package/esm/admin/orm/models/membershipType.d.ts +56 -0
  154. package/esm/admin/orm/models/membershipType.js +94 -0
  155. package/esm/admin/orm/models/orgAdminGrant.d.ts +56 -0
  156. package/esm/admin/orm/models/orgAdminGrant.js +94 -0
  157. package/esm/admin/orm/models/orgClaimedInvite.d.ts +56 -0
  158. package/esm/admin/orm/models/orgClaimedInvite.js +94 -0
  159. package/esm/admin/orm/models/orgGrant.d.ts +56 -0
  160. package/esm/admin/orm/models/orgGrant.js +94 -0
  161. package/esm/admin/orm/models/orgInvite.d.ts +56 -0
  162. package/esm/admin/orm/models/orgInvite.js +94 -0
  163. package/esm/admin/orm/models/orgLimit.d.ts +56 -0
  164. package/esm/admin/orm/models/orgLimit.js +94 -0
  165. package/esm/admin/orm/models/orgLimitDefault.d.ts +56 -0
  166. package/esm/admin/orm/models/orgLimitDefault.js +94 -0
  167. package/esm/admin/orm/models/orgMember.d.ts +56 -0
  168. package/esm/admin/orm/models/orgMember.js +94 -0
  169. package/esm/admin/orm/models/orgMembership.d.ts +56 -0
  170. package/esm/admin/orm/models/orgMembership.js +94 -0
  171. package/esm/admin/orm/models/orgMembershipDefault.d.ts +56 -0
  172. package/esm/admin/orm/models/orgMembershipDefault.js +94 -0
  173. package/esm/admin/orm/models/orgOwnerGrant.d.ts +56 -0
  174. package/esm/admin/orm/models/orgOwnerGrant.js +94 -0
  175. package/esm/admin/orm/models/orgPermission.d.ts +56 -0
  176. package/esm/admin/orm/models/orgPermission.js +94 -0
  177. package/esm/admin/orm/models/orgPermissionDefault.d.ts +56 -0
  178. package/esm/admin/orm/models/orgPermissionDefault.js +94 -0
  179. package/esm/admin/orm/mutation/index.d.ts +27 -0
  180. package/esm/admin/orm/mutation/index.js +30 -0
  181. package/esm/admin/orm/query/index.d.ts +101 -0
  182. package/esm/admin/orm/query/index.js +170 -0
  183. package/esm/admin/orm/query-builder.d.ts +89 -0
  184. package/esm/admin/orm/query-builder.js +564 -0
  185. package/esm/admin/orm/select-types.d.ts +101 -0
  186. package/esm/admin/orm/select-types.js +1 -0
  187. package/esm/admin/orm/types.d.ts +6 -0
  188. package/esm/admin/orm/types.js +7 -0
  189. package/esm/auth/index.d.ts +5 -0
  190. package/esm/auth/index.js +5 -0
  191. package/esm/auth/orm/client.d.ts +55 -0
  192. package/esm/auth/orm/client.js +99 -0
  193. package/esm/auth/orm/index.d.ts +151 -0
  194. package/esm/auth/orm/index.js +58 -0
  195. package/esm/auth/orm/input-types.d.ts +1412 -0
  196. package/esm/auth/orm/input-types.js +2 -0
  197. package/esm/auth/orm/models/auditLog.d.ts +56 -0
  198. package/esm/auth/orm/models/auditLog.js +94 -0
  199. package/esm/auth/orm/models/connectedAccount.d.ts +56 -0
  200. package/esm/auth/orm/models/connectedAccount.js +94 -0
  201. package/esm/auth/orm/models/cryptoAddress.d.ts +56 -0
  202. package/esm/auth/orm/models/cryptoAddress.js +94 -0
  203. package/esm/auth/orm/models/email.d.ts +56 -0
  204. package/esm/auth/orm/models/email.js +94 -0
  205. package/esm/auth/orm/models/index.d.ts +12 -0
  206. package/esm/auth/orm/models/index.js +12 -0
  207. package/esm/auth/orm/models/phoneNumber.d.ts +56 -0
  208. package/esm/auth/orm/models/phoneNumber.js +94 -0
  209. package/esm/auth/orm/models/roleType.d.ts +56 -0
  210. package/esm/auth/orm/models/roleType.js +94 -0
  211. package/esm/auth/orm/models/user.d.ts +56 -0
  212. package/esm/auth/orm/models/user.js +94 -0
  213. package/esm/auth/orm/mutation/index.d.ts +139 -0
  214. package/esm/auth/orm/mutation/index.js +198 -0
  215. package/esm/auth/orm/query/index.d.ts +31 -0
  216. package/esm/auth/orm/query/index.js +34 -0
  217. package/esm/auth/orm/query-builder.d.ts +89 -0
  218. package/esm/auth/orm/query-builder.js +564 -0
  219. package/esm/auth/orm/select-types.d.ts +101 -0
  220. package/esm/auth/orm/select-types.js +1 -0
  221. package/esm/auth/orm/types.d.ts +6 -0
  222. package/esm/auth/orm/types.js +7 -0
  223. package/esm/index.d.ts +12 -0
  224. package/esm/index.js +12 -0
  225. package/esm/objects/index.d.ts +5 -0
  226. package/esm/objects/index.js +5 -0
  227. package/esm/objects/orm/client.d.ts +55 -0
  228. package/esm/objects/orm/client.js +99 -0
  229. package/esm/objects/orm/index.d.ts +107 -0
  230. package/esm/objects/orm/index.js +54 -0
  231. package/esm/objects/orm/input-types.d.ts +909 -0
  232. package/esm/objects/orm/input-types.js +2 -0
  233. package/esm/objects/orm/models/commit.d.ts +56 -0
  234. package/esm/objects/orm/models/commit.js +94 -0
  235. package/esm/objects/orm/models/getAllRecord.d.ts +32 -0
  236. package/esm/objects/orm/models/getAllRecord.js +51 -0
  237. package/esm/objects/orm/models/index.d.ts +10 -0
  238. package/esm/objects/orm/models/index.js +10 -0
  239. package/esm/objects/orm/models/object.d.ts +56 -0
  240. package/esm/objects/orm/models/object.js +84 -0
  241. package/esm/objects/orm/models/ref.d.ts +56 -0
  242. package/esm/objects/orm/models/ref.js +94 -0
  243. package/esm/objects/orm/models/store.d.ts +56 -0
  244. package/esm/objects/orm/models/store.js +94 -0
  245. package/esm/objects/orm/mutation/index.d.ts +75 -0
  246. package/esm/objects/orm/mutation/index.js +102 -0
  247. package/esm/objects/orm/query/index.d.ts +57 -0
  248. package/esm/objects/orm/query/index.js +110 -0
  249. package/esm/objects/orm/query-builder.d.ts +89 -0
  250. package/esm/objects/orm/query-builder.js +564 -0
  251. package/esm/objects/orm/select-types.d.ts +101 -0
  252. package/esm/objects/orm/select-types.js +1 -0
  253. package/esm/objects/orm/types.d.ts +6 -0
  254. package/esm/objects/orm/types.js +7 -0
  255. package/esm/public/index.d.ts +5 -0
  256. package/esm/public/index.js +5 -0
  257. package/esm/public/orm/client.d.ts +55 -0
  258. package/esm/public/orm/client.js +99 -0
  259. package/esm/public/orm/index.d.ts +480 -0
  260. package/esm/public/orm/index.js +242 -0
  261. package/esm/public/orm/input-types.d.ts +15987 -0
  262. package/esm/public/orm/input-types.js +128 -0
  263. package/esm/public/orm/models/api.d.ts +56 -0
  264. package/esm/public/orm/models/api.js +94 -0
  265. package/esm/public/orm/models/apiModule.d.ts +56 -0
  266. package/esm/public/orm/models/apiModule.js +94 -0
  267. package/esm/public/orm/models/apiSchema.d.ts +56 -0
  268. package/esm/public/orm/models/apiSchema.js +94 -0
  269. package/esm/public/orm/models/app.d.ts +56 -0
  270. package/esm/public/orm/models/app.js +94 -0
  271. package/esm/public/orm/models/appAchievement.d.ts +56 -0
  272. package/esm/public/orm/models/appAchievement.js +94 -0
  273. package/esm/public/orm/models/appAdminGrant.d.ts +56 -0
  274. package/esm/public/orm/models/appAdminGrant.js +94 -0
  275. package/esm/public/orm/models/appGrant.d.ts +56 -0
  276. package/esm/public/orm/models/appGrant.js +94 -0
  277. package/esm/public/orm/models/appLevel.d.ts +56 -0
  278. package/esm/public/orm/models/appLevel.js +94 -0
  279. package/esm/public/orm/models/appLevelRequirement.d.ts +56 -0
  280. package/esm/public/orm/models/appLevelRequirement.js +94 -0
  281. package/esm/public/orm/models/appLimit.d.ts +56 -0
  282. package/esm/public/orm/models/appLimit.js +94 -0
  283. package/esm/public/orm/models/appLimitDefault.d.ts +56 -0
  284. package/esm/public/orm/models/appLimitDefault.js +94 -0
  285. package/esm/public/orm/models/appMembership.d.ts +56 -0
  286. package/esm/public/orm/models/appMembership.js +94 -0
  287. package/esm/public/orm/models/appMembershipDefault.d.ts +56 -0
  288. package/esm/public/orm/models/appMembershipDefault.js +94 -0
  289. package/esm/public/orm/models/appOwnerGrant.d.ts +56 -0
  290. package/esm/public/orm/models/appOwnerGrant.js +94 -0
  291. package/esm/public/orm/models/appPermission.d.ts +56 -0
  292. package/esm/public/orm/models/appPermission.js +94 -0
  293. package/esm/public/orm/models/appPermissionDefault.d.ts +56 -0
  294. package/esm/public/orm/models/appPermissionDefault.js +94 -0
  295. package/esm/public/orm/models/appStep.d.ts +56 -0
  296. package/esm/public/orm/models/appStep.js +94 -0
  297. package/esm/public/orm/models/astMigration.d.ts +38 -0
  298. package/esm/public/orm/models/astMigration.js +72 -0
  299. package/esm/public/orm/models/auditLog.d.ts +56 -0
  300. package/esm/public/orm/models/auditLog.js +94 -0
  301. package/esm/public/orm/models/checkConstraint.d.ts +56 -0
  302. package/esm/public/orm/models/checkConstraint.js +94 -0
  303. package/esm/public/orm/models/claimedInvite.d.ts +56 -0
  304. package/esm/public/orm/models/claimedInvite.js +94 -0
  305. package/esm/public/orm/models/commit.d.ts +56 -0
  306. package/esm/public/orm/models/commit.js +94 -0
  307. package/esm/public/orm/models/connectedAccount.d.ts +56 -0
  308. package/esm/public/orm/models/connectedAccount.js +94 -0
  309. package/esm/public/orm/models/connectedAccountsModule.d.ts +56 -0
  310. package/esm/public/orm/models/connectedAccountsModule.js +94 -0
  311. package/esm/public/orm/models/cryptoAddress.d.ts +56 -0
  312. package/esm/public/orm/models/cryptoAddress.js +94 -0
  313. package/esm/public/orm/models/cryptoAddressesModule.d.ts +56 -0
  314. package/esm/public/orm/models/cryptoAddressesModule.js +94 -0
  315. package/esm/public/orm/models/cryptoAuthModule.d.ts +56 -0
  316. package/esm/public/orm/models/cryptoAuthModule.js +94 -0
  317. package/esm/public/orm/models/database.d.ts +56 -0
  318. package/esm/public/orm/models/database.js +94 -0
  319. package/esm/public/orm/models/databaseProvisionModule.d.ts +56 -0
  320. package/esm/public/orm/models/databaseProvisionModule.js +94 -0
  321. package/esm/public/orm/models/defaultIdsModule.d.ts +56 -0
  322. package/esm/public/orm/models/defaultIdsModule.js +94 -0
  323. package/esm/public/orm/models/denormalizedTableField.d.ts +56 -0
  324. package/esm/public/orm/models/denormalizedTableField.js +94 -0
  325. package/esm/public/orm/models/domain.d.ts +56 -0
  326. package/esm/public/orm/models/domain.js +94 -0
  327. package/esm/public/orm/models/email.d.ts +56 -0
  328. package/esm/public/orm/models/email.js +94 -0
  329. package/esm/public/orm/models/emailsModule.d.ts +56 -0
  330. package/esm/public/orm/models/emailsModule.js +94 -0
  331. package/esm/public/orm/models/encryptedSecretsModule.d.ts +56 -0
  332. package/esm/public/orm/models/encryptedSecretsModule.js +94 -0
  333. package/esm/public/orm/models/field.d.ts +56 -0
  334. package/esm/public/orm/models/field.js +94 -0
  335. package/esm/public/orm/models/fieldModule.d.ts +56 -0
  336. package/esm/public/orm/models/fieldModule.js +94 -0
  337. package/esm/public/orm/models/foreignKeyConstraint.d.ts +56 -0
  338. package/esm/public/orm/models/foreignKeyConstraint.js +94 -0
  339. package/esm/public/orm/models/fullTextSearch.d.ts +56 -0
  340. package/esm/public/orm/models/fullTextSearch.js +94 -0
  341. package/esm/public/orm/models/getAllRecord.d.ts +32 -0
  342. package/esm/public/orm/models/getAllRecord.js +51 -0
  343. package/esm/public/orm/models/hierarchyModule.d.ts +56 -0
  344. package/esm/public/orm/models/hierarchyModule.js +94 -0
  345. package/esm/public/orm/models/index.d.ts +104 -0
  346. package/esm/public/orm/models/index.js +104 -0
  347. package/esm/public/orm/models/indexModel.d.ts +56 -0
  348. package/esm/public/orm/models/indexModel.js +94 -0
  349. package/esm/public/orm/models/invite.d.ts +56 -0
  350. package/esm/public/orm/models/invite.js +94 -0
  351. package/esm/public/orm/models/invitesModule.d.ts +56 -0
  352. package/esm/public/orm/models/invitesModule.js +94 -0
  353. package/esm/public/orm/models/levelsModule.d.ts +56 -0
  354. package/esm/public/orm/models/levelsModule.js +94 -0
  355. package/esm/public/orm/models/limitFunction.d.ts +56 -0
  356. package/esm/public/orm/models/limitFunction.js +94 -0
  357. package/esm/public/orm/models/limitsModule.d.ts +56 -0
  358. package/esm/public/orm/models/limitsModule.js +94 -0
  359. package/esm/public/orm/models/membershipType.d.ts +56 -0
  360. package/esm/public/orm/models/membershipType.js +94 -0
  361. package/esm/public/orm/models/membershipTypesModule.d.ts +56 -0
  362. package/esm/public/orm/models/membershipTypesModule.js +94 -0
  363. package/esm/public/orm/models/membershipsModule.d.ts +56 -0
  364. package/esm/public/orm/models/membershipsModule.js +94 -0
  365. package/esm/public/orm/models/nodeTypeRegistry.d.ts +56 -0
  366. package/esm/public/orm/models/nodeTypeRegistry.js +94 -0
  367. package/esm/public/orm/models/object.d.ts +56 -0
  368. package/esm/public/orm/models/object.js +84 -0
  369. package/esm/public/orm/models/orgAdminGrant.d.ts +56 -0
  370. package/esm/public/orm/models/orgAdminGrant.js +94 -0
  371. package/esm/public/orm/models/orgClaimedInvite.d.ts +56 -0
  372. package/esm/public/orm/models/orgClaimedInvite.js +94 -0
  373. package/esm/public/orm/models/orgGrant.d.ts +56 -0
  374. package/esm/public/orm/models/orgGrant.js +94 -0
  375. package/esm/public/orm/models/orgInvite.d.ts +56 -0
  376. package/esm/public/orm/models/orgInvite.js +94 -0
  377. package/esm/public/orm/models/orgLimit.d.ts +56 -0
  378. package/esm/public/orm/models/orgLimit.js +94 -0
  379. package/esm/public/orm/models/orgLimitDefault.d.ts +56 -0
  380. package/esm/public/orm/models/orgLimitDefault.js +94 -0
  381. package/esm/public/orm/models/orgMember.d.ts +56 -0
  382. package/esm/public/orm/models/orgMember.js +94 -0
  383. package/esm/public/orm/models/orgMembership.d.ts +56 -0
  384. package/esm/public/orm/models/orgMembership.js +94 -0
  385. package/esm/public/orm/models/orgMembershipDefault.d.ts +56 -0
  386. package/esm/public/orm/models/orgMembershipDefault.js +94 -0
  387. package/esm/public/orm/models/orgOwnerGrant.d.ts +56 -0
  388. package/esm/public/orm/models/orgOwnerGrant.js +94 -0
  389. package/esm/public/orm/models/orgPermission.d.ts +56 -0
  390. package/esm/public/orm/models/orgPermission.js +94 -0
  391. package/esm/public/orm/models/orgPermissionDefault.d.ts +56 -0
  392. package/esm/public/orm/models/orgPermissionDefault.js +94 -0
  393. package/esm/public/orm/models/permissionsModule.d.ts +56 -0
  394. package/esm/public/orm/models/permissionsModule.js +94 -0
  395. package/esm/public/orm/models/phoneNumber.d.ts +56 -0
  396. package/esm/public/orm/models/phoneNumber.js +94 -0
  397. package/esm/public/orm/models/phoneNumbersModule.d.ts +56 -0
  398. package/esm/public/orm/models/phoneNumbersModule.js +94 -0
  399. package/esm/public/orm/models/policy.d.ts +56 -0
  400. package/esm/public/orm/models/policy.js +94 -0
  401. package/esm/public/orm/models/primaryKeyConstraint.d.ts +56 -0
  402. package/esm/public/orm/models/primaryKeyConstraint.js +94 -0
  403. package/esm/public/orm/models/procedure.d.ts +56 -0
  404. package/esm/public/orm/models/procedure.js +94 -0
  405. package/esm/public/orm/models/profilesModule.d.ts +56 -0
  406. package/esm/public/orm/models/profilesModule.js +94 -0
  407. package/esm/public/orm/models/ref.d.ts +56 -0
  408. package/esm/public/orm/models/ref.js +94 -0
  409. package/esm/public/orm/models/rlsModule.d.ts +56 -0
  410. package/esm/public/orm/models/rlsModule.js +94 -0
  411. package/esm/public/orm/models/roleType.d.ts +56 -0
  412. package/esm/public/orm/models/roleType.js +94 -0
  413. package/esm/public/orm/models/schema.d.ts +56 -0
  414. package/esm/public/orm/models/schema.js +94 -0
  415. package/esm/public/orm/models/schemaGrant.d.ts +56 -0
  416. package/esm/public/orm/models/schemaGrant.js +94 -0
  417. package/esm/public/orm/models/secretsModule.d.ts +56 -0
  418. package/esm/public/orm/models/secretsModule.js +94 -0
  419. package/esm/public/orm/models/sessionsModule.d.ts +56 -0
  420. package/esm/public/orm/models/sessionsModule.js +94 -0
  421. package/esm/public/orm/models/site.d.ts +56 -0
  422. package/esm/public/orm/models/site.js +94 -0
  423. package/esm/public/orm/models/siteMetadatum.d.ts +56 -0
  424. package/esm/public/orm/models/siteMetadatum.js +94 -0
  425. package/esm/public/orm/models/siteModule.d.ts +56 -0
  426. package/esm/public/orm/models/siteModule.js +94 -0
  427. package/esm/public/orm/models/siteTheme.d.ts +56 -0
  428. package/esm/public/orm/models/siteTheme.js +94 -0
  429. package/esm/public/orm/models/sqlMigration.d.ts +38 -0
  430. package/esm/public/orm/models/sqlMigration.js +72 -0
  431. package/esm/public/orm/models/store.d.ts +56 -0
  432. package/esm/public/orm/models/store.js +94 -0
  433. package/esm/public/orm/models/table.d.ts +56 -0
  434. package/esm/public/orm/models/table.js +94 -0
  435. package/esm/public/orm/models/tableGrant.d.ts +56 -0
  436. package/esm/public/orm/models/tableGrant.js +94 -0
  437. package/esm/public/orm/models/tableModule.d.ts +56 -0
  438. package/esm/public/orm/models/tableModule.js +94 -0
  439. package/esm/public/orm/models/tableTemplateModule.d.ts +56 -0
  440. package/esm/public/orm/models/tableTemplateModule.js +94 -0
  441. package/esm/public/orm/models/trigger.d.ts +56 -0
  442. package/esm/public/orm/models/trigger.js +94 -0
  443. package/esm/public/orm/models/triggerFunction.d.ts +56 -0
  444. package/esm/public/orm/models/triggerFunction.js +94 -0
  445. package/esm/public/orm/models/uniqueConstraint.d.ts +56 -0
  446. package/esm/public/orm/models/uniqueConstraint.js +94 -0
  447. package/esm/public/orm/models/user.d.ts +56 -0
  448. package/esm/public/orm/models/user.js +94 -0
  449. package/esm/public/orm/models/userAuthModule.d.ts +56 -0
  450. package/esm/public/orm/models/userAuthModule.js +94 -0
  451. package/esm/public/orm/models/usersModule.d.ts +56 -0
  452. package/esm/public/orm/models/usersModule.js +94 -0
  453. package/esm/public/orm/models/uuidModule.d.ts +56 -0
  454. package/esm/public/orm/models/uuidModule.js +94 -0
  455. package/esm/public/orm/models/view.d.ts +56 -0
  456. package/esm/public/orm/models/view.js +94 -0
  457. package/esm/public/orm/models/viewGrant.d.ts +56 -0
  458. package/esm/public/orm/models/viewGrant.js +94 -0
  459. package/esm/public/orm/models/viewRule.d.ts +56 -0
  460. package/esm/public/orm/models/viewRule.js +94 -0
  461. package/esm/public/orm/models/viewTable.d.ts +56 -0
  462. package/esm/public/orm/models/viewTable.js +94 -0
  463. package/esm/public/orm/mutation/index.d.ts +259 -0
  464. package/esm/public/orm/mutation/index.js +378 -0
  465. package/esm/public/orm/query/index.d.ts +168 -0
  466. package/esm/public/orm/query/index.js +302 -0
  467. package/esm/public/orm/query-builder.d.ts +89 -0
  468. package/esm/public/orm/query-builder.js +564 -0
  469. package/esm/public/orm/select-types.d.ts +101 -0
  470. package/esm/public/orm/select-types.js +1 -0
  471. package/esm/public/orm/types.d.ts +6 -0
  472. package/esm/public/orm/types.js +7 -0
  473. package/index.d.ts +12 -0
  474. package/index.js +48 -0
  475. package/objects/index.d.ts +5 -0
  476. package/objects/index.js +21 -0
  477. package/objects/orm/client.d.ts +55 -0
  478. package/objects/orm/client.js +105 -0
  479. package/objects/orm/index.d.ts +107 -0
  480. package/objects/orm/index.js +76 -0
  481. package/objects/orm/input-types.d.ts +909 -0
  482. package/objects/orm/input-types.js +5 -0
  483. package/objects/orm/models/commit.d.ts +56 -0
  484. package/objects/orm/models/commit.js +98 -0
  485. package/objects/orm/models/getAllRecord.d.ts +32 -0
  486. package/objects/orm/models/getAllRecord.js +55 -0
  487. package/objects/orm/models/index.d.ts +10 -0
  488. package/objects/orm/models/index.js +18 -0
  489. package/objects/orm/models/object.d.ts +56 -0
  490. package/objects/orm/models/object.js +88 -0
  491. package/objects/orm/models/ref.d.ts +56 -0
  492. package/objects/orm/models/ref.js +98 -0
  493. package/objects/orm/models/store.d.ts +56 -0
  494. package/objects/orm/models/store.js +98 -0
  495. package/objects/orm/mutation/index.d.ts +75 -0
  496. package/objects/orm/mutation/index.js +105 -0
  497. package/objects/orm/query/index.d.ts +57 -0
  498. package/objects/orm/query/index.js +113 -0
  499. package/objects/orm/query-builder.d.ts +89 -0
  500. package/objects/orm/query-builder.js +611 -0
  501. package/objects/orm/select-types.d.ts +101 -0
  502. package/objects/orm/select-types.js +2 -0
  503. package/objects/orm/types.d.ts +6 -0
  504. package/objects/orm/types.js +23 -0
  505. package/package.json +54 -0
  506. package/public/index.d.ts +5 -0
  507. package/public/index.js +21 -0
  508. package/public/orm/client.d.ts +55 -0
  509. package/public/orm/client.js +105 -0
  510. package/public/orm/index.d.ts +480 -0
  511. package/public/orm/index.js +264 -0
  512. package/public/orm/input-types.d.ts +15987 -0
  513. package/public/orm/input-types.js +131 -0
  514. package/public/orm/models/api.d.ts +56 -0
  515. package/public/orm/models/api.js +98 -0
  516. package/public/orm/models/apiModule.d.ts +56 -0
  517. package/public/orm/models/apiModule.js +98 -0
  518. package/public/orm/models/apiSchema.d.ts +56 -0
  519. package/public/orm/models/apiSchema.js +98 -0
  520. package/public/orm/models/app.d.ts +56 -0
  521. package/public/orm/models/app.js +98 -0
  522. package/public/orm/models/appAchievement.d.ts +56 -0
  523. package/public/orm/models/appAchievement.js +98 -0
  524. package/public/orm/models/appAdminGrant.d.ts +56 -0
  525. package/public/orm/models/appAdminGrant.js +98 -0
  526. package/public/orm/models/appGrant.d.ts +56 -0
  527. package/public/orm/models/appGrant.js +98 -0
  528. package/public/orm/models/appLevel.d.ts +56 -0
  529. package/public/orm/models/appLevel.js +98 -0
  530. package/public/orm/models/appLevelRequirement.d.ts +56 -0
  531. package/public/orm/models/appLevelRequirement.js +98 -0
  532. package/public/orm/models/appLimit.d.ts +56 -0
  533. package/public/orm/models/appLimit.js +98 -0
  534. package/public/orm/models/appLimitDefault.d.ts +56 -0
  535. package/public/orm/models/appLimitDefault.js +98 -0
  536. package/public/orm/models/appMembership.d.ts +56 -0
  537. package/public/orm/models/appMembership.js +98 -0
  538. package/public/orm/models/appMembershipDefault.d.ts +56 -0
  539. package/public/orm/models/appMembershipDefault.js +98 -0
  540. package/public/orm/models/appOwnerGrant.d.ts +56 -0
  541. package/public/orm/models/appOwnerGrant.js +98 -0
  542. package/public/orm/models/appPermission.d.ts +56 -0
  543. package/public/orm/models/appPermission.js +98 -0
  544. package/public/orm/models/appPermissionDefault.d.ts +56 -0
  545. package/public/orm/models/appPermissionDefault.js +98 -0
  546. package/public/orm/models/appStep.d.ts +56 -0
  547. package/public/orm/models/appStep.js +98 -0
  548. package/public/orm/models/astMigration.d.ts +38 -0
  549. package/public/orm/models/astMigration.js +76 -0
  550. package/public/orm/models/auditLog.d.ts +56 -0
  551. package/public/orm/models/auditLog.js +98 -0
  552. package/public/orm/models/checkConstraint.d.ts +56 -0
  553. package/public/orm/models/checkConstraint.js +98 -0
  554. package/public/orm/models/claimedInvite.d.ts +56 -0
  555. package/public/orm/models/claimedInvite.js +98 -0
  556. package/public/orm/models/commit.d.ts +56 -0
  557. package/public/orm/models/commit.js +98 -0
  558. package/public/orm/models/connectedAccount.d.ts +56 -0
  559. package/public/orm/models/connectedAccount.js +98 -0
  560. package/public/orm/models/connectedAccountsModule.d.ts +56 -0
  561. package/public/orm/models/connectedAccountsModule.js +98 -0
  562. package/public/orm/models/cryptoAddress.d.ts +56 -0
  563. package/public/orm/models/cryptoAddress.js +98 -0
  564. package/public/orm/models/cryptoAddressesModule.d.ts +56 -0
  565. package/public/orm/models/cryptoAddressesModule.js +98 -0
  566. package/public/orm/models/cryptoAuthModule.d.ts +56 -0
  567. package/public/orm/models/cryptoAuthModule.js +98 -0
  568. package/public/orm/models/database.d.ts +56 -0
  569. package/public/orm/models/database.js +98 -0
  570. package/public/orm/models/databaseProvisionModule.d.ts +56 -0
  571. package/public/orm/models/databaseProvisionModule.js +98 -0
  572. package/public/orm/models/defaultIdsModule.d.ts +56 -0
  573. package/public/orm/models/defaultIdsModule.js +98 -0
  574. package/public/orm/models/denormalizedTableField.d.ts +56 -0
  575. package/public/orm/models/denormalizedTableField.js +98 -0
  576. package/public/orm/models/domain.d.ts +56 -0
  577. package/public/orm/models/domain.js +98 -0
  578. package/public/orm/models/email.d.ts +56 -0
  579. package/public/orm/models/email.js +98 -0
  580. package/public/orm/models/emailsModule.d.ts +56 -0
  581. package/public/orm/models/emailsModule.js +98 -0
  582. package/public/orm/models/encryptedSecretsModule.d.ts +56 -0
  583. package/public/orm/models/encryptedSecretsModule.js +98 -0
  584. package/public/orm/models/field.d.ts +56 -0
  585. package/public/orm/models/field.js +98 -0
  586. package/public/orm/models/fieldModule.d.ts +56 -0
  587. package/public/orm/models/fieldModule.js +98 -0
  588. package/public/orm/models/foreignKeyConstraint.d.ts +56 -0
  589. package/public/orm/models/foreignKeyConstraint.js +98 -0
  590. package/public/orm/models/fullTextSearch.d.ts +56 -0
  591. package/public/orm/models/fullTextSearch.js +98 -0
  592. package/public/orm/models/getAllRecord.d.ts +32 -0
  593. package/public/orm/models/getAllRecord.js +55 -0
  594. package/public/orm/models/hierarchyModule.d.ts +56 -0
  595. package/public/orm/models/hierarchyModule.js +98 -0
  596. package/public/orm/models/index.d.ts +104 -0
  597. package/public/orm/models/index.js +207 -0
  598. package/public/orm/models/indexModel.d.ts +56 -0
  599. package/public/orm/models/indexModel.js +98 -0
  600. package/public/orm/models/invite.d.ts +56 -0
  601. package/public/orm/models/invite.js +98 -0
  602. package/public/orm/models/invitesModule.d.ts +56 -0
  603. package/public/orm/models/invitesModule.js +98 -0
  604. package/public/orm/models/levelsModule.d.ts +56 -0
  605. package/public/orm/models/levelsModule.js +98 -0
  606. package/public/orm/models/limitFunction.d.ts +56 -0
  607. package/public/orm/models/limitFunction.js +98 -0
  608. package/public/orm/models/limitsModule.d.ts +56 -0
  609. package/public/orm/models/limitsModule.js +98 -0
  610. package/public/orm/models/membershipType.d.ts +56 -0
  611. package/public/orm/models/membershipType.js +98 -0
  612. package/public/orm/models/membershipTypesModule.d.ts +56 -0
  613. package/public/orm/models/membershipTypesModule.js +98 -0
  614. package/public/orm/models/membershipsModule.d.ts +56 -0
  615. package/public/orm/models/membershipsModule.js +98 -0
  616. package/public/orm/models/nodeTypeRegistry.d.ts +56 -0
  617. package/public/orm/models/nodeTypeRegistry.js +98 -0
  618. package/public/orm/models/object.d.ts +56 -0
  619. package/public/orm/models/object.js +88 -0
  620. package/public/orm/models/orgAdminGrant.d.ts +56 -0
  621. package/public/orm/models/orgAdminGrant.js +98 -0
  622. package/public/orm/models/orgClaimedInvite.d.ts +56 -0
  623. package/public/orm/models/orgClaimedInvite.js +98 -0
  624. package/public/orm/models/orgGrant.d.ts +56 -0
  625. package/public/orm/models/orgGrant.js +98 -0
  626. package/public/orm/models/orgInvite.d.ts +56 -0
  627. package/public/orm/models/orgInvite.js +98 -0
  628. package/public/orm/models/orgLimit.d.ts +56 -0
  629. package/public/orm/models/orgLimit.js +98 -0
  630. package/public/orm/models/orgLimitDefault.d.ts +56 -0
  631. package/public/orm/models/orgLimitDefault.js +98 -0
  632. package/public/orm/models/orgMember.d.ts +56 -0
  633. package/public/orm/models/orgMember.js +98 -0
  634. package/public/orm/models/orgMembership.d.ts +56 -0
  635. package/public/orm/models/orgMembership.js +98 -0
  636. package/public/orm/models/orgMembershipDefault.d.ts +56 -0
  637. package/public/orm/models/orgMembershipDefault.js +98 -0
  638. package/public/orm/models/orgOwnerGrant.d.ts +56 -0
  639. package/public/orm/models/orgOwnerGrant.js +98 -0
  640. package/public/orm/models/orgPermission.d.ts +56 -0
  641. package/public/orm/models/orgPermission.js +98 -0
  642. package/public/orm/models/orgPermissionDefault.d.ts +56 -0
  643. package/public/orm/models/orgPermissionDefault.js +98 -0
  644. package/public/orm/models/permissionsModule.d.ts +56 -0
  645. package/public/orm/models/permissionsModule.js +98 -0
  646. package/public/orm/models/phoneNumber.d.ts +56 -0
  647. package/public/orm/models/phoneNumber.js +98 -0
  648. package/public/orm/models/phoneNumbersModule.d.ts +56 -0
  649. package/public/orm/models/phoneNumbersModule.js +98 -0
  650. package/public/orm/models/policy.d.ts +56 -0
  651. package/public/orm/models/policy.js +98 -0
  652. package/public/orm/models/primaryKeyConstraint.d.ts +56 -0
  653. package/public/orm/models/primaryKeyConstraint.js +98 -0
  654. package/public/orm/models/procedure.d.ts +56 -0
  655. package/public/orm/models/procedure.js +98 -0
  656. package/public/orm/models/profilesModule.d.ts +56 -0
  657. package/public/orm/models/profilesModule.js +98 -0
  658. package/public/orm/models/ref.d.ts +56 -0
  659. package/public/orm/models/ref.js +98 -0
  660. package/public/orm/models/rlsModule.d.ts +56 -0
  661. package/public/orm/models/rlsModule.js +98 -0
  662. package/public/orm/models/roleType.d.ts +56 -0
  663. package/public/orm/models/roleType.js +98 -0
  664. package/public/orm/models/schema.d.ts +56 -0
  665. package/public/orm/models/schema.js +98 -0
  666. package/public/orm/models/schemaGrant.d.ts +56 -0
  667. package/public/orm/models/schemaGrant.js +98 -0
  668. package/public/orm/models/secretsModule.d.ts +56 -0
  669. package/public/orm/models/secretsModule.js +98 -0
  670. package/public/orm/models/sessionsModule.d.ts +56 -0
  671. package/public/orm/models/sessionsModule.js +98 -0
  672. package/public/orm/models/site.d.ts +56 -0
  673. package/public/orm/models/site.js +98 -0
  674. package/public/orm/models/siteMetadatum.d.ts +56 -0
  675. package/public/orm/models/siteMetadatum.js +98 -0
  676. package/public/orm/models/siteModule.d.ts +56 -0
  677. package/public/orm/models/siteModule.js +98 -0
  678. package/public/orm/models/siteTheme.d.ts +56 -0
  679. package/public/orm/models/siteTheme.js +98 -0
  680. package/public/orm/models/sqlMigration.d.ts +38 -0
  681. package/public/orm/models/sqlMigration.js +76 -0
  682. package/public/orm/models/store.d.ts +56 -0
  683. package/public/orm/models/store.js +98 -0
  684. package/public/orm/models/table.d.ts +56 -0
  685. package/public/orm/models/table.js +98 -0
  686. package/public/orm/models/tableGrant.d.ts +56 -0
  687. package/public/orm/models/tableGrant.js +98 -0
  688. package/public/orm/models/tableModule.d.ts +56 -0
  689. package/public/orm/models/tableModule.js +98 -0
  690. package/public/orm/models/tableTemplateModule.d.ts +56 -0
  691. package/public/orm/models/tableTemplateModule.js +98 -0
  692. package/public/orm/models/trigger.d.ts +56 -0
  693. package/public/orm/models/trigger.js +98 -0
  694. package/public/orm/models/triggerFunction.d.ts +56 -0
  695. package/public/orm/models/triggerFunction.js +98 -0
  696. package/public/orm/models/uniqueConstraint.d.ts +56 -0
  697. package/public/orm/models/uniqueConstraint.js +98 -0
  698. package/public/orm/models/user.d.ts +56 -0
  699. package/public/orm/models/user.js +98 -0
  700. package/public/orm/models/userAuthModule.d.ts +56 -0
  701. package/public/orm/models/userAuthModule.js +98 -0
  702. package/public/orm/models/usersModule.d.ts +56 -0
  703. package/public/orm/models/usersModule.js +98 -0
  704. package/public/orm/models/uuidModule.d.ts +56 -0
  705. package/public/orm/models/uuidModule.js +98 -0
  706. package/public/orm/models/view.d.ts +56 -0
  707. package/public/orm/models/view.js +98 -0
  708. package/public/orm/models/viewGrant.d.ts +56 -0
  709. package/public/orm/models/viewGrant.js +98 -0
  710. package/public/orm/models/viewRule.d.ts +56 -0
  711. package/public/orm/models/viewRule.js +98 -0
  712. package/public/orm/models/viewTable.d.ts +56 -0
  713. package/public/orm/models/viewTable.js +98 -0
  714. package/public/orm/mutation/index.d.ts +259 -0
  715. package/public/orm/mutation/index.js +381 -0
  716. package/public/orm/query/index.d.ts +168 -0
  717. package/public/orm/query/index.js +305 -0
  718. package/public/orm/query-builder.d.ts +89 -0
  719. package/public/orm/query-builder.js +611 -0
  720. package/public/orm/select-types.d.ts +101 -0
  721. package/public/orm/select-types.js +2 -0
  722. package/public/orm/types.d.ts +6 -0
  723. package/public/orm/types.js +23 -0
@@ -0,0 +1,564 @@
1
+ /**
2
+ * Query Builder - Builds and executes GraphQL operations
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { parseType, print } from '@0no-co/graphql.web';
7
+ import * as t from 'gql-ast';
8
+ import { GraphQLRequestError } from './client';
9
+ export class QueryBuilder {
10
+ config;
11
+ constructor(config) {
12
+ this.config = config;
13
+ }
14
+ /**
15
+ * Execute the query and return a discriminated union result
16
+ * Use result.ok to check success, or .unwrap() to throw on error
17
+ */
18
+ async execute() {
19
+ const rawResult = await this.config.client.execute(this.config.document, this.config.variables);
20
+ if (!rawResult.ok) {
21
+ return rawResult;
22
+ }
23
+ if (!this.config.transform) {
24
+ return rawResult;
25
+ }
26
+ return {
27
+ ok: true,
28
+ data: this.config.transform(rawResult.data),
29
+ errors: undefined,
30
+ };
31
+ }
32
+ /**
33
+ * Execute and unwrap the result, throwing GraphQLRequestError on failure
34
+ * @throws {GraphQLRequestError} If the query returns errors
35
+ */
36
+ async unwrap() {
37
+ const result = await this.execute();
38
+ if (!result.ok) {
39
+ throw new GraphQLRequestError(result.errors, result.data);
40
+ }
41
+ return result.data;
42
+ }
43
+ /**
44
+ * Execute and unwrap, returning defaultValue on error instead of throwing
45
+ */
46
+ async unwrapOr(defaultValue) {
47
+ const result = await this.execute();
48
+ if (!result.ok) {
49
+ return defaultValue;
50
+ }
51
+ return result.data;
52
+ }
53
+ /**
54
+ * Execute and unwrap, calling onError callback on failure
55
+ */
56
+ async unwrapOrElse(onError) {
57
+ const result = await this.execute();
58
+ if (!result.ok) {
59
+ return onError(result.errors);
60
+ }
61
+ return result.data;
62
+ }
63
+ toGraphQL() {
64
+ return this.config.document;
65
+ }
66
+ getVariables() {
67
+ return this.config.variables;
68
+ }
69
+ }
70
+ const OP_QUERY = 'query';
71
+ const OP_MUTATION = 'mutation';
72
+ const ENUM_VALUE_KIND = 'EnumValue';
73
+ // ============================================================================
74
+ // Selection Builders
75
+ // ============================================================================
76
+ export function buildSelections(select, connectionFieldsMap, entityType) {
77
+ if (!select) {
78
+ return [];
79
+ }
80
+ const fields = [];
81
+ const entityConnections = entityType ? connectionFieldsMap?.[entityType] : undefined;
82
+ for (const [key, value] of Object.entries(select)) {
83
+ if (value === false || value === undefined) {
84
+ continue;
85
+ }
86
+ if (value === true) {
87
+ fields.push(t.field({ name: key }));
88
+ continue;
89
+ }
90
+ if (typeof value === 'object' && value !== null) {
91
+ const nested = value;
92
+ if (!nested.select || typeof nested.select !== 'object') {
93
+ throw new Error(`Invalid selection for field "${key}": nested selections must include a "select" object.`);
94
+ }
95
+ const relatedEntityType = entityConnections?.[key];
96
+ const nestedSelections = buildSelections(nested.select, connectionFieldsMap, relatedEntityType);
97
+ const isConnection = nested.connection === true ||
98
+ nested.first !== undefined ||
99
+ nested.filter !== undefined ||
100
+ relatedEntityType !== undefined;
101
+ const args = buildArgs([
102
+ buildOptionalArg('first', nested.first),
103
+ nested.filter
104
+ ? t.argument({
105
+ name: 'filter',
106
+ value: buildValueAst(nested.filter),
107
+ })
108
+ : null,
109
+ buildEnumListArg('orderBy', nested.orderBy),
110
+ ]);
111
+ if (isConnection) {
112
+ fields.push(t.field({
113
+ name: key,
114
+ args,
115
+ selectionSet: t.selectionSet({
116
+ selections: buildConnectionSelections(nestedSelections),
117
+ }),
118
+ }));
119
+ }
120
+ else {
121
+ fields.push(t.field({
122
+ name: key,
123
+ args,
124
+ selectionSet: t.selectionSet({ selections: nestedSelections }),
125
+ }));
126
+ }
127
+ }
128
+ }
129
+ return fields;
130
+ }
131
+ // ============================================================================
132
+ // Document Builders
133
+ // ============================================================================
134
+ export function buildFindManyDocument(operationName, queryField, select, args, filterTypeName, orderByTypeName, connectionFieldsMap) {
135
+ const selections = select
136
+ ? buildSelections(select, connectionFieldsMap, operationName)
137
+ : [t.field({ name: 'id' })];
138
+ const variableDefinitions = [];
139
+ const queryArgs = [];
140
+ const variables = {};
141
+ addVariable({
142
+ varName: 'where',
143
+ argName: 'filter',
144
+ typeName: filterTypeName,
145
+ value: args.where,
146
+ }, variableDefinitions, queryArgs, variables);
147
+ addVariable({
148
+ varName: 'orderBy',
149
+ typeName: '[' + orderByTypeName + '!]',
150
+ value: args.orderBy?.length ? args.orderBy : undefined,
151
+ }, variableDefinitions, queryArgs, variables);
152
+ addVariable({ varName: 'first', typeName: 'Int', value: args.first }, variableDefinitions, queryArgs, variables);
153
+ addVariable({ varName: 'last', typeName: 'Int', value: args.last }, variableDefinitions, queryArgs, variables);
154
+ addVariable({ varName: 'after', typeName: 'Cursor', value: args.after }, variableDefinitions, queryArgs, variables);
155
+ addVariable({ varName: 'before', typeName: 'Cursor', value: args.before }, variableDefinitions, queryArgs, variables);
156
+ addVariable({ varName: 'offset', typeName: 'Int', value: args.offset }, variableDefinitions, queryArgs, variables);
157
+ const document = t.document({
158
+ definitions: [
159
+ t.operationDefinition({
160
+ operation: OP_QUERY,
161
+ name: operationName + 'Query',
162
+ variableDefinitions: variableDefinitions.length ? variableDefinitions : undefined,
163
+ selectionSet: t.selectionSet({
164
+ selections: [
165
+ t.field({
166
+ name: queryField,
167
+ args: queryArgs.length ? queryArgs : undefined,
168
+ selectionSet: t.selectionSet({
169
+ selections: buildConnectionSelections(selections),
170
+ }),
171
+ }),
172
+ ],
173
+ }),
174
+ }),
175
+ ],
176
+ });
177
+ return { document: print(document), variables };
178
+ }
179
+ export function buildFindFirstDocument(operationName, queryField, select, args, filterTypeName, connectionFieldsMap) {
180
+ const selections = select
181
+ ? buildSelections(select, connectionFieldsMap, operationName)
182
+ : [t.field({ name: 'id' })];
183
+ const variableDefinitions = [];
184
+ const queryArgs = [];
185
+ const variables = {};
186
+ // Always add first: 1 for findFirst
187
+ addVariable({ varName: 'first', typeName: 'Int', value: 1 }, variableDefinitions, queryArgs, variables);
188
+ addVariable({
189
+ varName: 'where',
190
+ argName: 'filter',
191
+ typeName: filterTypeName,
192
+ value: args.where,
193
+ }, variableDefinitions, queryArgs, variables);
194
+ const document = t.document({
195
+ definitions: [
196
+ t.operationDefinition({
197
+ operation: OP_QUERY,
198
+ name: operationName + 'Query',
199
+ variableDefinitions,
200
+ selectionSet: t.selectionSet({
201
+ selections: [
202
+ t.field({
203
+ name: queryField,
204
+ args: queryArgs,
205
+ selectionSet: t.selectionSet({
206
+ selections: [
207
+ t.field({
208
+ name: 'nodes',
209
+ selectionSet: t.selectionSet({ selections }),
210
+ }),
211
+ ],
212
+ }),
213
+ }),
214
+ ],
215
+ }),
216
+ }),
217
+ ],
218
+ });
219
+ return { document: print(document), variables };
220
+ }
221
+ export function buildCreateDocument(operationName, mutationField, entityField, select, data, inputTypeName, connectionFieldsMap) {
222
+ const selections = select
223
+ ? buildSelections(select, connectionFieldsMap, operationName)
224
+ : [t.field({ name: 'id' })];
225
+ return {
226
+ document: buildInputMutationDocument({
227
+ operationName,
228
+ mutationField,
229
+ inputTypeName,
230
+ resultSelections: [
231
+ t.field({
232
+ name: entityField,
233
+ selectionSet: t.selectionSet({ selections }),
234
+ }),
235
+ ],
236
+ }),
237
+ variables: {
238
+ input: {
239
+ [entityField]: data,
240
+ },
241
+ },
242
+ };
243
+ }
244
+ export function buildUpdateDocument(operationName, mutationField, entityField, select, where, data, inputTypeName, patchFieldName, connectionFieldsMap) {
245
+ const selections = select
246
+ ? buildSelections(select, connectionFieldsMap, operationName)
247
+ : [t.field({ name: 'id' })];
248
+ return {
249
+ document: buildInputMutationDocument({
250
+ operationName,
251
+ mutationField,
252
+ inputTypeName,
253
+ resultSelections: [
254
+ t.field({
255
+ name: entityField,
256
+ selectionSet: t.selectionSet({ selections }),
257
+ }),
258
+ ],
259
+ }),
260
+ variables: {
261
+ input: {
262
+ id: where.id,
263
+ [patchFieldName]: data,
264
+ },
265
+ },
266
+ };
267
+ }
268
+ export function buildUpdateByPkDocument(operationName, mutationField, entityField, select, id, data, inputTypeName, idFieldName, patchFieldName, connectionFieldsMap) {
269
+ const selections = select
270
+ ? buildSelections(select, connectionFieldsMap, operationName)
271
+ : [t.field({ name: 'id' })];
272
+ return {
273
+ document: buildInputMutationDocument({
274
+ operationName,
275
+ mutationField,
276
+ inputTypeName,
277
+ resultSelections: [
278
+ t.field({
279
+ name: entityField,
280
+ selectionSet: t.selectionSet({ selections }),
281
+ }),
282
+ ],
283
+ }),
284
+ variables: {
285
+ input: {
286
+ [idFieldName]: id,
287
+ [patchFieldName]: data,
288
+ },
289
+ },
290
+ };
291
+ }
292
+ export function buildFindOneDocument(operationName, queryField, id, select, idArgName, idTypeName, connectionFieldsMap) {
293
+ const selections = select
294
+ ? buildSelections(select, connectionFieldsMap, operationName)
295
+ : [t.field({ name: 'id' })];
296
+ const variableDefinitions = [
297
+ t.variableDefinition({
298
+ variable: t.variable({ name: idArgName }),
299
+ type: parseType(idTypeName),
300
+ }),
301
+ ];
302
+ const queryArgs = [
303
+ t.argument({
304
+ name: idArgName,
305
+ value: t.variable({ name: idArgName }),
306
+ }),
307
+ ];
308
+ const document = t.document({
309
+ definitions: [
310
+ t.operationDefinition({
311
+ operation: OP_QUERY,
312
+ name: operationName + 'Query',
313
+ variableDefinitions,
314
+ selectionSet: t.selectionSet({
315
+ selections: [
316
+ t.field({
317
+ name: queryField,
318
+ args: queryArgs,
319
+ selectionSet: t.selectionSet({ selections }),
320
+ }),
321
+ ],
322
+ }),
323
+ }),
324
+ ],
325
+ });
326
+ return {
327
+ document: print(document),
328
+ variables: { [idArgName]: id },
329
+ };
330
+ }
331
+ export function buildDeleteDocument(operationName, mutationField, entityField, where, inputTypeName, select, connectionFieldsMap) {
332
+ const entitySelections = select
333
+ ? buildSelections(select, connectionFieldsMap, operationName)
334
+ : [t.field({ name: 'id' })];
335
+ return {
336
+ document: buildInputMutationDocument({
337
+ operationName,
338
+ mutationField,
339
+ inputTypeName,
340
+ resultSelections: [
341
+ t.field({
342
+ name: entityField,
343
+ selectionSet: t.selectionSet({
344
+ selections: entitySelections,
345
+ }),
346
+ }),
347
+ ],
348
+ }),
349
+ variables: {
350
+ input: {
351
+ id: where.id,
352
+ },
353
+ },
354
+ };
355
+ }
356
+ export function buildDeleteByPkDocument(operationName, mutationField, entityField, id, inputTypeName, idFieldName, select, connectionFieldsMap) {
357
+ const entitySelections = select
358
+ ? buildSelections(select, connectionFieldsMap, operationName)
359
+ : [t.field({ name: 'id' })];
360
+ return {
361
+ document: buildInputMutationDocument({
362
+ operationName,
363
+ mutationField,
364
+ inputTypeName,
365
+ resultSelections: [
366
+ t.field({
367
+ name: entityField,
368
+ selectionSet: t.selectionSet({ selections: entitySelections }),
369
+ }),
370
+ ],
371
+ }),
372
+ variables: {
373
+ input: {
374
+ [idFieldName]: id,
375
+ },
376
+ },
377
+ };
378
+ }
379
+ export function buildCustomDocument(operationType, operationName, fieldName, select, args, variableDefinitions, connectionFieldsMap, entityType) {
380
+ let actualSelect = select;
381
+ let isConnection = false;
382
+ if (isCustomSelectionWrapper(select)) {
383
+ actualSelect = select.select;
384
+ isConnection = select.connection === true;
385
+ }
386
+ const selections = actualSelect
387
+ ? buildSelections(actualSelect, connectionFieldsMap, entityType)
388
+ : [];
389
+ const variableDefs = variableDefinitions.map((definition) => t.variableDefinition({
390
+ variable: t.variable({ name: definition.name }),
391
+ type: parseType(definition.type),
392
+ }));
393
+ const fieldArgs = variableDefinitions.map((definition) => t.argument({
394
+ name: definition.name,
395
+ value: t.variable({ name: definition.name }),
396
+ }));
397
+ const fieldSelections = isConnection ? buildConnectionSelections(selections) : selections;
398
+ const document = t.document({
399
+ definitions: [
400
+ t.operationDefinition({
401
+ operation: operationType === 'mutation' ? OP_MUTATION : OP_QUERY,
402
+ name: operationName,
403
+ variableDefinitions: variableDefs.length ? variableDefs : undefined,
404
+ selectionSet: t.selectionSet({
405
+ selections: [
406
+ t.field({
407
+ name: fieldName,
408
+ args: fieldArgs.length ? fieldArgs : undefined,
409
+ selectionSet: fieldSelections.length
410
+ ? t.selectionSet({ selections: fieldSelections })
411
+ : undefined,
412
+ }),
413
+ ],
414
+ }),
415
+ }),
416
+ ],
417
+ });
418
+ return {
419
+ document: print(document),
420
+ variables: (args ?? {}),
421
+ };
422
+ }
423
+ function isCustomSelectionWrapper(value) {
424
+ if (!value || typeof value !== 'object' || Array.isArray(value)) {
425
+ return false;
426
+ }
427
+ const record = value;
428
+ const keys = Object.keys(record);
429
+ if (!keys.includes('select') || !keys.includes('connection')) {
430
+ return false;
431
+ }
432
+ if (keys.some((key) => key !== 'select' && key !== 'connection')) {
433
+ return false;
434
+ }
435
+ return !!record.select && typeof record.select === 'object' && !Array.isArray(record.select);
436
+ }
437
+ // ============================================================================
438
+ // Helper Functions
439
+ // ============================================================================
440
+ function buildArgs(args) {
441
+ return args.filter((arg) => arg !== null);
442
+ }
443
+ function buildOptionalArg(name, value) {
444
+ if (value === undefined) {
445
+ return null;
446
+ }
447
+ const valueNode = typeof value === 'number' ? t.intValue({ value: value.toString() }) : t.stringValue({ value });
448
+ return t.argument({ name, value: valueNode });
449
+ }
450
+ function buildEnumListArg(name, values) {
451
+ if (!values || values.length === 0) {
452
+ return null;
453
+ }
454
+ return t.argument({
455
+ name,
456
+ value: t.listValue({
457
+ values: values.map((value) => buildEnumValue(value)),
458
+ }),
459
+ });
460
+ }
461
+ function buildEnumValue(value) {
462
+ return {
463
+ kind: ENUM_VALUE_KIND,
464
+ value,
465
+ };
466
+ }
467
+ function buildPageInfoSelections() {
468
+ return [
469
+ t.field({ name: 'hasNextPage' }),
470
+ t.field({ name: 'hasPreviousPage' }),
471
+ t.field({ name: 'startCursor' }),
472
+ t.field({ name: 'endCursor' }),
473
+ ];
474
+ }
475
+ function buildConnectionSelections(nodeSelections) {
476
+ return [
477
+ t.field({
478
+ name: 'nodes',
479
+ selectionSet: t.selectionSet({ selections: nodeSelections }),
480
+ }),
481
+ t.field({ name: 'totalCount' }),
482
+ t.field({
483
+ name: 'pageInfo',
484
+ selectionSet: t.selectionSet({ selections: buildPageInfoSelections() }),
485
+ }),
486
+ ];
487
+ }
488
+ function buildInputMutationDocument(config) {
489
+ const document = t.document({
490
+ definitions: [
491
+ t.operationDefinition({
492
+ operation: OP_MUTATION,
493
+ name: config.operationName + 'Mutation',
494
+ variableDefinitions: [
495
+ t.variableDefinition({
496
+ variable: t.variable({ name: 'input' }),
497
+ type: parseType(config.inputTypeName + '!'),
498
+ }),
499
+ ],
500
+ selectionSet: t.selectionSet({
501
+ selections: [
502
+ t.field({
503
+ name: config.mutationField,
504
+ args: [
505
+ t.argument({
506
+ name: 'input',
507
+ value: t.variable({ name: 'input' }),
508
+ }),
509
+ ],
510
+ selectionSet: t.selectionSet({
511
+ selections: config.resultSelections,
512
+ }),
513
+ }),
514
+ ],
515
+ }),
516
+ }),
517
+ ],
518
+ });
519
+ return print(document);
520
+ }
521
+ function addVariable(spec, definitions, args, variables) {
522
+ if (spec.value === undefined)
523
+ return;
524
+ definitions.push(t.variableDefinition({
525
+ variable: t.variable({ name: spec.varName }),
526
+ type: parseType(spec.typeName),
527
+ }));
528
+ args.push(t.argument({
529
+ name: spec.argName ?? spec.varName,
530
+ value: t.variable({ name: spec.varName }),
531
+ }));
532
+ variables[spec.varName] = spec.value;
533
+ }
534
+ function buildValueAst(value) {
535
+ if (value === null) {
536
+ return t.nullValue();
537
+ }
538
+ if (typeof value === 'boolean') {
539
+ return t.booleanValue({ value });
540
+ }
541
+ if (typeof value === 'number') {
542
+ return Number.isInteger(value)
543
+ ? t.intValue({ value: value.toString() })
544
+ : t.floatValue({ value: value.toString() });
545
+ }
546
+ if (typeof value === 'string') {
547
+ return t.stringValue({ value });
548
+ }
549
+ if (Array.isArray(value)) {
550
+ return t.listValue({
551
+ values: value.map((item) => buildValueAst(item)),
552
+ });
553
+ }
554
+ if (typeof value === 'object' && value !== null) {
555
+ const obj = value;
556
+ return t.objectValue({
557
+ fields: Object.entries(obj).map(([key, val]) => t.objectField({
558
+ name: key,
559
+ value: buildValueAst(val),
560
+ })),
561
+ });
562
+ }
563
+ throw new Error('Unsupported value type: ' + typeof value);
564
+ }
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Type utilities for select inference
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ export interface ConnectionResult<T> {
7
+ nodes: T[];
8
+ totalCount: number;
9
+ pageInfo: PageInfo;
10
+ }
11
+ export interface PageInfo {
12
+ hasNextPage: boolean;
13
+ hasPreviousPage: boolean;
14
+ startCursor?: string | null;
15
+ endCursor?: string | null;
16
+ }
17
+ export interface FindManyArgs<TSelect, TWhere, TOrderBy> {
18
+ select?: TSelect;
19
+ where?: TWhere;
20
+ orderBy?: TOrderBy[];
21
+ first?: number;
22
+ last?: number;
23
+ after?: string;
24
+ before?: string;
25
+ offset?: number;
26
+ }
27
+ export interface FindFirstArgs<TSelect, TWhere> {
28
+ select?: TSelect;
29
+ where?: TWhere;
30
+ }
31
+ export interface CreateArgs<TSelect, TData> {
32
+ data: TData;
33
+ select?: TSelect;
34
+ }
35
+ export interface UpdateArgs<TSelect, TWhere, TData> {
36
+ where: TWhere;
37
+ data: TData;
38
+ select?: TSelect;
39
+ }
40
+ export type FindOneArgs<TSelect, TIdName extends string = 'id', TId = string> = {
41
+ select?: TSelect;
42
+ } & Record<TIdName, TId>;
43
+ export interface DeleteArgs<TWhere, TSelect = undefined> {
44
+ where: TWhere;
45
+ select?: TSelect;
46
+ }
47
+ type DepthLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
48
+ type DecrementDepth = {
49
+ 0: 0;
50
+ 1: 0;
51
+ 2: 1;
52
+ 3: 2;
53
+ 4: 3;
54
+ 5: 4;
55
+ 6: 5;
56
+ 7: 6;
57
+ 8: 7;
58
+ 9: 8;
59
+ 10: 9;
60
+ };
61
+ /**
62
+ * Recursively validates select objects, rejecting unknown keys.
63
+ *
64
+ * NOTE: Depth is intentionally capped to avoid circular-instantiation issues
65
+ * in very large cyclic schemas.
66
+ */
67
+ export type DeepExact<T, Shape, Depth extends DepthLevel = 10> = Depth extends 0 ? T extends Shape ? T : never : T extends Shape ? Exclude<keyof T, keyof Shape> extends never ? {
68
+ [K in keyof T]: K extends keyof Shape ? T[K] extends {
69
+ select: infer NS;
70
+ } ? Extract<Shape[K], {
71
+ select?: unknown;
72
+ }> extends {
73
+ select?: infer ShapeNS;
74
+ } ? DeepExact<Omit<T[K], 'select'> & {
75
+ select: DeepExact<NS, NonNullable<ShapeNS>, DecrementDepth[Depth]>;
76
+ }, Extract<Shape[K], {
77
+ select?: unknown;
78
+ }>, DecrementDepth[Depth]> : never : T[K] : never;
79
+ } : never : never;
80
+ /**
81
+ * Enforces exact select shape while keeping contextual typing on `S extends XxxSelect`.
82
+ * Use this as an intersection in overloads:
83
+ * `{ select: S } & StrictSelect<S, XxxSelect>`.
84
+ */
85
+ export type StrictSelect<S, Shape> = S extends DeepExact<S, Shape> ? {} : never;
86
+ /**
87
+ * Hook-optimized strict select variant.
88
+ *
89
+ * Uses a shallower recursion depth to keep editor autocomplete responsive
90
+ * in large schemas while still validating common nested-select mistakes.
91
+ */
92
+ export type HookStrictSelect<S, Shape> = S extends DeepExact<S, Shape, 5> ? {} : never;
93
+ /**
94
+ * Infer result type from select configuration
95
+ */
96
+ export type InferSelectResult<TEntity, TSelect> = TSelect extends undefined ? TEntity : {
97
+ [K in keyof TSelect as TSelect[K] extends false | undefined ? never : K]: TSelect[K] extends true ? K extends keyof TEntity ? TEntity[K] : never : TSelect[K] extends {
98
+ select: infer NestedSelect;
99
+ } ? K extends keyof TEntity ? NonNullable<TEntity[K]> extends ConnectionResult<infer NodeType> ? ConnectionResult<InferSelectResult<NodeType, NestedSelect>> : InferSelectResult<NonNullable<TEntity[K]>, NestedSelect> | (null extends TEntity[K] ? null : never) : never : K extends keyof TEntity ? TEntity[K] : never;
100
+ };
101
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Types re-export
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ export * from './input-types';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Types re-export
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ // Re-export all types from input-types
7
+ export * from './input-types';
package/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @constructive-io/sdk
3
+ *
4
+ * Auto-generated GraphQL types and ORM client.
5
+ * Run `pnpm run generate` to populate this package from the schema files.
6
+ *
7
+ * @generated by @constructive-io/graphql-codegen
8
+ */
9
+ export * as admin from './admin';
10
+ export * as auth from './auth';
11
+ export * as objects from './objects';
12
+ export * as public_ from './public';