@constructive-sdk/cli 0.13.4 → 0.14.1

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 (237) hide show
  1. package/admin/cli/commands/app-membership.js +22 -0
  2. package/admin/cli/commands/membership-type.js +44 -0
  3. package/{auth/cli/commands/connected-account.d.ts → admin/cli/commands/org-member-profile.d.ts} +1 -1
  4. package/admin/cli/commands/org-member-profile.js +392 -0
  5. package/admin/cli/commands/org-membership.js +44 -0
  6. package/admin/cli/commands.js +7 -5
  7. package/admin/cli/executor.d.ts +3 -2
  8. package/admin/orm/index.d.ts +6 -4
  9. package/admin/orm/index.js +6 -4
  10. package/admin/orm/input-types.d.ts +503 -295
  11. package/admin/orm/models/index.d.ts +3 -2
  12. package/admin/orm/models/index.js +7 -5
  13. package/admin/orm/models/orgMemberProfile.d.ts +56 -0
  14. package/{auth/orm/models/connectedAccount.js → admin/orm/models/orgMemberProfile.js} +26 -26
  15. package/{esm/auth/cli/commands/one-time-token.d.ts → auth/cli/commands/create-api-key.d.ts} +1 -1
  16. package/{public/cli/commands/one-time-token.js → auth/cli/commands/create-api-key.js} +3 -3
  17. package/auth/cli/commands/disconnect-account.d.ts +8 -0
  18. package/auth/cli/commands/{sign-in-one-time-token.js → disconnect-account.js} +3 -3
  19. package/auth/cli/commands/provision-new-user.d.ts +8 -0
  20. package/{public/cli/commands/sign-in-one-time-token.js → auth/cli/commands/provision-new-user.js} +3 -3
  21. package/auth/cli/commands/request-cross-origin-token.d.ts +8 -0
  22. package/auth/cli/commands/request-cross-origin-token.js +36 -0
  23. package/auth/cli/commands/require-step-up.d.ts +8 -0
  24. package/auth/cli/commands/require-step-up.js +30 -0
  25. package/auth/cli/commands/{one-time-token.d.ts → revoke-api-key.d.ts} +1 -1
  26. package/auth/cli/commands/{one-time-token.js → revoke-api-key.js} +3 -3
  27. package/auth/cli/commands/revoke-session.d.ts +8 -0
  28. package/auth/cli/commands/revoke-session.js +36 -0
  29. package/auth/cli/commands/sign-in-cross-origin.d.ts +8 -0
  30. package/auth/cli/commands/sign-in-cross-origin.js +36 -0
  31. package/auth/cli/commands/user-connected-account.d.ts +8 -0
  32. package/auth/cli/commands/user-connected-account.js +176 -0
  33. package/auth/cli/commands.js +23 -11
  34. package/auth/cli/executor.d.ts +44 -14
  35. package/auth/orm/index.d.ts +45 -15
  36. package/auth/orm/index.js +2 -2
  37. package/auth/orm/input-types.d.ts +186 -251
  38. package/auth/orm/input-types.js +0 -1
  39. package/auth/orm/models/index.d.ts +1 -1
  40. package/auth/orm/models/index.js +3 -3
  41. package/auth/orm/models/userConnectedAccount.d.ts +38 -0
  42. package/auth/orm/models/userConnectedAccount.js +76 -0
  43. package/auth/orm/mutation/index.d.ts +56 -16
  44. package/auth/orm/mutation/index.js +78 -18
  45. package/auth/orm/query/index.d.ts +12 -4
  46. package/auth/orm/query/index.js +19 -7
  47. package/esm/admin/cli/commands/app-membership.js +22 -0
  48. package/esm/admin/cli/commands/membership-type.js +44 -0
  49. package/esm/{public/cli/commands/connected-account.d.ts → admin/cli/commands/org-member-profile.d.ts} +1 -1
  50. package/esm/admin/cli/commands/org-member-profile.js +390 -0
  51. package/esm/admin/cli/commands/org-membership.js +44 -0
  52. package/esm/admin/cli/commands.js +7 -5
  53. package/esm/admin/cli/executor.d.ts +3 -2
  54. package/esm/admin/orm/index.d.ts +6 -4
  55. package/esm/admin/orm/index.js +6 -4
  56. package/esm/admin/orm/input-types.d.ts +503 -295
  57. package/esm/admin/orm/models/index.d.ts +3 -2
  58. package/esm/admin/orm/models/index.js +3 -2
  59. package/esm/admin/orm/models/orgMemberProfile.d.ts +56 -0
  60. package/esm/{public/orm/models/connectedAccount.js → admin/orm/models/orgMemberProfile.js} +24 -24
  61. package/esm/auth/cli/commands/create-api-key.d.ts +8 -0
  62. package/esm/{public/cli/commands/one-time-token.js → auth/cli/commands/create-api-key.js} +3 -3
  63. package/esm/auth/cli/commands/disconnect-account.d.ts +8 -0
  64. package/esm/auth/cli/commands/{sign-in-one-time-token.js → disconnect-account.js} +3 -3
  65. package/esm/auth/cli/commands/provision-new-user.d.ts +8 -0
  66. package/esm/{public/cli/commands/sign-in-one-time-token.js → auth/cli/commands/provision-new-user.js} +3 -3
  67. package/esm/auth/cli/commands/request-cross-origin-token.d.ts +8 -0
  68. package/esm/auth/cli/commands/request-cross-origin-token.js +34 -0
  69. package/esm/auth/cli/commands/require-step-up.d.ts +8 -0
  70. package/esm/auth/cli/commands/require-step-up.js +28 -0
  71. package/esm/auth/cli/commands/revoke-api-key.d.ts +8 -0
  72. package/esm/auth/cli/commands/{one-time-token.js → revoke-api-key.js} +3 -3
  73. package/esm/auth/cli/commands/revoke-session.d.ts +8 -0
  74. package/esm/auth/cli/commands/revoke-session.js +34 -0
  75. package/esm/auth/cli/commands/sign-in-cross-origin.d.ts +8 -0
  76. package/esm/auth/cli/commands/sign-in-cross-origin.js +34 -0
  77. package/esm/auth/cli/commands/user-connected-account.d.ts +8 -0
  78. package/esm/auth/cli/commands/user-connected-account.js +174 -0
  79. package/esm/auth/cli/commands.js +23 -11
  80. package/esm/auth/cli/executor.d.ts +44 -14
  81. package/esm/auth/orm/index.d.ts +45 -15
  82. package/esm/auth/orm/index.js +2 -2
  83. package/esm/auth/orm/input-types.d.ts +186 -251
  84. package/esm/auth/orm/input-types.js +0 -1
  85. package/esm/auth/orm/models/index.d.ts +1 -1
  86. package/esm/auth/orm/models/index.js +1 -1
  87. package/esm/auth/orm/models/userConnectedAccount.d.ts +38 -0
  88. package/esm/auth/orm/models/userConnectedAccount.js +72 -0
  89. package/esm/auth/orm/mutation/index.d.ts +56 -16
  90. package/esm/auth/orm/mutation/index.js +78 -18
  91. package/esm/auth/orm/query/index.d.ts +12 -4
  92. package/esm/auth/orm/query/index.js +19 -7
  93. package/esm/public/cli/commands/app-membership.js +22 -0
  94. package/esm/public/cli/commands/construct-blueprint.js +1 -1
  95. package/esm/public/cli/commands/create-api-key.d.ts +8 -0
  96. package/esm/public/cli/commands/create-api-key.js +34 -0
  97. package/{public/cli/commands/connected-account.d.ts → esm/public/cli/commands/devices-module.d.ts} +1 -1
  98. package/esm/public/cli/commands/{connected-account.js → devices-module.js} +101 -87
  99. package/esm/public/cli/commands/disconnect-account.d.ts +8 -0
  100. package/esm/public/cli/commands/disconnect-account.js +34 -0
  101. package/esm/public/cli/commands/{table-template-module.d.ts → entity-type-provision.d.ts} +1 -1
  102. package/esm/public/cli/commands/entity-type-provision.js +554 -0
  103. package/esm/public/cli/commands/membership-type.js +44 -0
  104. package/esm/public/cli/commands/memberships-module.js +22 -0
  105. package/esm/{auth/cli/commands/connected-account.d.ts → public/cli/commands/org-member-profile.d.ts} +1 -1
  106. package/esm/public/cli/commands/org-member-profile.js +390 -0
  107. package/esm/public/cli/commands/org-membership.js +44 -0
  108. package/esm/public/cli/commands/provision-new-user.d.ts +8 -0
  109. package/esm/public/cli/commands/provision-new-user.js +34 -0
  110. package/esm/public/cli/commands/provision-spatial-relation.d.ts +8 -0
  111. package/esm/public/cli/commands/provision-spatial-relation.js +34 -0
  112. package/esm/public/cli/commands/request-cross-origin-token.d.ts +8 -0
  113. package/esm/public/cli/commands/request-cross-origin-token.js +34 -0
  114. package/esm/public/cli/commands/require-step-up.d.ts +8 -0
  115. package/esm/public/cli/commands/require-step-up.js +28 -0
  116. package/{auth/cli/commands/sign-in-one-time-token.d.ts → esm/public/cli/commands/resolve-blueprint-field.d.ts} +1 -1
  117. package/esm/public/cli/commands/resolve-blueprint-field.js +38 -0
  118. package/esm/public/cli/commands/revoke-api-key.d.ts +8 -0
  119. package/esm/public/cli/commands/revoke-api-key.js +34 -0
  120. package/esm/public/cli/commands/revoke-session.d.ts +8 -0
  121. package/esm/public/cli/commands/revoke-session.js +34 -0
  122. package/esm/public/cli/commands/session-secrets-module.d.ts +8 -0
  123. package/esm/{auth/cli/commands/connected-account.js → public/cli/commands/session-secrets-module.js} +82 -90
  124. package/esm/public/cli/commands/sign-in-cross-origin.d.ts +8 -0
  125. package/esm/public/cli/commands/sign-in-cross-origin.js +34 -0
  126. package/esm/public/cli/commands/spatial-relation.d.ts +8 -0
  127. package/esm/public/cli/commands/spatial-relation.js +472 -0
  128. package/esm/public/cli/commands/user-auth-module.js +24 -24
  129. package/esm/public/cli/commands/user-connected-account.d.ts +8 -0
  130. package/esm/public/cli/commands/user-connected-account.js +174 -0
  131. package/esm/public/cli/commands/webauthn-credentials-module.d.ts +8 -0
  132. package/esm/public/cli/commands/{table-template-module.js → webauthn-credentials-module.js} +8 -48
  133. package/esm/public/cli/commands.js +41 -15
  134. package/esm/public/cli/executor.d.ts +61 -16
  135. package/esm/public/orm/index.d.ts +69 -19
  136. package/esm/public/orm/index.js +16 -6
  137. package/esm/public/orm/input-types.d.ts +2047 -640
  138. package/esm/public/orm/input-types.js +15 -6
  139. package/esm/public/orm/models/devicesModule.d.ts +56 -0
  140. package/esm/public/orm/models/devicesModule.js +96 -0
  141. package/esm/public/orm/models/entityTypeProvision.d.ts +56 -0
  142. package/esm/public/orm/models/{tableTemplateModule.js → entityTypeProvision.js} +24 -24
  143. package/esm/public/orm/models/index.d.ts +8 -3
  144. package/esm/public/orm/models/index.js +8 -3
  145. package/esm/public/orm/models/orgMemberProfile.d.ts +56 -0
  146. package/esm/{auth/orm/models/connectedAccount.js → public/orm/models/orgMemberProfile.js} +24 -24
  147. package/esm/public/orm/models/sessionSecretsModule.d.ts +56 -0
  148. package/esm/public/orm/models/sessionSecretsModule.js +96 -0
  149. package/esm/public/orm/models/spatialRelation.d.ts +56 -0
  150. package/esm/public/orm/models/spatialRelation.js +96 -0
  151. package/esm/public/orm/models/userConnectedAccount.d.ts +38 -0
  152. package/esm/public/orm/models/userConnectedAccount.js +72 -0
  153. package/esm/public/orm/models/webauthnCredentialsModule.d.ts +56 -0
  154. package/esm/public/orm/models/webauthnCredentialsModule.js +96 -0
  155. package/esm/public/orm/mutation/index.d.ts +72 -20
  156. package/esm/public/orm/mutation/index.js +96 -24
  157. package/esm/public/orm/query/index.d.ts +24 -2
  158. package/esm/public/orm/query/index.js +36 -4
  159. package/package.json +5 -5
  160. package/public/cli/commands/app-membership.js +22 -0
  161. package/public/cli/commands/construct-blueprint.js +1 -1
  162. package/public/cli/commands/create-api-key.d.ts +8 -0
  163. package/public/cli/commands/create-api-key.js +36 -0
  164. package/public/cli/commands/devices-module.d.ts +8 -0
  165. package/{auth/cli/commands/connected-account.js → public/cli/commands/devices-module.js} +101 -87
  166. package/public/cli/commands/disconnect-account.d.ts +8 -0
  167. package/public/cli/commands/disconnect-account.js +36 -0
  168. package/public/cli/commands/entity-type-provision.d.ts +8 -0
  169. package/public/cli/commands/entity-type-provision.js +556 -0
  170. package/public/cli/commands/membership-type.js +44 -0
  171. package/public/cli/commands/memberships-module.js +22 -0
  172. package/public/cli/commands/org-member-profile.d.ts +8 -0
  173. package/public/cli/commands/org-member-profile.js +392 -0
  174. package/public/cli/commands/org-membership.js +44 -0
  175. package/public/cli/commands/provision-new-user.d.ts +8 -0
  176. package/public/cli/commands/provision-new-user.js +36 -0
  177. package/public/cli/commands/provision-spatial-relation.d.ts +8 -0
  178. package/public/cli/commands/provision-spatial-relation.js +36 -0
  179. package/public/cli/commands/request-cross-origin-token.d.ts +8 -0
  180. package/public/cli/commands/request-cross-origin-token.js +36 -0
  181. package/public/cli/commands/require-step-up.d.ts +8 -0
  182. package/public/cli/commands/require-step-up.js +30 -0
  183. package/public/cli/commands/resolve-blueprint-field.d.ts +8 -0
  184. package/public/cli/commands/resolve-blueprint-field.js +40 -0
  185. package/public/cli/commands/revoke-api-key.d.ts +8 -0
  186. package/public/cli/commands/revoke-api-key.js +36 -0
  187. package/public/cli/commands/revoke-session.d.ts +8 -0
  188. package/public/cli/commands/revoke-session.js +36 -0
  189. package/public/cli/commands/session-secrets-module.d.ts +8 -0
  190. package/public/cli/commands/{connected-account.js → session-secrets-module.js} +82 -90
  191. package/public/cli/commands/sign-in-cross-origin.d.ts +8 -0
  192. package/public/cli/commands/sign-in-cross-origin.js +36 -0
  193. package/public/cli/commands/spatial-relation.d.ts +8 -0
  194. package/public/cli/commands/spatial-relation.js +474 -0
  195. package/public/cli/commands/user-auth-module.js +24 -24
  196. package/public/cli/commands/user-connected-account.d.ts +8 -0
  197. package/public/cli/commands/user-connected-account.js +176 -0
  198. package/public/cli/commands/webauthn-credentials-module.d.ts +8 -0
  199. package/public/cli/commands/{table-template-module.js → webauthn-credentials-module.js} +8 -48
  200. package/public/cli/commands.js +41 -15
  201. package/public/cli/executor.d.ts +61 -16
  202. package/public/orm/index.d.ts +69 -19
  203. package/public/orm/index.js +16 -6
  204. package/public/orm/input-types.d.ts +2047 -640
  205. package/public/orm/input-types.js +15 -6
  206. package/public/orm/models/devicesModule.d.ts +56 -0
  207. package/public/orm/models/devicesModule.js +100 -0
  208. package/public/orm/models/entityTypeProvision.d.ts +56 -0
  209. package/public/orm/models/{tableTemplateModule.js → entityTypeProvision.js} +26 -26
  210. package/public/orm/models/index.d.ts +8 -3
  211. package/public/orm/models/index.js +19 -9
  212. package/public/orm/models/orgMemberProfile.d.ts +56 -0
  213. package/public/orm/models/{connectedAccount.js → orgMemberProfile.js} +26 -26
  214. package/public/orm/models/sessionSecretsModule.d.ts +56 -0
  215. package/public/orm/models/sessionSecretsModule.js +100 -0
  216. package/public/orm/models/spatialRelation.d.ts +56 -0
  217. package/public/orm/models/spatialRelation.js +100 -0
  218. package/public/orm/models/userConnectedAccount.d.ts +38 -0
  219. package/public/orm/models/userConnectedAccount.js +76 -0
  220. package/public/orm/models/webauthnCredentialsModule.d.ts +56 -0
  221. package/public/orm/models/webauthnCredentialsModule.js +100 -0
  222. package/public/orm/mutation/index.d.ts +72 -20
  223. package/public/orm/mutation/index.js +96 -24
  224. package/public/orm/query/index.d.ts +24 -2
  225. package/public/orm/query/index.js +36 -4
  226. package/auth/orm/models/connectedAccount.d.ts +0 -56
  227. package/esm/auth/cli/commands/sign-in-one-time-token.d.ts +0 -8
  228. package/esm/auth/orm/models/connectedAccount.d.ts +0 -56
  229. package/esm/public/cli/commands/one-time-token.d.ts +0 -8
  230. package/esm/public/cli/commands/sign-in-one-time-token.d.ts +0 -8
  231. package/esm/public/orm/models/connectedAccount.d.ts +0 -56
  232. package/esm/public/orm/models/tableTemplateModule.d.ts +0 -56
  233. package/public/cli/commands/one-time-token.d.ts +0 -8
  234. package/public/cli/commands/sign-in-one-time-token.d.ts +0 -8
  235. package/public/cli/commands/table-template-module.d.ts +0 -8
  236. package/public/orm/models/connectedAccount.d.ts +0 -56
  237. package/public/orm/models/tableTemplateModule.d.ts +0 -56
