@constructive-sdk/cli 0.22.3 → 0.22.4

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 (177) hide show
  1. package/admin/cli/commands/{app-achievement.d.ts → app-limit-warning.d.ts} +1 -1
  2. package/{public/cli/commands/app-step.js → admin/cli/commands/app-limit-warning.js} +58 -54
  3. package/{esm/admin/cli/commands/app-achievement.d.ts → admin/cli/commands/org-limit-warning.d.ts} +1 -1
  4. package/admin/cli/commands/{app-level.js → org-limit-warning.js} +66 -62
  5. package/admin/cli/commands.js +7 -15
  6. package/admin/cli/executor.d.ts +3 -15
  7. package/admin/orm/index.d.ts +6 -20
  8. package/admin/orm/index.js +6 -10
  9. package/admin/orm/input-types.d.ts +488 -768
  10. package/admin/orm/models/appLimitWarning.d.ts +54 -0
  11. package/{public/orm/models/secretsModule.js → admin/orm/models/appLimitWarning.js} +27 -27
  12. package/admin/orm/models/index.d.ts +3 -5
  13. package/admin/orm/models/index.js +7 -11
  14. package/admin/orm/models/orgLimitWarning.d.ts +54 -0
  15. package/admin/orm/models/{appAchievement.js → orgLimitWarning.js} +27 -27
  16. package/admin/orm/query/index.d.ts +1 -28
  17. package/admin/orm/query/index.js +0 -44
  18. package/{admin/cli/commands/app-step.d.ts → esm/admin/cli/commands/app-limit-warning.d.ts} +1 -1
  19. package/esm/{public/cli/commands/app-step.js → admin/cli/commands/app-limit-warning.js} +58 -54
  20. package/esm/admin/cli/commands/org-limit-warning.d.ts +8 -0
  21. package/esm/{public/cli/commands/app-level.js → admin/cli/commands/org-limit-warning.js} +66 -62
  22. package/esm/admin/cli/commands.js +7 -15
  23. package/esm/admin/cli/executor.d.ts +3 -15
  24. package/esm/admin/orm/index.d.ts +6 -20
  25. package/esm/admin/orm/index.js +6 -10
  26. package/esm/admin/orm/input-types.d.ts +488 -768
  27. package/esm/admin/orm/models/appLimitWarning.d.ts +54 -0
  28. package/esm/{public/orm/models/appAchievement.js → admin/orm/models/appLimitWarning.js} +25 -25
  29. package/esm/admin/orm/models/index.d.ts +3 -5
  30. package/esm/admin/orm/models/index.js +3 -5
  31. package/esm/admin/orm/models/orgLimitWarning.d.ts +54 -0
  32. package/esm/admin/orm/models/{appAchievement.js → orgLimitWarning.js} +25 -25
  33. package/esm/admin/orm/query/index.d.ts +1 -28
  34. package/esm/admin/orm/query/index.js +0 -44
  35. package/esm/public/cli/commands/app-limit-warning.d.ts +8 -0
  36. package/esm/{admin/cli/commands/app-step.js → public/cli/commands/app-limit-warning.js} +58 -54
  37. package/esm/public/cli/commands/construct-blueprint.js +1 -1
  38. package/esm/public/cli/commands/create-user-database.js +1 -1
  39. package/esm/public/cli/commands/embedding-chunk.js +66 -0
  40. package/esm/public/cli/commands/entity-type-provision.js +22 -0
  41. package/esm/{admin/cli/commands/app-level.d.ts → public/cli/commands/events-module.d.ts} +1 -1
  42. package/esm/public/cli/commands/{levels-module.js → events-module.js} +438 -152
  43. package/esm/public/cli/commands/limits-module.js +88 -0
  44. package/esm/public/cli/commands/org-limit-warning.d.ts +8 -0
  45. package/esm/{admin/cli/commands/app-level.js → public/cli/commands/org-limit-warning.js} +66 -62
  46. package/esm/public/cli/commands/partition.js +24 -24
  47. package/{admin/cli/commands/app-level-requirement.d.ts → esm/public/cli/commands/rate-limit-meters-module.d.ts} +1 -1
  48. package/esm/public/cli/commands/rate-limit-meters-module.js +448 -0
  49. package/esm/public/cli/commands/realtime-module.js +24 -24
  50. package/esm/public/cli/commands/user-state-module.d.ts +8 -0
  51. package/esm/public/cli/commands/{secrets-module.js → user-state-module.js} +8 -8
  52. package/esm/public/cli/commands.js +11 -17
  53. package/esm/public/cli/executor.d.ts +5 -16
  54. package/esm/public/orm/index.d.ts +10 -22
  55. package/esm/public/orm/index.js +10 -12
  56. package/esm/public/orm/input-types.d.ts +1024 -919
  57. package/esm/public/orm/input-types.js +3 -5
  58. package/esm/public/orm/models/appLimitWarning.d.ts +54 -0
  59. package/esm/{admin/orm/models/appLevel.js → public/orm/models/appLimitWarning.js} +25 -25
  60. package/esm/public/orm/models/eventsModule.d.ts +54 -0
  61. package/esm/public/orm/models/{levelsModule.js → eventsModule.js} +25 -25
  62. package/esm/public/orm/models/index.d.ts +5 -6
  63. package/esm/public/orm/models/index.js +5 -6
  64. package/esm/public/orm/models/orgLimitWarning.d.ts +54 -0
  65. package/esm/{admin/orm/models/appStep.js → public/orm/models/orgLimitWarning.js} +25 -25
  66. package/esm/public/orm/models/rateLimitMetersModule.d.ts +54 -0
  67. package/esm/{admin/orm/models/appLevelRequirement.js → public/orm/models/rateLimitMetersModule.js} +25 -25
  68. package/esm/public/orm/models/userStateModule.d.ts +54 -0
  69. package/esm/public/orm/models/userStateModule.js +100 -0
  70. package/esm/public/orm/mutation/index.d.ts +2 -2
  71. package/esm/public/orm/query/index.d.ts +1 -28
  72. package/esm/public/orm/query/index.js +0 -44
  73. package/package.json +4 -4
  74. package/public/cli/commands/app-limit-warning.d.ts +8 -0
  75. package/{admin/cli/commands/app-step.js → public/cli/commands/app-limit-warning.js} +58 -54
  76. package/public/cli/commands/construct-blueprint.js +1 -1
  77. package/public/cli/commands/create-user-database.js +1 -1
  78. package/public/cli/commands/embedding-chunk.js +66 -0
  79. package/public/cli/commands/entity-type-provision.js +22 -0
  80. package/{admin/cli/commands/app-level.d.ts → public/cli/commands/events-module.d.ts} +1 -1
  81. package/public/cli/commands/{levels-module.js → events-module.js} +438 -152
  82. package/public/cli/commands/limits-module.js +88 -0
  83. package/public/cli/commands/org-limit-warning.d.ts +8 -0
  84. package/public/cli/commands/{app-level.js → org-limit-warning.js} +66 -62
  85. package/public/cli/commands/partition.js +24 -24
  86. package/public/cli/commands/rate-limit-meters-module.d.ts +8 -0
  87. package/public/cli/commands/rate-limit-meters-module.js +450 -0
  88. package/public/cli/commands/realtime-module.js +24 -24
  89. package/public/cli/commands/user-state-module.d.ts +8 -0
  90. package/public/cli/commands/{secrets-module.js → user-state-module.js} +8 -8
  91. package/public/cli/commands.js +11 -17
  92. package/public/cli/executor.d.ts +5 -16
  93. package/public/orm/index.d.ts +10 -22
  94. package/public/orm/index.js +10 -12
  95. package/public/orm/input-types.d.ts +1024 -919
  96. package/public/orm/input-types.js +3 -5
  97. package/public/orm/models/appLimitWarning.d.ts +54 -0
  98. package/{admin/orm/models/appStep.js → public/orm/models/appLimitWarning.js} +27 -27
  99. package/public/orm/models/eventsModule.d.ts +54 -0
  100. package/public/orm/models/{levelsModule.js → eventsModule.js} +27 -27
  101. package/public/orm/models/index.d.ts +5 -6
  102. package/public/orm/models/index.js +13 -15
  103. package/public/orm/models/orgLimitWarning.d.ts +54 -0
  104. package/{admin/orm/models/appLevel.js → public/orm/models/orgLimitWarning.js} +27 -27
  105. package/public/orm/models/rateLimitMetersModule.d.ts +54 -0
  106. package/public/orm/models/{appAchievement.js → rateLimitMetersModule.js} +27 -27
  107. package/public/orm/models/userStateModule.d.ts +54 -0
  108. package/public/orm/models/userStateModule.js +104 -0
  109. package/public/orm/mutation/index.d.ts +2 -2
  110. package/public/orm/query/index.d.ts +1 -28
  111. package/public/orm/query/index.js +0 -44
  112. package/admin/cli/commands/app-achievement.js +0 -286
  113. package/admin/cli/commands/app-level-requirement.js +0 -328
  114. package/admin/cli/commands/steps-achieved.d.ts +0 -8
  115. package/admin/cli/commands/steps-achieved.js +0 -35
  116. package/admin/cli/commands/steps-required.d.ts +0 -8
  117. package/admin/cli/commands/steps-required.js +0 -54
  118. package/admin/orm/models/appAchievement.d.ts +0 -54
  119. package/admin/orm/models/appLevel.d.ts +0 -54
  120. package/admin/orm/models/appLevelRequirement.d.ts +0 -54
  121. package/admin/orm/models/appLevelRequirement.js +0 -104
  122. package/admin/orm/models/appStep.d.ts +0 -54
  123. package/esm/admin/cli/commands/app-achievement.js +0 -284
  124. package/esm/admin/cli/commands/app-level-requirement.d.ts +0 -8
  125. package/esm/admin/cli/commands/app-level-requirement.js +0 -326
  126. package/esm/admin/cli/commands/app-step.d.ts +0 -8
  127. package/esm/admin/cli/commands/steps-achieved.d.ts +0 -8
  128. package/esm/admin/cli/commands/steps-achieved.js +0 -33
  129. package/esm/admin/cli/commands/steps-required.d.ts +0 -8
  130. package/esm/admin/cli/commands/steps-required.js +0 -52
  131. package/esm/admin/orm/models/appAchievement.d.ts +0 -54
  132. package/esm/admin/orm/models/appLevel.d.ts +0 -54
  133. package/esm/admin/orm/models/appLevelRequirement.d.ts +0 -54
  134. package/esm/admin/orm/models/appStep.d.ts +0 -54
  135. package/esm/public/cli/commands/app-achievement.d.ts +0 -8
  136. package/esm/public/cli/commands/app-achievement.js +0 -284
  137. package/esm/public/cli/commands/app-level-requirement.d.ts +0 -8
  138. package/esm/public/cli/commands/app-level-requirement.js +0 -326
  139. package/esm/public/cli/commands/app-level.d.ts +0 -8
  140. package/esm/public/cli/commands/app-step.d.ts +0 -8
  141. package/esm/public/cli/commands/levels-module.d.ts +0 -8
  142. package/esm/public/cli/commands/secrets-module.d.ts +0 -8
  143. package/esm/public/cli/commands/steps-achieved.d.ts +0 -8
  144. package/esm/public/cli/commands/steps-achieved.js +0 -33
  145. package/esm/public/cli/commands/steps-required.d.ts +0 -8
  146. package/esm/public/cli/commands/steps-required.js +0 -52
  147. package/esm/public/orm/models/appAchievement.d.ts +0 -54
  148. package/esm/public/orm/models/appLevel.d.ts +0 -54
  149. package/esm/public/orm/models/appLevel.js +0 -100
  150. package/esm/public/orm/models/appLevelRequirement.d.ts +0 -54
  151. package/esm/public/orm/models/appLevelRequirement.js +0 -100
  152. package/esm/public/orm/models/appStep.d.ts +0 -54
  153. package/esm/public/orm/models/appStep.js +0 -100
  154. package/esm/public/orm/models/levelsModule.d.ts +0 -54
  155. package/esm/public/orm/models/secretsModule.d.ts +0 -54
  156. package/esm/public/orm/models/secretsModule.js +0 -100
  157. package/public/cli/commands/app-achievement.d.ts +0 -8
  158. package/public/cli/commands/app-achievement.js +0 -286
  159. package/public/cli/commands/app-level-requirement.d.ts +0 -8
  160. package/public/cli/commands/app-level-requirement.js +0 -328
  161. package/public/cli/commands/app-level.d.ts +0 -8
  162. package/public/cli/commands/app-step.d.ts +0 -8
  163. package/public/cli/commands/levels-module.d.ts +0 -8
  164. package/public/cli/commands/secrets-module.d.ts +0 -8
  165. package/public/cli/commands/steps-achieved.d.ts +0 -8
  166. package/public/cli/commands/steps-achieved.js +0 -35
  167. package/public/cli/commands/steps-required.d.ts +0 -8
  168. package/public/cli/commands/steps-required.js +0 -54
  169. package/public/orm/models/appAchievement.d.ts +0 -54
  170. package/public/orm/models/appLevel.d.ts +0 -54
  171. package/public/orm/models/appLevel.js +0 -104
  172. package/public/orm/models/appLevelRequirement.d.ts +0 -54
  173. package/public/orm/models/appLevelRequirement.js +0 -104
  174. package/public/orm/models/appStep.d.ts +0 -54
  175. package/public/orm/models/appStep.js +0 -104
  176. package/public/orm/models/levelsModule.d.ts +0 -54
  177. package/public/orm/models/secretsModule.d.ts +0 -54
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  /**
4
- * CLI commands for AppStep
4
+ * CLI commands for AppLimitWarning
5
5
  * @generated by @constructive-io/graphql-codegen
6
6
  * DO NOT EDIT - changes will be overwritten
7
7
  */
