@constructive-sdk/cli 0.10.0 → 0.10.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 (276) hide show
  1. package/README.md +0 -8
  2. package/admin/cli/commands/app-level-requirement.js +0 -2
  3. package/admin/cli/commands/app-level.js +0 -2
  4. package/admin/cli/commands/app-permission.js +0 -2
  5. package/admin/cli/commands/invite.js +0 -2
  6. package/admin/cli/commands/membership-type.js +0 -3
  7. package/admin/cli/commands/org-chart-edge-grant.js +3 -3
  8. package/admin/cli/commands/org-chart-edge.js +0 -2
  9. package/admin/cli/commands/org-invite.js +0 -2
  10. package/admin/cli/commands/org-permission.js +0 -2
  11. package/admin/orm/input-types.d.ts +33 -127
  12. package/auth/cli/commands/audit-log.js +0 -2
  13. package/auth/cli/commands/connected-account.js +0 -3
  14. package/auth/cli/commands/crypto-address.js +0 -2
  15. package/auth/cli/commands/phone-number.js +0 -3
  16. package/auth/cli/commands.js +7 -7
  17. package/auth/cli/executor.d.ts +3 -3
  18. package/auth/orm/index.d.ts +6 -6
  19. package/auth/orm/index.js +6 -6
  20. package/auth/orm/input-types.d.ts +279 -327
  21. package/auth/orm/input-types.js +9 -1
  22. package/auth/orm/models/index.d.ts +3 -3
  23. package/auth/orm/models/index.js +7 -7
  24. package/esm/admin/cli/commands/app-level-requirement.js +0 -2
  25. package/esm/admin/cli/commands/app-level.js +0 -2
  26. package/esm/admin/cli/commands/app-permission.js +0 -2
  27. package/esm/admin/cli/commands/invite.js +0 -2
  28. package/esm/admin/cli/commands/membership-type.js +0 -3
  29. package/esm/admin/cli/commands/org-chart-edge-grant.js +3 -3
  30. package/esm/admin/cli/commands/org-chart-edge.js +0 -2
  31. package/esm/admin/cli/commands/org-invite.js +0 -2
  32. package/esm/admin/cli/commands/org-permission.js +0 -2
  33. package/esm/admin/orm/input-types.d.ts +33 -127
  34. package/esm/auth/cli/commands/audit-log.js +0 -2
  35. package/esm/auth/cli/commands/connected-account.js +0 -3
  36. package/esm/auth/cli/commands/crypto-address.js +0 -2
  37. package/esm/auth/cli/commands/phone-number.js +0 -3
  38. package/esm/auth/cli/commands.js +7 -7
  39. package/esm/auth/cli/executor.d.ts +3 -3
  40. package/esm/auth/orm/index.d.ts +6 -6
  41. package/esm/auth/orm/index.js +6 -6
  42. package/esm/auth/orm/input-types.d.ts +279 -327
  43. package/esm/auth/orm/input-types.js +9 -1
  44. package/esm/auth/orm/models/index.d.ts +3 -3
  45. package/esm/auth/orm/models/index.js +3 -3
  46. package/esm/index.d.ts +3 -3
  47. package/esm/index.js +3 -3
  48. package/esm/objects/cli/commands/commit.js +0 -2
  49. package/esm/objects/cli/commands/ref.js +0 -2
  50. package/esm/objects/cli/commands/store.js +0 -2
  51. package/esm/objects/orm/input-types.d.ts +17 -48
  52. package/esm/public/cli/commands/accept-database-transfer.d.ts +8 -0
  53. package/esm/public/cli/commands/accept-database-transfer.js +34 -0
  54. package/esm/public/cli/commands/api-module.js +0 -2
  55. package/esm/public/cli/commands/api.js +0 -5
  56. package/esm/public/cli/commands/app-level-requirement.js +0 -2
  57. package/esm/public/cli/commands/app-level.js +0 -2
  58. package/esm/public/cli/commands/app-permission.js +0 -2
  59. package/esm/public/cli/commands/app.js +0 -4
  60. package/esm/public/cli/commands/ast-migration.js +0 -2
  61. package/esm/public/cli/commands/audit-log.js +0 -2
  62. package/esm/public/cli/commands/blueprint-template.d.ts +8 -0
  63. package/esm/public/cli/commands/blueprint-template.js +549 -0
  64. package/esm/public/cli/commands/{uuid-module.d.ts → blueprint.d.ts} +1 -1
  65. package/esm/public/cli/commands/blueprint.js +484 -0
  66. package/esm/public/cli/commands/cancel-database-transfer.d.ts +8 -0
  67. package/esm/public/cli/commands/cancel-database-transfer.js +34 -0
  68. package/esm/public/cli/commands/check-constraint.js +0 -4
  69. package/esm/public/cli/commands/commit.js +0 -2
  70. package/esm/public/cli/commands/connected-account.js +0 -3
  71. package/esm/public/cli/commands/connected-accounts-module.js +0 -2
  72. package/esm/public/cli/commands/construct-blueprint.d.ts +8 -0
  73. package/esm/public/cli/commands/construct-blueprint.js +34 -0
  74. package/esm/public/cli/commands/copy-template-to-blueprint.d.ts +8 -0
  75. package/esm/public/cli/commands/copy-template-to-blueprint.js +34 -0
  76. package/esm/public/cli/commands/crypto-address.js +0 -2
  77. package/esm/public/cli/commands/crypto-addresses-module.js +0 -3
  78. package/esm/public/cli/commands/crypto-auth-module.js +0 -7
  79. package/esm/public/cli/commands/database-provision-module.js +0 -6
  80. package/esm/public/cli/commands/database-transfer.d.ts +8 -0
  81. package/esm/public/cli/commands/database-transfer.js +425 -0
  82. package/esm/public/cli/commands/database.js +0 -4
  83. package/esm/public/cli/commands/default-privilege.js +0 -4
  84. package/esm/public/cli/commands/denormalized-table-field.js +0 -2
  85. package/esm/public/cli/commands/emails-module.js +0 -2
  86. package/esm/public/cli/commands/embedding-chunk.d.ts +8 -0
  87. package/esm/public/cli/commands/embedding-chunk.js +513 -0
  88. package/esm/public/cli/commands/encrypted-secrets-module.js +0 -2
  89. package/{public/cli/commands/uuid-module.d.ts → esm/public/cli/commands/enum.d.ts} +1 -1
  90. package/esm/public/cli/commands/{uuid-module.js → enum.js} +175 -33
  91. package/esm/public/cli/commands/field-module.js +0 -2
  92. package/esm/public/cli/commands/field.js +21 -7
  93. package/esm/public/cli/commands/foreign-key-constraint.js +0 -7
  94. package/esm/public/cli/commands/hierarchy-module.js +0 -11
  95. package/esm/public/cli/commands/index.js +0 -4
  96. package/esm/public/cli/commands/invite.js +0 -2
  97. package/esm/public/cli/commands/invites-module.js +0 -5
  98. package/esm/public/cli/commands/levels-module.js +0 -16
  99. package/esm/public/cli/commands/limits-module.js +0 -10
  100. package/esm/public/cli/commands/membership-type.js +0 -3
  101. package/esm/public/cli/commands/membership-types-module.js +0 -2
  102. package/esm/public/cli/commands/memberships-module.js +0 -13
  103. package/esm/public/cli/commands/node-type-registry.js +0 -6
  104. package/esm/public/cli/commands/org-chart-edge-grant.js +3 -3
  105. package/esm/public/cli/commands/org-chart-edge.js +0 -2
  106. package/esm/public/cli/commands/org-invite.js +0 -2
  107. package/esm/public/cli/commands/org-permission.js +0 -2
  108. package/esm/public/cli/commands/permissions-module.js +0 -8
  109. package/esm/public/cli/commands/phone-number.js +0 -3
  110. package/esm/public/cli/commands/phone-numbers-module.js +0 -2
  111. package/esm/public/cli/commands/policy.js +0 -6
  112. package/esm/public/cli/commands/primary-key-constraint.js +0 -4
  113. package/esm/public/cli/commands/profiles-module.js +0 -6
  114. package/esm/public/cli/commands/ref.js +0 -2
  115. package/esm/public/cli/commands/reject-database-transfer.d.ts +8 -0
  116. package/esm/public/cli/commands/reject-database-transfer.js +34 -0
  117. package/esm/public/cli/commands/relation-provision.js +63 -11
  118. package/esm/public/cli/commands/rls-module.js +0 -5
  119. package/esm/public/cli/commands/schema-grant.js +0 -2
  120. package/esm/public/cli/commands/schema.js +0 -6
  121. package/esm/public/cli/commands/secrets-module.js +0 -2
  122. package/esm/public/cli/commands/secure-table-provision.js +0 -6
  123. package/esm/public/cli/commands/sessions-module.js +0 -4
  124. package/esm/public/cli/commands/site-metadatum.js +0 -3
  125. package/esm/public/cli/commands/site-module.js +0 -2
  126. package/esm/public/cli/commands/site.js +0 -4
  127. package/esm/public/cli/commands/sql-migration.js +0 -7
  128. package/esm/public/cli/commands/store.js +0 -2
  129. package/esm/public/cli/commands/table-grant.js +0 -3
  130. package/esm/public/cli/commands/table-template-module.js +0 -3
  131. package/esm/public/cli/commands/table.js +0 -7
  132. package/esm/public/cli/commands/trigger-function.js +0 -3
  133. package/esm/public/cli/commands/trigger.js +0 -5
  134. package/esm/public/cli/commands/unique-constraint.js +0 -5
  135. package/esm/public/cli/commands/user-auth-module.js +0 -17
  136. package/esm/public/cli/commands/users-module.js +0 -3
  137. package/esm/public/cli/commands/view-grant.js +0 -3
  138. package/esm/public/cli/commands/view-rule.js +0 -4
  139. package/esm/public/cli/commands/view.js +0 -5
  140. package/esm/public/cli/commands.js +53 -35
  141. package/esm/public/cli/executor.d.ts +68 -39
  142. package/esm/public/orm/index.d.ts +81 -48
  143. package/esm/public/orm/index.js +26 -18
  144. package/esm/public/orm/input-types.d.ts +2447 -2980
  145. package/esm/public/orm/input-types.js +26 -1
  146. package/esm/public/orm/models/blueprint.d.ts +56 -0
  147. package/esm/public/orm/models/blueprint.js +94 -0
  148. package/esm/public/orm/models/blueprintTemplate.d.ts +56 -0
  149. package/esm/public/orm/models/blueprintTemplate.js +94 -0
  150. package/esm/public/orm/models/databaseTransfer.d.ts +56 -0
  151. package/esm/public/orm/models/databaseTransfer.js +94 -0
  152. package/esm/public/orm/models/embeddingChunk.d.ts +56 -0
  153. package/esm/public/orm/models/embeddingChunk.js +94 -0
  154. package/esm/public/orm/models/enum.d.ts +56 -0
  155. package/esm/public/orm/models/{uuidModule.js → enum.js} +23 -23
  156. package/esm/public/orm/models/index.d.ts +13 -9
  157. package/esm/public/orm/models/index.js +13 -9
  158. package/esm/public/orm/mutation/index.d.ts +98 -50
  159. package/esm/public/orm/mutation/index.js +126 -66
  160. package/index.d.ts +3 -3
  161. package/index.js +8 -8
  162. package/objects/cli/commands/commit.js +0 -2
  163. package/objects/cli/commands/ref.js +0 -2
  164. package/objects/cli/commands/store.js +0 -2
  165. package/objects/orm/input-types.d.ts +17 -48
  166. package/package.json +3 -3
  167. package/public/cli/commands/accept-database-transfer.d.ts +8 -0
  168. package/public/cli/commands/accept-database-transfer.js +36 -0
  169. package/public/cli/commands/api-module.js +0 -2
  170. package/public/cli/commands/api.js +0 -5
  171. package/public/cli/commands/app-level-requirement.js +0 -2
  172. package/public/cli/commands/app-level.js +0 -2
  173. package/public/cli/commands/app-permission.js +0 -2
  174. package/public/cli/commands/app.js +0 -4
  175. package/public/cli/commands/ast-migration.js +0 -2
  176. package/public/cli/commands/audit-log.js +0 -2
  177. package/public/cli/commands/blueprint-template.d.ts +8 -0
  178. package/public/cli/commands/blueprint-template.js +551 -0
  179. package/public/cli/commands/blueprint.d.ts +8 -0
  180. package/public/cli/commands/blueprint.js +486 -0
  181. package/public/cli/commands/cancel-database-transfer.d.ts +8 -0
  182. package/public/cli/commands/cancel-database-transfer.js +36 -0
  183. package/public/cli/commands/check-constraint.js +0 -4
  184. package/public/cli/commands/commit.js +0 -2
  185. package/public/cli/commands/connected-account.js +0 -3
  186. package/public/cli/commands/connected-accounts-module.js +0 -2
  187. package/public/cli/commands/construct-blueprint.d.ts +8 -0
  188. package/public/cli/commands/construct-blueprint.js +36 -0
  189. package/public/cli/commands/copy-template-to-blueprint.d.ts +8 -0
  190. package/public/cli/commands/copy-template-to-blueprint.js +36 -0
  191. package/public/cli/commands/crypto-address.js +0 -2
  192. package/public/cli/commands/crypto-addresses-module.js +0 -3
  193. package/public/cli/commands/crypto-auth-module.js +0 -7
  194. package/public/cli/commands/database-provision-module.js +0 -6
  195. package/public/cli/commands/database-transfer.d.ts +8 -0
  196. package/public/cli/commands/database-transfer.js +427 -0
  197. package/public/cli/commands/database.js +0 -4
  198. package/public/cli/commands/default-privilege.js +0 -4
  199. package/public/cli/commands/denormalized-table-field.js +0 -2
  200. package/public/cli/commands/emails-module.js +0 -2
  201. package/public/cli/commands/embedding-chunk.d.ts +8 -0
  202. package/public/cli/commands/embedding-chunk.js +515 -0
  203. package/public/cli/commands/encrypted-secrets-module.js +0 -2
  204. package/public/cli/commands/enum.d.ts +8 -0
  205. package/public/cli/commands/{uuid-module.js → enum.js} +175 -33
  206. package/public/cli/commands/field-module.js +0 -2
  207. package/public/cli/commands/field.js +21 -7
  208. package/public/cli/commands/foreign-key-constraint.js +0 -7
  209. package/public/cli/commands/hierarchy-module.js +0 -11
  210. package/public/cli/commands/index.js +0 -4
  211. package/public/cli/commands/invite.js +0 -2
  212. package/public/cli/commands/invites-module.js +0 -5
  213. package/public/cli/commands/levels-module.js +0 -16
  214. package/public/cli/commands/limits-module.js +0 -10
  215. package/public/cli/commands/membership-type.js +0 -3
  216. package/public/cli/commands/membership-types-module.js +0 -2
  217. package/public/cli/commands/memberships-module.js +0 -13
  218. package/public/cli/commands/node-type-registry.js +0 -6
  219. package/public/cli/commands/org-chart-edge-grant.js +3 -3
  220. package/public/cli/commands/org-chart-edge.js +0 -2
  221. package/public/cli/commands/org-invite.js +0 -2
  222. package/public/cli/commands/org-permission.js +0 -2
  223. package/public/cli/commands/permissions-module.js +0 -8
  224. package/public/cli/commands/phone-number.js +0 -3
  225. package/public/cli/commands/phone-numbers-module.js +0 -2
  226. package/public/cli/commands/policy.js +0 -6
  227. package/public/cli/commands/primary-key-constraint.js +0 -4
  228. package/public/cli/commands/profiles-module.js +0 -6
  229. package/public/cli/commands/ref.js +0 -2
  230. package/public/cli/commands/reject-database-transfer.d.ts +8 -0
  231. package/public/cli/commands/reject-database-transfer.js +36 -0
  232. package/public/cli/commands/relation-provision.js +63 -11
  233. package/public/cli/commands/rls-module.js +0 -5
  234. package/public/cli/commands/schema-grant.js +0 -2
  235. package/public/cli/commands/schema.js +0 -6
  236. package/public/cli/commands/secrets-module.js +0 -2
  237. package/public/cli/commands/secure-table-provision.js +0 -6
  238. package/public/cli/commands/sessions-module.js +0 -4
  239. package/public/cli/commands/site-metadatum.js +0 -3
  240. package/public/cli/commands/site-module.js +0 -2
  241. package/public/cli/commands/site.js +0 -4
  242. package/public/cli/commands/sql-migration.js +0 -7
  243. package/public/cli/commands/store.js +0 -2
  244. package/public/cli/commands/table-grant.js +0 -3
  245. package/public/cli/commands/table-template-module.js +0 -3
  246. package/public/cli/commands/table.js +0 -7
  247. package/public/cli/commands/trigger-function.js +0 -3
  248. package/public/cli/commands/trigger.js +0 -5
  249. package/public/cli/commands/unique-constraint.js +0 -5
  250. package/public/cli/commands/user-auth-module.js +0 -17
  251. package/public/cli/commands/users-module.js +0 -3
  252. package/public/cli/commands/view-grant.js +0 -3
  253. package/public/cli/commands/view-rule.js +0 -4
  254. package/public/cli/commands/view.js +0 -5
  255. package/public/cli/commands.js +53 -35
  256. package/public/cli/executor.d.ts +68 -39
  257. package/public/orm/index.d.ts +81 -48
  258. package/public/orm/index.js +26 -18
  259. package/public/orm/input-types.d.ts +2447 -2980
  260. package/public/orm/input-types.js +26 -1
  261. package/public/orm/models/blueprint.d.ts +56 -0
  262. package/public/orm/models/blueprint.js +98 -0
  263. package/public/orm/models/blueprintTemplate.d.ts +56 -0
  264. package/public/orm/models/blueprintTemplate.js +98 -0
  265. package/public/orm/models/databaseTransfer.d.ts +56 -0
  266. package/public/orm/models/databaseTransfer.js +98 -0
  267. package/public/orm/models/embeddingChunk.d.ts +56 -0
  268. package/public/orm/models/embeddingChunk.js +98 -0
  269. package/public/orm/models/enum.d.ts +56 -0
  270. package/public/orm/models/{uuidModule.js → enum.js} +25 -25
  271. package/public/orm/models/index.d.ts +13 -9
  272. package/public/orm/models/index.js +29 -21
  273. package/public/orm/mutation/index.d.ts +98 -50
  274. package/public/orm/mutation/index.js +126 -66
  275. package/esm/public/orm/models/uuidModule.d.ts +0 -56
  276. package/public/orm/models/uuidModule.d.ts +0 -56