@@ -40,6 +40,7 @@ const fieldSchema = {
40
40
  entityIdsByMask: 'string',
41
41
  entityIdsByPerm: 'string',
42
42
  entityIdsFunction: 'string',
43
+ memberProfilesTableId: 'uuid',
43
44
  };
44
45
  const usage = '\nmemberships-module <command>\n\nCommands:\n list List membershipsModule records\n find-first Find first matching membershipsModule record\n get Get a membershipsModule by ID\n create Create a new membershipsModule\n update Update an existing membershipsModule\n delete Delete a membershipsModule\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n\n --help, -h Show this help message\n';
45
46
  exports.default = async (argv, prompter, _options) => {
@@ -114,6 +115,7 @@ async function handleList(argv, _prompter) {
114
115
  entityIdsByMask: true,
115
116
  entityIdsByPerm: true,
116
117
  entityIdsFunction: true,
118
+ memberProfilesTableId: true,
117
119
  };
118
120
  const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
119
121
  const client = (0, executor_1.getClient)();
@@ -162,6 +164,7 @@ async function handleFindFirst(argv, _prompter) {
162
164
  entityIdsByMask: true,
163
165
  entityIdsByPerm: true,
164
166
  entityIdsFunction: true,
167
+ memberProfilesTableId: true,
165
168
  };
166
169
  const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
167
170
  const client = (0, executor_1.getClient)();
@@ -222,6 +225,7 @@ async function handleGet(argv, prompter) {
222
225
  entityIdsByMask: true,
223
226
  entityIdsByPerm: true,
224
227
  entityIdsFunction: true,
228
+ memberProfilesTableId: true,
225
229
  },
226
230
  })