@@ -10,13 +10,12 @@ const executor_1 = require("../executor");
10
10
  const utils_1 = require("../utils");
11
11
  const fieldSchema = {
12
12
  id: 'uuid',
13
- actorId: 'uuid',
14
13
  name: 'string',
15
- count: 'int',
16
- createdAt: 'string',
17
- updatedAt: 'string',
14
+ warningType: 'string',
15
+ thresholdValue: 'int',
16
+ taskIdentifier: 'string',
18
17
  };
19
- const usage = '\napp-step <command>\n\nCommands:\n list List appStep records\n find-first Find first matching appStep record\n get Get a appStep by ID\n create Create a new appStep\n update Update an existing appStep\n delete Delete a appStep\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 --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n';
18
+ const usage = '\napp-limit-warning <command>\n\nCommands:\n list List appLimitWarning records\n find-first Find first matching appLimitWarning record\n get Get a appLimitWarning by ID\n create Create a new appLimitWarning\n update Update an existing appLimitWarning\n delete Delete a appLimitWarning\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 --orderBy <values> Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\n --help, -h Show this help message\n';
20
19
  exports.default = async (argv, prompter, _options) => {
21
20
  if (argv.help || argv.h) {
22
21
  console.log(usage);
@@ -59,15 +58,14 @@ async function handleList(argv, _prompter) {
59
58
  try {
60
59
  const defaultSelect = {
61
60
  id: true,
62
- actorId: true,
63
61
  name: true,
64
- count: true,
65
- createdAt: true,
66
- updatedAt: true,
62
+ warningType: true,
63
+ thresholdValue: true,
64
+ taskIdentifier: true,
67
65
  };
68
66
  const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
69
67
  const client = (0, executor_1.getClient)();
70
- const result = await client.appStep.findMany(findManyArgs).execute();
68
+ const result = await client.appLimitWarning.findMany(findManyArgs).execute();
71
69
  console.log(JSON.stringify(result, null, 2));
72
70
  }
73
71
  catch (error) {
@@ -82,15 +80,14 @@ async function handleFindFirst(argv, _prompter) {
82
80
  try {
83
81
  const defaultSelect = {
84
82
  id: true,
85
- actorId: true,
86
83
  name: true,
87
- count: true,
88
- createdAt: true,
89
- updatedAt: true,
84
+ warningType: true,
85
+ thresholdValue: true,
86
+ taskIdentifier: true,
90
87
  };
91
88
  const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
92
89
  const client = (0, executor_1.getClient)();
93
- const result = await client.appStep.findFirst(findFirstArgs).execute();
90
+ const result = await client.appLimitWarning.findFirst(findFirstArgs).execute();
94
91
  console.log(JSON.stringify(result, null, 2));
95
92
  }
96
93
  catch (error) {
@@ -112,16 +109,15 @@ async function handleGet(argv, prompter) {
112
109
  },
113
110
  ]);
114
111
  const client = (0, executor_1.getClient)();
115
- const result = await client.appStep
112
+ const result = await client.appLimitWarning
116
113
  .findOne({
117
114
  id: answers.id,
118
115
  select: {
119
116
  id: true,
120
- actorId: true,
121
117
  name: true,
122
- count: true,
123
- createdAt: true,
124
- updatedAt: true,
118
+ warningType: true,
119
+ thresholdValue: true,
120
+ taskIdentifier: true,
125
121
  },
126
122
  })
127
123
  .execute();
@@ -140,42 +136,46 @@ async function handleCreate(argv, prompter) {
140
136
  const rawAnswers = await prompter.prompt(argv, [
141
137
  {
142
138
  type: 'text',
143
- name: 'actorId',
144
- message: 'actorId',
145
- required: false,
146
- skipPrompt: true,
139
+ name: 'name',
140
+ message: 'name',
141
+ required: true,
147
142
  },
148
143
  {
149
144
  type: 'text',
150
- name: 'name',
151
- message: 'name',
145
+ name: 'warningType',
146
+ message: 'warningType',
152
147
  required: true,
153
148
  },
154
149
  {
155
150
  type: 'text',
156
- name: 'count',
157
- message: 'count',
158
- required: false,
159
- skipPrompt: true,
151
+ name: 'thresholdValue',
152
+ message: 'thresholdValue',
153
+ required: true,
154
+ },
155
+ {
156
+ type: 'text',
157
+ name: 'taskIdentifier',
158
+ message: 'taskIdentifier',
159
+ required: true,
160
160
  },
161
161
  ]);
162
162
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
163
163
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
164
164
  const client = (0, executor_1.getClient)();
165
- const result = await client.appStep
165
+ const result = await client.appLimitWarning
166
166
  .create({
167
167
  data: {
168
- actorId: cleanedData.actorId,
169
168
  name: cleanedData.name,
170
- count: cleanedData.count,
169
+ warningType: cleanedData.warningType,
170
+ thresholdValue: cleanedData.thresholdValue,
171
+ taskIdentifier: cleanedData.taskIdentifier,
171
172
  },
172
173
  select: {
173
174
  id: true,
174
- actorId: true,
175
175
  name: true,
176
- count: true,
177
- createdAt: true,
178
- updatedAt: true,
176
+ warningType: true,
177
+ thresholdValue: true,
178
+ taskIdentifier: true,
179
179
  },
180
180
  })
181
181
  .execute();
@@ -200,45 +200,49 @@ async function handleUpdate(argv, prompter) {
200
200
  },
201
201
  {
202
202
  type: 'text',
203
- name: 'actorId',
204
- message: 'actorId',
203
+ name: 'name',
204
+ message: 'name',
205
205
  required: false,
206
- skipPrompt: true,
207
206
  },
208
207
  {
209
208
  type: 'text',
210
- name: 'name',
211
- message: 'name',
209
+ name: 'warningType',
210
+ message: 'warningType',
211
+ required: false,
212
+ },
213
+ {
214
+ type: 'text',
215
+ name: 'thresholdValue',
216
+ message: 'thresholdValue',
212
217
  required: false,
213
218
  },
214
219
  {
215
220
  type: 'text',
216
- name: 'count',
217
- message: 'count',
221
+ name: 'taskIdentifier',
222
+ message: 'taskIdentifier',
218
223
  required: false,
219
- skipPrompt: true,
220
224
  },
221
225
  ]);
222
226
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
223
227
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
224
228
  const client = (0, executor_1.getClient)();
225
- const result = await client.appStep
229
+ const result = await client.appLimitWarning
226
230
  .update({
227
231
  where: {
228
232
  id: answers.id,
229
233
  },
230
234
  data: {
231
- actorId: cleanedData.actorId,
232
235
  name: cleanedData.name,
233
- count: cleanedData.count,
236
+ warningType: cleanedData.warningType,
237
+ thresholdValue: cleanedData.thresholdValue,
238
+ taskIdentifier: cleanedData.taskIdentifier,
234
239
  },
235
240
  select: {
236
241
  id: true,
237
- actorId: true,
238
242
  name: true,
239
- count: true,
240
- createdAt: true,
241
- updatedAt: true,
243
+ warningType: true,
244
+ thresholdValue: true,
245
+ taskIdentifier: true,
242
246
  },
243
247
  })
244
248
  .execute();
@@ -264,7 +268,7 @@ async function handleDelete(argv, prompter) {
264
268
  ]);
265
269
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
266
270
  const client = (0, executor_1.getClient)();
267
- const result = await client.appStep
271
+ const result = await client.appLimitWarning
268
272
  .delete({
269
273
  where: {
270
274
  id: answers.id,
@@ -5,7 +5,7 @@ const utils_1 = require("../utils");
5
5
  exports.default = async (argv, prompter, _options) => {
6
6
  try {
7
7
  if (argv.help || argv.h) {
8
- console.log('construct-blueprint - Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Seven phases: (0) entity_type_provision for each membership_type entry \u2014 provisions entity tables, membership modules, and security, (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred), (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.\n\nUsage: construct-blueprint [OPTIONS]\n');
8
+ console.log('construct-blueprint - Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Eight phases: (0) entity_type_provision for each membership_type entry \u2014 provisions entity tables, membership modules, and security, (0.5) app-level storage, (1) provision_table() for each table with nodes[], fields[], policies[], and grants (table-level indexes/fts/unique_constraints/check_constraints are deferred), (2) provision_relation() for each relation, (3) provision_index() for top-level + deferred indexes, (4) provision_full_text_search() for top-level + deferred FTS, (5) provision_unique_constraint() for top-level + deferred unique constraints, (6) provision_check_constraint() for top-level + deferred check constraints, (7) seed achievements from definition.achievements[] \u2014 resolves events_module by entity_prefix and creates INSERT actions for levels, level_requirements, and achievement_rewards tables. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level entries are deferred to phases 3-6 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.\n\nUsage: construct-blueprint [OPTIONS]\n');
9
9
  process.exit(0);
10
10
  }
11
11
  const answers = await prompter.prompt(argv, [
@@ -5,7 +5,7 @@ const utils_1 = require("../utils");
5
5
  exports.default = async (argv, prompter, _options) => {
6
6
  try {
7
7
  if (argv.help || argv.h) {
8
- console.log("create-user-database - Creates a new user database with all required modules, permissions, and RLS policies.\n\nParameters:\n - database_name: Name for the new database (required)\n - owner_id: UUID of the owner user (required)\n - include_invites: Include invite system (default: true)\n - include_groups: Include group-level memberships (default: false)\n - include_levels: Include levels/achievements (default: false)\n - bitlen: Bit length for permission masks (default: 64)\n - tokens_expiration: Token expiration interval (default: 30 days)\n\nReturns the database_id UUID of the newly created database.\n\nExample usage:\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups\n\n\nUsage: create-user-database [OPTIONS]\n");
8
+ console.log("create-user-database - Creates a new user database with all required modules, permissions, and RLS policies.\n\nParameters:\n - database_name: Name for the new database (required)\n - owner_id: UUID of the owner user (required)\n - include_invites: Include invite system (default: true)\n - include_groups: Include group-level memberships (default: false)\n - include_levels: Include events/analytics (default: false)\n - bitlen: Bit length for permission masks (default: 64)\n - tokens_expiration: Token expiration interval (default: 30 days)\n\nReturns the database_id UUID of the newly created database.\n\nExample usage:\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups\n\n\nUsage: create-user-database [OPTIONS]\n");
9
9
  process.exit(0);
10
10
  }
11
11
  const answers = await prompter.prompt(argv, [
@@ -22,8 +22,11 @@ const fieldSchema = {
22
22
  chunkOverlap: 'int',
23
23
  chunkStrategy: 'string',
24
24
  metadataFields: 'json',
25
+ searchIndexes: 'json',
25
26
  enqueueChunkingJob: 'boolean',
26
27
  chunkingTaskName: 'string',
28
+ embeddingModel: 'string',
29
+ embeddingProvider: 'string',
27
30
  parentFkFieldId: 'uuid',
28
31
  createdAt: 'string',
29
32
  updatedAt: 'string',
@@ -83,8 +86,11 @@ async function handleList(argv, _prompter) {
83
86
  chunkOverlap: true,
84
87
  chunkStrategy: true,
85
88
  metadataFields: true,
89
+ searchIndexes: true,
86
90
  enqueueChunkingJob: true,
87
91
  chunkingTaskName: true,
92
+ embeddingModel: true,
93
+ embeddingProvider: true,
88
94
  parentFkFieldId: true,
89
95
  createdAt: true,
90
96
  updatedAt: true,
@@ -118,8 +124,11 @@ async function handleFindFirst(argv, _prompter) {
118
124
  chunkOverlap: true,
119
125
  chunkStrategy: true,
120
126
  metadataFields: true,
127
+ searchIndexes: true,
121
128
  enqueueChunkingJob: true,
122
129
  chunkingTaskName: true,
130
+ embeddingModel: true,
131
+ embeddingProvider: true,
123
132
  parentFkFieldId: true,
124
133
  createdAt: true,
125
134
  updatedAt: true,
@@ -165,8 +174,11 @@ async function handleGet(argv, prompter) {
165
174
  chunkOverlap: true,
166
175
  chunkStrategy: true,
167
176
  metadataFields: true,
177
+ searchIndexes: true,
168
178
  enqueueChunkingJob: true,
169
179
  chunkingTaskName: true,
180
+ embeddingModel: true,
181
+ embeddingProvider: true,
170
182
  parentFkFieldId: true,
171
183
  createdAt: true,
172
184
  updatedAt: true,
@@ -269,6 +281,13 @@ async function handleCreate(argv, prompter) {
269
281
  required: false,
270
282
  skipPrompt: true,
271
283
  },
284
+ {
285
+ type: 'json',
286
+ name: 'searchIndexes',
287
+ message: 'searchIndexes',
288
+ required: false,
289
+ skipPrompt: true,
290
+ },
272
291
  {
273
292
  type: 'boolean',
274
293
  name: 'enqueueChunkingJob',
@@ -283,6 +302,20 @@ async function handleCreate(argv, prompter) {
283
302
  required: false,
284
303
  skipPrompt: true,
285
304
  },
305
+ {
306
+ type: 'text',
307
+ name: 'embeddingModel',
308
+ message: 'embeddingModel',
309
+ required: false,
310
+ skipPrompt: true,
311
+ },
312
+ {
313
+ type: 'text',
314
+ name: 'embeddingProvider',
315
+ message: 'embeddingProvider',
316
+ required: false,
317
+ skipPrompt: true,
318
+ },
286
319
  {
287
320
  type: 'text',
288
321
  name: 'parentFkFieldId',
@@ -309,8 +342,11 @@ async function handleCreate(argv, prompter) {
309
342
  chunkOverlap: cleanedData.chunkOverlap,
310
343
  chunkStrategy: cleanedData.chunkStrategy,
311
344
  metadataFields: cleanedData.metadataFields,
345
+ searchIndexes: cleanedData.searchIndexes,
312
346
  enqueueChunkingJob: cleanedData.enqueueChunkingJob,
313
347
  chunkingTaskName: cleanedData.chunkingTaskName,
348
+ embeddingModel: cleanedData.embeddingModel,
349
+ embeddingProvider: cleanedData.embeddingProvider,
314
350
  parentFkFieldId: cleanedData.parentFkFieldId,
315
351
  },
316
352
  select: {
@@ -327,8 +363,11 @@ async function handleCreate(argv, prompter) {
327
363
  chunkOverlap: true,
328
364
  chunkStrategy: true,
329
365
  metadataFields: true,
366
+ searchIndexes: true,
330
367
  enqueueChunkingJob: true,
331
368
  chunkingTaskName: true,
369
+ embeddingModel: true,
370
+ embeddingProvider: true,
332
371
  parentFkFieldId: true,
333
372
  createdAt: true,
334
373
  updatedAt: true,
@@ -437,6 +476,13 @@ async function handleUpdate(argv, prompter) {
437
476
  required: false,
438
477
  skipPrompt: true,
439
478
  },
479
+ {
480
+ type: 'json',
481
+ name: 'searchIndexes',
482
+ message: 'searchIndexes',
483
+ required: false,
484
+ skipPrompt: true,
485
+ },
440
486
  {
441
487
  type: 'boolean',
442
488
  name: 'enqueueChunkingJob',
@@ -451,6 +497,20 @@ async function handleUpdate(argv, prompter) {
451
497
  required: false,
452
498
  skipPrompt: true,
453
499
  },
500
+ {
501
+ type: 'text',
502
+ name: 'embeddingModel',
503
+ message: 'embeddingModel',
504
+ required: false,
505
+ skipPrompt: true,
506
+ },
507
+ {
508
+ type: 'text',
509
+ name: 'embeddingProvider',
510
+ message: 'embeddingProvider',
511
+ required: false,
512
+ skipPrompt: true,
513
+ },
454
514
  {
455
515
  type: 'text',
456
516
  name: 'parentFkFieldId',
@@ -480,8 +540,11 @@ async function handleUpdate(argv, prompter) {
480
540
  chunkOverlap: cleanedData.chunkOverlap,
481
541
  chunkStrategy: cleanedData.chunkStrategy,
482
542
  metadataFields: cleanedData.metadataFields,
543
+ searchIndexes: cleanedData.searchIndexes,
483
544
  enqueueChunkingJob: cleanedData.enqueueChunkingJob,
484
545
  chunkingTaskName: cleanedData.chunkingTaskName,
546
+ embeddingModel: cleanedData.embeddingModel,
547
+ embeddingProvider: cleanedData.embeddingProvider,
485
548
  parentFkFieldId: cleanedData.parentFkFieldId,
486
549
  },
487
550
  select: {
@@ -498,8 +561,11 @@ async function handleUpdate(argv, prompter) {
498
561
  chunkOverlap: true,
499
562
  chunkStrategy: true,
500
563
  metadataFields: true,
564
+ searchIndexes: true,
501
565
  enqueueChunkingJob: true,
502
566
  chunkingTaskName: true,
567
+ embeddingModel: true,
568
+ embeddingProvider: true,
503
569
  parentFkFieldId: true,
504
570
  createdAt: true,
505
571
  updatedAt: true,
@@ -22,6 +22,7 @@ const fieldSchema = {
22
22
  hasLevels: 'boolean',
23
23
  hasStorage: 'boolean',
24
24
  hasInvites: 'boolean',
25
+ hasInviteAchievements: 'boolean',
25
26
  storageConfig: 'json',
26
27
  skipEntityPolicies: 'boolean',
27
28
  tableProvision: 'json',
@@ -90,6 +91,7 @@ async function handleList(argv, _prompter) {
90
91
  hasLevels: true,
91
92
  hasStorage: true,
92
93
  hasInvites: true,
94
+ hasInviteAchievements: true,
93
95
  storageConfig: true,
94
96
  skipEntityPolicies: true,
95
97
  tableProvision: true,
@@ -132,6 +134,7 @@ async function handleFindFirst(argv, _prompter) {
132
134
  hasLevels: true,
133
135
  hasStorage: true,
134
136
  hasInvites: true,
137
+ hasInviteAchievements: true,
135
138
  storageConfig: true,
136
139
  skipEntityPolicies: true,
137
140
  tableProvision: true,
@@ -186,6 +189,7 @@ async function handleGet(argv, prompter) {
186
189
  hasLevels: true,
187
190
  hasStorage: true,
188
191
  hasInvites: true,
192
+ hasInviteAchievements: true,
189
193
  storageConfig: true,
190
194
  skipEntityPolicies: true,
191
195
  tableProvision: true,
@@ -295,6 +299,13 @@ async function handleCreate(argv, prompter) {
295
299
  required: false,
296
300
  skipPrompt: true,
297
301
  },
302
+ {
303
+ type: 'boolean',
304
+ name: 'hasInviteAchievements',
305
+ message: 'hasInviteAchievements',
306
+ required: false,
307
+ skipPrompt: true,
308
+ },
298
309
  {
299
310
  type: 'json',
300
311
  name: 'storageConfig',
@@ -398,6 +409,7 @@ async function handleCreate(argv, prompter) {
398
409
  hasLevels: cleanedData.hasLevels,
399
410
  hasStorage: cleanedData.hasStorage,
400
411
  hasInvites: cleanedData.hasInvites,
412
+ hasInviteAchievements: cleanedData.hasInviteAchievements,
401
413
  storageConfig: cleanedData.storageConfig,
402
414
  skipEntityPolicies: cleanedData.skipEntityPolicies,
403
415
  tableProvision: cleanedData.tableProvision,
@@ -425,6 +437,7 @@ async function handleCreate(argv, prompter) {
425
437
  hasLevels: true,
426
438
  hasStorage: true,
427
439
  hasInvites: true,
440
+ hasInviteAchievements: true,
428
441
  storageConfig: true,
429
442
  skipEntityPolicies: true,
430
443
  tableProvision: true,
@@ -540,6 +553,13 @@ async function handleUpdate(argv, prompter) {
540
553
  required: false,
541
554
  skipPrompt: true,
542
555
  },
556
+ {
557
+ type: 'boolean',
558
+ name: 'hasInviteAchievements',
559
+ message: 'hasInviteAchievements',
560
+ required: false,
561
+ skipPrompt: true,
562
+ },
543
563
  {
544
564
  type: 'json',
545
565
  name: 'storageConfig',
@@ -646,6 +666,7 @@ async function handleUpdate(argv, prompter) {
646
666
  hasLevels: cleanedData.hasLevels,
647
667
  hasStorage: cleanedData.hasStorage,
648
668
  hasInvites: cleanedData.hasInvites,
669
+ hasInviteAchievements: cleanedData.hasInviteAchievements,
649
670
  storageConfig: cleanedData.storageConfig,
650
671
  skipEntityPolicies: cleanedData.skipEntityPolicies,
651
672
  tableProvision: cleanedData.tableProvision,
@@ -673,6 +694,7 @@ async function handleUpdate(argv, prompter) {
673
694
  hasLevels: true,
674
695
  hasStorage: true,
675
696
  hasInvites: true,
697
+ hasInviteAchievements: true,
676
698
  storageConfig: true,
677
699
  skipEntityPolicies: true,
678
700
  tableProvision: true,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * CLI commands for AppLevel
2
+ * CLI commands for EventsModule
3
3
  * @generated by @constructive-io/graphql-codegen
4
4
  * DO NOT EDIT - changes will be overwritten
5
5
  */