@@ -21,13 +21,6 @@ const fieldSchema = {
21
21
  signInRecordFailure: 'string',
22
22
  signUpWithKey: 'string',
23
23
  signInWithChallenge: 'string',
24
- userFieldTrgmSimilarity: 'float',
25
- cryptoNetworkTrgmSimilarity: 'float',
26
- signInRequestChallengeTrgmSimilarity: 'float',
27
- signInRecordFailureTrgmSimilarity: 'float',
28
- signUpWithKeyTrgmSimilarity: 'float',
29
- signInWithChallengeTrgmSimilarity: 'float',
30
- searchScore: 'float',
31
24
  };
32
25
  const usage = '\ncrypto-auth-module <command>\n\nCommands:\n list List all cryptoAuthModule records\n get Get a cryptoAuthModule by ID\n create Create a new cryptoAuthModule\n update Update an existing cryptoAuthModule\n delete Delete a cryptoAuthModule\n\n --help, -h Show this help message\n';
33
26
  export default async (argv, prompter, _options) => {
@@ -21,12 +21,6 @@ const fieldSchema = {
21
21
  createdAt: 'string',
22
22
  updatedAt: 'string',
23
23
  completedAt: 'string',
24
- databaseNameTrgmSimilarity: 'float',
25
- subdomainTrgmSimilarity: 'float',
26
- domainTrgmSimilarity: 'float',
27
- statusTrgmSimilarity: 'float',
28
- errorMessageTrgmSimilarity: 'float',
29
- searchScore: 'float',
30
24
  };
31
25
  const usage = '\ndatabase-provision-module <command>\n\nCommands:\n list List all databaseProvisionModule records\n get Get a databaseProvisionModule by ID\n create Create a new databaseProvisionModule\n update Update an existing databaseProvisionModule\n delete Delete a databaseProvisionModule\n\n --help, -h Show this help message\n';
32
26
  export default async (argv, prompter, _options) => {
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI commands for DatabaseTransfer
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { CLIOptions, Inquirerer } from 'inquirerer';
7
+ declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
8
+ export default _default;
@@ -0,0 +1,425 @@
1
+ /**
2
+ * CLI commands for DatabaseTransfer
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { extractFirst } from 'inquirerer';
7
+ import { getClient } from '../executor';
8
+ import { coerceAnswers, stripUndefined } from '../utils';
9
+ const fieldSchema = {
10
+ id: 'uuid',
11
+ databaseId: 'uuid',
12
+ targetOwnerId: 'uuid',
13
+ sourceApproved: 'boolean',
14
+ targetApproved: 'boolean',
15
+ sourceApprovedAt: 'string',
16
+ targetApprovedAt: 'string',
17
+ status: 'string',
18
+ initiatedBy: 'uuid',
19
+ notes: 'string',
20
+ expiresAt: 'string',
21
+ createdAt: 'string',
22
+ updatedAt: 'string',
23
+ completedAt: 'string',
24
+ };
25
+ const usage = '\ndatabase-transfer <command>\n\nCommands:\n list List all databaseTransfer records\n get Get a databaseTransfer by ID\n create Create a new databaseTransfer\n update Update an existing databaseTransfer\n delete Delete a databaseTransfer\n\n --help, -h Show this help message\n';
26
+ export default async (argv, prompter, _options) => {
27
+ if (argv.help || argv.h) {
28
+ console.log(usage);
29
+ process.exit(0);
30
+ }
31
+ const { first: subcommand, newArgv } = extractFirst(argv);
32
+ if (!subcommand) {
33
+ const answer = await prompter.prompt(argv, [
34
+ {
35
+ type: 'autocomplete',
36
+ name: 'subcommand',
37
+ message: 'What do you want to do?',
38
+ options: ['list', 'get', 'create', 'update', 'delete'],
39
+ },
40
+ ]);
41
+ return handleTableSubcommand(answer.subcommand, newArgv, prompter);
42
+ }
43
+ return handleTableSubcommand(subcommand, newArgv, prompter);
44
+ };
45
+ async function handleTableSubcommand(subcommand, argv, prompter) {
46
+ switch (subcommand) {
47
+ case 'list':
48
+ return handleList(argv, prompter);
49
+ case 'get':
50
+ return handleGet(argv, prompter);
51
+ case 'create':
52
+ return handleCreate(argv, prompter);
53
+ case 'update':
54
+ return handleUpdate(argv, prompter);
55
+ case 'delete':
56
+ return handleDelete(argv, prompter);
57
+ default:
58
+ console.log(usage);
59
+ process.exit(1);
60
+ }
61
+ }
62
+ async function handleList(_argv, _prompter) {
63
+ try {
64
+ const client = getClient();
65
+ const result = await client.databaseTransfer
66
+ .findMany({
67
+ select: {
68
+ id: true,
69
+ databaseId: true,
70
+ targetOwnerId: true,
71
+ sourceApproved: true,
72
+ targetApproved: true,
73
+ sourceApprovedAt: true,
74
+ targetApprovedAt: true,
75
+ status: true,
76
+ initiatedBy: true,
77
+ notes: true,
78
+ expiresAt: true,
79
+ createdAt: true,
80
+ updatedAt: true,
81
+ completedAt: true,
82
+ },
83
+ })
84
+ .execute();
85
+ console.log(JSON.stringify(result, null, 2));
86
+ }
87
+ catch (error) {
88
+ console.error('Failed to list records.');
89
+ if (error instanceof Error) {
90
+ console.error(error.message);
91
+ }
92
+ process.exit(1);
93
+ }
94
+ }
95
+ async function handleGet(argv, prompter) {
96
+ try {
97
+ const answers = await prompter.prompt(argv, [
98
+ {
99
+ type: 'text',
100
+ name: 'id',
101
+ message: 'id',
102
+ required: true,
103
+ },
104
+ ]);
105
+ const client = getClient();
106
+ const result = await client.databaseTransfer
107
+ .findOne({
108
+ id: answers.id,
109
+ select: {
110
+ id: true,
111
+ databaseId: true,
112
+ targetOwnerId: true,
113
+ sourceApproved: true,
114
+ targetApproved: true,
115
+ sourceApprovedAt: true,
116
+ targetApprovedAt: true,
117
+ status: true,
118
+ initiatedBy: true,
119
+ notes: true,
120
+ expiresAt: true,
121
+ createdAt: true,
122
+ updatedAt: true,
123
+ completedAt: true,
124
+ },
125
+ })
126
+ .execute();
127
+ console.log(JSON.stringify(result, null, 2));
128
+ }
129
+ catch (error) {
130
+ console.error('Record not found.');
131
+ if (error instanceof Error) {
132
+ console.error(error.message);
133
+ }
134
+ process.exit(1);
135
+ }
136
+ }
137
+ async function handleCreate(argv, prompter) {
138
+ try {
139
+ const rawAnswers = await prompter.prompt(argv, [
140
+ {
141
+ type: 'text',
142
+ name: 'databaseId',
143
+ message: 'databaseId',
144
+ required: true,
145
+ },
146
+ {
147
+ type: 'text',
148
+ name: 'targetOwnerId',
149
+ message: 'targetOwnerId',
150
+ required: true,
151
+ },
152
+ {
153
+ type: 'boolean',
154
+ name: 'sourceApproved',
155
+ message: 'sourceApproved',
156
+ required: false,
157
+ skipPrompt: true,
158
+ },
159
+ {
160
+ type: 'boolean',
161
+ name: 'targetApproved',
162
+ message: 'targetApproved',
163
+ required: false,
164
+ skipPrompt: true,
165
+ },
166
+ {
167
+ type: 'text',
168
+ name: 'sourceApprovedAt',
169
+ message: 'sourceApprovedAt',
170
+ required: false,
171
+ skipPrompt: true,
172
+ },
173
+ {
174
+ type: 'text',
175
+ name: 'targetApprovedAt',
176
+ message: 'targetApprovedAt',
177
+ required: false,
178
+ skipPrompt: true,
179
+ },
180
+ {
181
+ type: 'text',
182
+ name: 'status',
183
+ message: 'status',
184
+ required: false,
185
+ skipPrompt: true,
186
+ },
187
+ {
188
+ type: 'text',
189
+ name: 'initiatedBy',
190
+ message: 'initiatedBy',
191
+ required: true,
192
+ },
193
+ {
194
+ type: 'text',
195
+ name: 'notes',
196
+ message: 'notes',
197
+ required: false,
198
+ skipPrompt: true,
199
+ },
200
+ {
201
+ type: 'text',
202
+ name: 'expiresAt',
203
+ message: 'expiresAt',
204
+ required: false,
205
+ skipPrompt: true,
206
+ },
207
+ {
208
+ type: 'text',
209
+ name: 'completedAt',
210
+ message: 'completedAt',
211
+ required: false,
212
+ skipPrompt: true,
213
+ },
214
+ ]);
215
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
216
+ const cleanedData = stripUndefined(answers, fieldSchema);
217
+ const client = getClient();
218
+ const result = await client.databaseTransfer
219
+ .create({
220
+ data: {
221
+ databaseId: cleanedData.databaseId,
222
+ targetOwnerId: cleanedData.targetOwnerId,
223
+ sourceApproved: cleanedData.sourceApproved,
224
+ targetApproved: cleanedData.targetApproved,
225
+ sourceApprovedAt: cleanedData.sourceApprovedAt,
226
+ targetApprovedAt: cleanedData.targetApprovedAt,
227
+ status: cleanedData.status,
228
+ initiatedBy: cleanedData.initiatedBy,
229
+ notes: cleanedData.notes,
230
+ expiresAt: cleanedData.expiresAt,
231
+ completedAt: cleanedData.completedAt,
232
+ },
233
+ select: {
234
+ id: true,
235
+ databaseId: true,
236
+ targetOwnerId: true,
237
+ sourceApproved: true,
238
+ targetApproved: true,
239
+ sourceApprovedAt: true,
240
+ targetApprovedAt: true,
241
+ status: true,
242
+ initiatedBy: true,
243
+ notes: true,
244
+ expiresAt: true,
245
+ createdAt: true,
246
+ updatedAt: true,
247
+ completedAt: true,
248
+ },
249
+ })
250
+ .execute();
251
+ console.log(JSON.stringify(result, null, 2));
252
+ }
253
+ catch (error) {
254
+ console.error('Failed to create record.');
255
+ if (error instanceof Error) {
256
+ console.error(error.message);
257
+ }
258
+ process.exit(1);
259
+ }
260
+ }
261
+ async function handleUpdate(argv, prompter) {
262
+ try {
263
+ const rawAnswers = await prompter.prompt(argv, [
264
+ {
265
+ type: 'text',
266
+ name: 'id',
267
+ message: 'id',
268
+ required: true,
269
+ },
270
+ {
271
+ type: 'text',
272
+ name: 'databaseId',
273
+ message: 'databaseId',
274
+ required: false,
275
+ },
276
+ {
277
+ type: 'text',
278
+ name: 'targetOwnerId',
279
+ message: 'targetOwnerId',
280
+ required: false,
281
+ },
282
+ {
283
+ type: 'boolean',
284
+ name: 'sourceApproved',
285
+ message: 'sourceApproved',
286
+ required: false,
287
+ skipPrompt: true,
288
+ },
289
+ {
290
+ type: 'boolean',
291
+ name: 'targetApproved',
292
+ message: 'targetApproved',
293
+ required: false,
294
+ skipPrompt: true,
295
+ },
296
+ {
297
+ type: 'text',
298
+ name: 'sourceApprovedAt',
299
+ message: 'sourceApprovedAt',
300
+ required: false,
301
+ skipPrompt: true,
302
+ },
303
+ {
304
+ type: 'text',
305
+ name: 'targetApprovedAt',
306
+ message: 'targetApprovedAt',
307
+ required: false,
308
+ skipPrompt: true,
309
+ },
310
+ {
311
+ type: 'text',
312
+ name: 'status',
313
+ message: 'status',
314
+ required: false,
315
+ skipPrompt: true,
316
+ },
317
+ {
318
+ type: 'text',
319
+ name: 'initiatedBy',
320
+ message: 'initiatedBy',
321
+ required: false,
322
+ },
323
+ {
324
+ type: 'text',
325
+ name: 'notes',
326
+ message: 'notes',
327
+ required: false,
328
+ skipPrompt: true,
329
+ },
330
+ {
331
+ type: 'text',
332
+ name: 'expiresAt',
333
+ message: 'expiresAt',
334
+ required: false,
335
+ skipPrompt: true,
336
+ },
337
+ {
338
+ type: 'text',
339
+ name: 'completedAt',
340
+ message: 'completedAt',
341
+ required: false,
342
+ skipPrompt: true,
343
+ },
344
+ ]);
345
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
346
+ const cleanedData = stripUndefined(answers, fieldSchema);
347
+ const client = getClient();
348
+ const result = await client.databaseTransfer
349
+ .update({
350
+ where: {
351
+ id: answers.id,
352
+ },
353
+ data: {
354
+ databaseId: cleanedData.databaseId,
355
+ targetOwnerId: cleanedData.targetOwnerId,
356
+ sourceApproved: cleanedData.sourceApproved,
357
+ targetApproved: cleanedData.targetApproved,
358
+ sourceApprovedAt: cleanedData.sourceApprovedAt,
359
+ targetApprovedAt: cleanedData.targetApprovedAt,
360
+ status: cleanedData.status,
361
+ initiatedBy: cleanedData.initiatedBy,
362
+ notes: cleanedData.notes,
363
+ expiresAt: cleanedData.expiresAt,
364
+ completedAt: cleanedData.completedAt,
365
+ },
366
+ select: {
367
+ id: true,
368
+ databaseId: true,
369
+ targetOwnerId: true,
370
+ sourceApproved: true,
371
+ targetApproved: true,
372
+ sourceApprovedAt: true,
373
+ targetApprovedAt: true,
374
+ status: true,
375
+ initiatedBy: true,
376
+ notes: true,
377
+ expiresAt: true,
378
+ createdAt: true,
379
+ updatedAt: true,
380
+ completedAt: true,
381
+ },
382
+ })
383
+ .execute();
384
+ console.log(JSON.stringify(result, null, 2));
385
+ }
386
+ catch (error) {
387
+ console.error('Failed to update record.');
388
+ if (error instanceof Error) {
389
+ console.error(error.message);
390
+ }
391
+ process.exit(1);
392
+ }
393
+ }
394
+ async function handleDelete(argv, prompter) {
395
+ try {
396
+ const rawAnswers = await prompter.prompt(argv, [
397
+ {
398
+ type: 'text',
399
+ name: 'id',
400
+ message: 'id',
401
+ required: true,
402
+ },
403
+ ]);
404
+ const answers = coerceAnswers(rawAnswers, fieldSchema);
405
+ const client = getClient();
406
+ const result = await client.databaseTransfer
407
+ .delete({
408
+ where: {
409
+ id: answers.id,
410
+ },
411
+ select: {
412
+ id: true,
413
+ },
414
+ })
415
+ .execute();
416
+ console.log(JSON.stringify(result, null, 2));
417
+ }
418
+ catch (error) {
419
+ console.error('Failed to delete record.');
420
+ if (error instanceof Error) {
421
+ console.error(error.message);
422
+ }
423
+ process.exit(1);
424
+ }
425
+ }
@@ -15,10 +15,6 @@ const fieldSchema = {
15
15
  hash: 'uuid',
16
16
  createdAt: 'string',
17
17
  updatedAt: 'string',
18
- schemaHashTrgmSimilarity: 'float',
19
- nameTrgmSimilarity: 'float',
20
- labelTrgmSimilarity: 'float',
21
- searchScore: 'float',
22
18
  };
23
19
  const usage = '\ndatabase <command>\n\nCommands:\n list List all database records\n get Get a database by ID\n create Create a new database\n update Update an existing database\n delete Delete a database\n\n --help, -h Show this help message\n';
24
20
  export default async (argv, prompter, _options) => {
@@ -14,10 +14,6 @@ const fieldSchema = {
14
14
  privilege: 'string',
15
15
  granteeName: 'string',
16
16
  isGrant: 'boolean',
17
- objectTypeTrgmSimilarity: 'float',
18
- privilegeTrgmSimilarity: 'float',
19
- granteeNameTrgmSimilarity: 'float',
20
- searchScore: 'float',
21
17
  };
22
18
  const usage = '\ndefault-privilege <command>\n\nCommands:\n list List all defaultPrivilege records\n get Get a defaultPrivilege by ID\n create Create a new defaultPrivilege\n update Update an existing defaultPrivilege\n delete Delete a defaultPrivilege\n\n --help, -h Show this help message\n';
23
19
  export default async (argv, prompter, _options) => {
@@ -19,8 +19,6 @@ const fieldSchema = {
19
19
  updateDefaults: 'boolean',
20
20
  funcName: 'string',
21
21
  funcOrder: 'int',
22
- funcNameTrgmSimilarity: 'float',
23
- searchScore: 'float',
24
22
  };
25
23
  const usage = '\ndenormalized-table-field <command>\n\nCommands:\n list List all denormalizedTableField records\n get Get a denormalizedTableField by ID\n create Create a new denormalizedTableField\n update Update an existing denormalizedTableField\n delete Delete a denormalizedTableField\n\n --help, -h Show this help message\n';
26
24
  export default async (argv, prompter, _options) => {
@@ -14,8 +14,6 @@ const fieldSchema = {
14
14
  tableId: 'uuid',
15
15
  ownerTableId: 'uuid',
16
16
  tableName: 'string',
17
- tableNameTrgmSimilarity: 'float',
18
- searchScore: 'float',
19
17
  };
20
18
  const usage = '\nemails-module <command>\n\nCommands:\n list List all emailsModule records\n get Get a emailsModule by ID\n create Create a new emailsModule\n update Update an existing emailsModule\n delete Delete a emailsModule\n\n --help, -h Show this help message\n';
21
19
  export default async (argv, prompter, _options) => {
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI commands for EmbeddingChunk
3
+ * @generated by @constructive-io/graphql-codegen
4
+ * DO NOT EDIT - changes will be overwritten
5
+ */
6
+ import { CLIOptions, Inquirerer } from 'inquirerer';
7
+ declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
8
+ export default _default;