227
231
  .execute();
@@ -446,6 +450,13 @@ async function handleCreate(argv, prompter) {
446
450
  required: false,
447
451
  skipPrompt: true,
448
452
  },
453
+ {
454
+ type: 'text',
455
+ name: 'memberProfilesTableId',
456
+ message: 'memberProfilesTableId',
457
+ required: false,
458
+ skipPrompt: true,
459
+ },
449
460
  ]);
450
461
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
451
462
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
@@ -483,6 +494,7 @@ async function handleCreate(argv, prompter) {
483
494
  entityIdsByMask: cleanedData.entityIdsByMask,
484
495
  entityIdsByPerm: cleanedData.entityIdsByPerm,
485
496
  entityIdsFunction: cleanedData.entityIdsFunction,
497
+ memberProfilesTableId: cleanedData.memberProfilesTableId,
486
498
  },
487
499
  select: {
488
500
  id: true,
@@ -516,6 +528,7 @@ async function handleCreate(argv, prompter) {
516
528
  entityIdsByMask: true,
517
529
  entityIdsByPerm: true,
518
530
  entityIdsFunction: true,
531
+ memberProfilesTableId: true,
519
532
  },
520
533
  })
521
534
  .execute();
@@ -746,6 +759,13 @@ async function handleUpdate(argv, prompter) {
746
759
  required: false,
747
760
  skipPrompt: true,
748
761
  },
762
+ {
763
+ type: 'text',
764
+ name: 'memberProfilesTableId',
765
+ message: 'memberProfilesTableId',
766
+ required: false,
767
+ skipPrompt: true,
768
+ },
749
769
  ]);
750
770
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
751
771
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
@@ -786,6 +806,7 @@ async function handleUpdate(argv, prompter) {
786
806
  entityIdsByMask: cleanedData.entityIdsByMask,
787
807
  entityIdsByPerm: cleanedData.entityIdsByPerm,
788
808
  entityIdsFunction: cleanedData.entityIdsFunction,
809
+ memberProfilesTableId: cleanedData.memberProfilesTableId,
789
810
  },
790
811
  select: {
791
812
  id: true,
@@ -819,6 +840,7 @@ async function handleUpdate(argv, prompter) {
819
840
  entityIdsByMask: true,
820
841
  entityIdsByPerm: true,
821
842
  entityIdsFunction: true,
843
+ memberProfilesTableId: true,
822
844
  },
823
845
  })
824
846
  .execute();
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI commands for OrgMemberProfile
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,392 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * CLI commands for OrgMemberProfile
5
+ * @generated by @constructive-io/graphql-codegen
6
+ * DO NOT EDIT - changes will be overwritten
7
+ */
8
+ const inquirerer_1 = require("inquirerer");
9
+ const executor_1 = require("../executor");
10
+ const utils_1 = require("../utils");
11
+ const fieldSchema = {
12
+ id: 'uuid',
13
+ createdAt: 'string',
14
+ updatedAt: 'string',
15
+ membershipId: 'uuid',
16
+ entityId: 'uuid',
17
+ actorId: 'uuid',
18
+ displayName: 'string',
19
+ email: 'string',
20
+ title: 'string',
21
+ bio: 'string',
22
+ profilePicture: 'string',
23
+ };
24
+ const usage = '\norg-member-profile <command>\n\nCommands:\n list List orgMemberProfile records\n find-first Find first matching orgMemberProfile record\n get Get a orgMemberProfile by ID\n create Create a new orgMemberProfile\n update Update an existing orgMemberProfile\n delete Delete a orgMemberProfile\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n\n --help, -h Show this help message\n';
25
+ exports.default = async (argv, prompter, _options) => {
26
+ if (argv.help || argv.h) {
27
+ console.log(usage);
28
+ process.exit(0);
29
+ }
30
+ const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
31
+ if (!subcommand) {
32
+ const answer = await prompter.prompt(argv, [
33
+ {
34
+ type: 'autocomplete',
35
+ name: 'subcommand',
36
+ message: 'What do you want to do?',
37
+ options: ['list', 'find-first', 'get', 'create', 'update', 'delete'],
38
+ },
39
+ ]);
40
+ return handleTableSubcommand(answer.subcommand, newArgv, prompter);
41
+ }
42
+ return handleTableSubcommand(subcommand, newArgv, prompter);
43
+ };
44
+ async function handleTableSubcommand(subcommand, argv, prompter) {
45
+ switch (subcommand) {
46
+ case 'list':
47
+ return handleList(argv, prompter);
48
+ case 'find-first':
49
+ return handleFindFirst(argv, prompter);
50
+ case 'get':
51
+ return handleGet(argv, prompter);
52
+ case 'create':
53
+ return handleCreate(argv, prompter);
54
+ case 'update':
55
+ return handleUpdate(argv, prompter);
56
+ case 'delete':
57
+ return handleDelete(argv, prompter);
58
+ default:
59
+ console.log(usage);
60
+ process.exit(1);
61
+ }
62
+ }
63
+ async function handleList(argv, _prompter) {
64
+ try {
65
+ const defaultSelect = {
66
+ id: true,
67
+ createdAt: true,
68
+ updatedAt: true,
69
+ membershipId: true,
70
+ entityId: true,
71
+ actorId: true,
72
+ displayName: true,
73
+ email: true,
74
+ title: true,
75
+ bio: true,
76
+ profilePicture: true,
77
+ };
78
+ const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
79
+ const client = (0, executor_1.getClient)();
80
+ const result = await client.orgMemberProfile.findMany(findManyArgs).execute();
81
+ console.log(JSON.stringify(result, null, 2));
82
+ }
83
+ catch (error) {
84
+ console.error('Failed to list records.');
85
+ if (error instanceof Error) {
86
+ console.error(error.message);
87
+ }
88
+ process.exit(1);
89
+ }
90
+ }
91
+ async function handleFindFirst(argv, _prompter) {
92
+ try {
93
+ const defaultSelect = {
94
+ id: true,
95
+ createdAt: true,
96
+ updatedAt: true,
97
+ membershipId: true,
98
+ entityId: true,
99
+ actorId: true,
100
+ displayName: true,
101
+ email: true,
102
+ title: true,
103
+ bio: true,
104
+ profilePicture: true,
105
+ };
106
+ const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
107
+ const client = (0, executor_1.getClient)();
108
+ const result = await client.orgMemberProfile.findFirst(findFirstArgs).execute();
109
+ console.log(JSON.stringify(result, null, 2));
110
+ }
111
+ catch (error) {
112
+ console.error('Failed to find record.');
113
+ if (error instanceof Error) {
114
+ console.error(error.message);
115
+ }
116
+ process.exit(1);
117
+ }
118
+ }
119
+ async function handleGet(argv, prompter) {
120
+ try {
121
+ const answers = await prompter.prompt(argv, [
122
+ {
123
+ type: 'text',
124
+ name: 'id',
125
+ message: 'id',
126
+ required: true,
127
+ },
128
+ ]);
129
+ const client = (0, executor_1.getClient)();
130
+ const result = await client.orgMemberProfile
131
+ .findOne({
132
+ id: answers.id,
133
+ select: {
134
+ id: true,
135
+ createdAt: true,
136
+ updatedAt: true,
137
+ membershipId: true,
138
+ entityId: true,
139
+ actorId: true,
140
+ displayName: true,
141
+ email: true,
142
+ title: true,
143
+ bio: true,
144
+ profilePicture: true,
145
+ },
146
+ })
147
+ .execute();
148
+ console.log(JSON.stringify(result, null, 2));
149
+ }
150
+ catch (error) {
151
+ console.error('Record not found.');
152
+ if (error instanceof Error) {
153
+ console.error(error.message);
154
+ }
155
+ process.exit(1);
156
+ }
157
+ }
158
+ async function handleCreate(argv, prompter) {
159
+ try {
160
+ const rawAnswers = await prompter.prompt(argv, [
161
+ {
162
+ type: 'text',
163
+ name: 'membershipId',
164
+ message: 'membershipId',
165
+ required: true,
166
+ },
167
+ {
168
+ type: 'text',
169
+ name: 'entityId',
170
+ message: 'entityId',
171
+ required: true,
172
+ },
173
+ {
174
+ type: 'text',
175
+ name: 'actorId',
176
+ message: 'actorId',
177
+ required: true,
178
+ },
179
+ {
180
+ type: 'text',
181
+ name: 'displayName',
182
+ message: 'displayName',
183
+ required: false,
184
+ skipPrompt: true,
185
+ },
186
+ {
187
+ type: 'text',
188
+ name: 'email',
189
+ message: 'email',
190
+ required: false,
191
+ skipPrompt: true,
192
+ },
193
+ {
194
+ type: 'text',
195
+ name: 'title',
196
+ message: 'title',
197
+ required: false,
198
+ skipPrompt: true,
199
+ },
200
+ {
201
+ type: 'text',
202
+ name: 'bio',
203
+ message: 'bio',
204
+ required: false,
205
+ skipPrompt: true,
206
+ },
207
+ {
208
+ type: 'text',
209
+ name: 'profilePicture',
210
+ message: 'profilePicture',
211
+ required: false,
212
+ skipPrompt: true,
213
+ },
214
+ ]);
215
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
216
+ const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
217
+ const client = (0, executor_1.getClient)();
218
+ const result = await client.orgMemberProfile
219
+ .create({
220
+ data: {
221
+ membershipId: cleanedData.membershipId,
222
+ entityId: cleanedData.entityId,
223
+ actorId: cleanedData.actorId,
224
+ displayName: cleanedData.displayName,
225
+ email: cleanedData.email,
226
+ title: cleanedData.title,
227
+ bio: cleanedData.bio,
228
+ profilePicture: cleanedData.profilePicture,
229
+ },
230
+ select: {
231
+ id: true,
232
+ createdAt: true,
233
+ updatedAt: true,
234
+ membershipId: true,
235
+ entityId: true,
236
+ actorId: true,
237
+ displayName: true,
238
+ email: true,
239
+ title: true,
240
+ bio: true,
241
+ profilePicture: true,
242
+ },
243
+ })
244
+ .execute();
245
+ console.log(JSON.stringify(result, null, 2));
246
+ }
247
+ catch (error) {
248
+ console.error('Failed to create record.');
249
+ if (error instanceof Error) {
250
+ console.error(error.message);
251
+ }
252
+ process.exit(1);
253
+ }
254
+ }
255
+ async function handleUpdate(argv, prompter) {
256
+ try {
257
+ const rawAnswers = await prompter.prompt(argv, [
258
+ {
259
+ type: 'text',
260
+ name: 'id',
261
+ message: 'id',
262
+ required: true,
263
+ },
264
+ {
265
+ type: 'text',
266
+ name: 'membershipId',
267
+ message: 'membershipId',
268
+ required: false,
269
+ },
270
+ {
271
+ type: 'text',
272
+ name: 'entityId',
273
+ message: 'entityId',
274
+ required: false,
275
+ },
276
+ {
277
+ type: 'text',
278
+ name: 'actorId',
279
+ message: 'actorId',
280
+ required: false,
281
+ },
282
+ {
283
+ type: 'text',
284
+ name: 'displayName',
285
+ message: 'displayName',
286
+ required: false,
287
+ skipPrompt: true,
288
+ },
289
+ {
290
+ type: 'text',
291
+ name: 'email',
292
+ message: 'email',
293
+ required: false,
294
+ skipPrompt: true,
295
+ },
296
+ {
297
+ type: 'text',
298
+ name: 'title',
299
+ message: 'title',
300
+ required: false,
301
+ skipPrompt: true,
302
+ },
303
+ {
304
+ type: 'text',
305
+ name: 'bio',
306
+ message: 'bio',
307
+ required: false,
308
+ skipPrompt: true,
309
+ },
310
+ {
311
+ type: 'text',
312
+ name: 'profilePicture',
313
+ message: 'profilePicture',
314
+ required: false,
315
+ skipPrompt: true,
316
+ },
317
+ ]);
318
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
319
+ const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
320
+ const client = (0, executor_1.getClient)();
321
+ const result = await client.orgMemberProfile
322
+ .update({
323
+ where: {
324
+ id: answers.id,
325
+ },
326
+ data: {
327
+ membershipId: cleanedData.membershipId,
328
+ entityId: cleanedData.entityId,
329
+ actorId: cleanedData.actorId,
330
+ displayName: cleanedData.displayName,
331
+ email: cleanedData.email,
332
+ title: cleanedData.title,
333
+ bio: cleanedData.bio,
334
+ profilePicture: cleanedData.profilePicture,
335
+ },
336
+ select: {
337
+ id: true,
338
+ createdAt: true,
339
+ updatedAt: true,
340
+ membershipId: true,
341
+ entityId: true,
342
+ actorId: true,
343
+ displayName: true,
344
+ email: true,
345
+ title: true,
346
+ bio: true,
347
+ profilePicture: true,
348
+ },
349
+ })
350
+ .execute();
351
+ console.log(JSON.stringify(result, null, 2));
352
+ }
353
+ catch (error) {
354
+ console.error('Failed to update record.');
355
+ if (error instanceof Error) {
356
+ console.error(error.message);
357
+ }
358
+ process.exit(1);
359
+ }
360
+ }
361
+ async function handleDelete(argv, prompter) {
362
+ try {
363
+ const rawAnswers = await prompter.prompt(argv, [
364
+ {
365
+ type: 'text',
366
+ name: 'id',
367
+ message: 'id',
368
+ required: true,
369
+ },
370
+ ]);
371
+ const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
372
+ const client = (0, executor_1.getClient)();
373
+ const result = await client.orgMemberProfile
374
+ .delete({
375
+ where: {
376
+ id: answers.id,
377
+ },
378
+ select: {
379
+ id: true,
380
+ },
381
+ })
382
+ .execute();
383
+ console.log(JSON.stringify(result, null, 2));
384
+ }
385
+ catch (error) {
386
+ console.error('Failed to delete record.');
387
+ if (error instanceof Error) {
388
+ console.error(error.message);
389
+ }
390
+ process.exit(1);
391
+ }
392
+ }
@@ -18,12 +18,14 @@ const fieldSchema = {
18
18
  isBanned: 'boolean',
19
19
  isDisabled: 'boolean',
20
20
  isActive: 'boolean',
21
+ isExternal: 'boolean',
21
22
  isOwner: 'boolean',
22
23
  isAdmin: 'boolean',
23
24
  permissions: 'string',
24
25
  granted: 'string',
25
26
  actorId: 'uuid',
26
27
  entityId: 'uuid',
28
+ isReadOnly: 'boolean',
27
29
  profileId: 'uuid',
28
30
  };
29
31
  const usage = '\norg-membership <command>\n\nCommands:\n list List orgMembership records\n find-first Find first matching orgMembership record\n get Get a orgMembership by ID\n create Create a new orgMembership\n update Update an existing orgMembership\n delete Delete a orgMembership\n\nList Options:\n --limit <n> Max number of records to return (forward pagination)\n --last <n> Number of records from the end (backward pagination)\n --after <cursor> Cursor for forward pagination\n --before <cursor> Cursor for backward pagination\n --offset <n> Number of records to skip\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.<f>.<op> Condition filter (dot-notation)\n --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select <fields> Comma-separated list of fields to return\n --where.<field>.<op> Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.<f>.<op> Condition filter (dot-notation)\n\n --help, -h Show this help message\n';
@@ -77,12 +79,14 @@ async function handleList(argv, _prompter) {
77
79
  isBanned: true,
78
80
  isDisabled: true,
79
81
  isActive: true,
82
+ isExternal: true,
80
83
  isOwner: true,
81
84
  isAdmin: true,
82
85
  permissions: true,
83
86
  granted: true,
84
87
  actorId: true,
85
88
  entityId: true,
89
+ isReadOnly: true,
86
90
  profileId: true,
87
91
  };
88
92
  const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
@@ -110,12 +114,14 @@ async function handleFindFirst(argv, _prompter) {
110
114
  isBanned: true,
111
115
  isDisabled: true,
112
116
  isActive: true,
117
+ isExternal: true,
113
118
  isOwner: true,
114
119
  isAdmin: true,
115
120
  permissions: true,
116
121
  granted: true,
117
122
  actorId: true,
118
123
  entityId: true,
124
+ isReadOnly: true,
119
125
  profileId: true,
120
126
  };
121
127
  const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
@@ -155,12 +161,14 @@ async function handleGet(argv, prompter) {
155
161
  isBanned: true,
156
162
  isDisabled: true,
157
163
  isActive: true,
164
+ isExternal: true,
158
165
  isOwner: true,
159
166
  isAdmin: true,
160
167
  permissions: true,
161
168
  granted: true,
162
169
  actorId: true,
163
170
  entityId: true,
171
+ isReadOnly: true,
164
172
  profileId: true,
165
173
  },
166
174
  })
@@ -220,6 +228,13 @@ async function handleCreate(argv, prompter) {
220
228
  required: false,
221
229
  skipPrompt: true,
222
230
  },
231
+ {
232
+ type: 'boolean',
233
+ name: 'isExternal',
234
+ message: 'isExternal',
235
+ required: false,
236
+ skipPrompt: true,
237
+ },
223
238
  {
224
239
  type: 'boolean',
225
240
  name: 'isOwner',
@@ -260,6 +275,13 @@ async function handleCreate(argv, prompter) {
260
275
  message: 'entityId',
261
276
  required: true,
262
277
  },
278
+ {
279
+ type: 'boolean',
280
+ name: 'isReadOnly',
281
+ message: 'isReadOnly',
282
+ required: false,
283
+ skipPrompt: true,
284
+ },
263
285
  {
264
286
  type: 'text',
265
287
  name: 'profileId',
@@ -280,12 +302,14 @@ async function handleCreate(argv, prompter) {
280
302
  isBanned: cleanedData.isBanned,
281
303
  isDisabled: cleanedData.isDisabled,
282
304
  isActive: cleanedData.isActive,
305
+ isExternal: cleanedData.isExternal,
283
306
  isOwner: cleanedData.isOwner,
284
307
  isAdmin: cleanedData.isAdmin,
285
308
  permissions: cleanedData.permissions,
286
309
  granted: cleanedData.granted,
287
310
  actorId: cleanedData.actorId,
288
311
  entityId: cleanedData.entityId,
312
+ isReadOnly: cleanedData.isReadOnly,
289
313
  profileId: cleanedData.profileId,
290
314
  },
291
315
  select: {
@@ -298,12 +322,14 @@ async function handleCreate(argv, prompter) {
298
322
  isBanned: true,
299
323
  isDisabled: true,
300
324
  isActive: true,
325
+ isExternal: true,
301
326
  isOwner: true,
302
327
  isAdmin: true,
303
328
  permissions: true,
304
329
  granted: true,
305
330
  actorId: true,
306
331
  entityId: true,
332
+ isReadOnly: true,
307
333
  profileId: true,
308
334
  },
309
335
  })
@@ -369,6 +395,13 @@ async function handleUpdate(argv, prompter) {
369
395
  required: false,
370
396
  skipPrompt: true,
371
397
  },
398
+ {
399
+ type: 'boolean',
400
+ name: 'isExternal',
401
+ message: 'isExternal',
402
+ required: false,
403
+ skipPrompt: true,
404
+ },
372
405
  {
373
406
  type: 'boolean',
374
407
  name: 'isOwner',
@@ -409,6 +442,13 @@ async function handleUpdate(argv, prompter) {
409
442
  message: 'entityId',
410
443
  required: false,
411
444
  },
445
+ {
446
+ type: 'boolean',
447
+ name: 'isReadOnly',
448
+ message: 'isReadOnly',
449
+ required: false,
450
+ skipPrompt: true,
451
+ },
412
452
  {
413
453
  type: 'text',
414
454
  name: 'profileId',
@@ -432,12 +472,14 @@ async function handleUpdate(argv, prompter) {
432
472
  isBanned: cleanedData.isBanned,
433
473
  isDisabled: cleanedData.isDisabled,
434
474
  isActive: cleanedData.isActive,
475
+ isExternal: cleanedData.isExternal,
435
476
  isOwner: cleanedData.isOwner,
436
477
  isAdmin: cleanedData.isAdmin,
437
478
  permissions: cleanedData.permissions,
438
479
  granted: cleanedData.granted,
439
480
  actorId: cleanedData.actorId,
440
481
  entityId: cleanedData.entityId,
482
+ isReadOnly: cleanedData.isReadOnly,
441
483
  profileId: cleanedData.profileId,
442
484
  },
443
485
  select: {
@@ -450,12 +492,14 @@ async function handleUpdate(argv, prompter) {
450
492
  isBanned: true,
451
493
  isDisabled: true,
452
494
  isActive: true,
495
+ isExternal: true,
453
496
  isOwner: true,
454
497
  isAdmin: true,
455
498
  permissions: true,
456
499
  granted: true,
457
500
  actorId: true,
458
501
  entityId: true,
502
+ isReadOnly: true,
459
503
  profileId: true,
460
504
  },
461
505
  })
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CLI command for mutation provisionNewUser
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;