@constructive-sdk/cli 0.22.3 → 0.22.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,5 +1,5 @@
1
1
  /**
2
- * CLI commands for AppStep
2
+ * CLI commands for AppLimitWarning
3
3
  * @generated by @constructive-io/graphql-codegen
4
4
  * DO NOT EDIT - changes will be overwritten
5
5
  */
@@ -8,13 +8,12 @@ import { getClient } from '../executor';
8
8
  import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils';
9
9
  const fieldSchema = {
10
10
  id: 'uuid',
11
- actorId: 'uuid',
12
11
  name: 'string',
13
- count: 'int',
14
- createdAt: 'string',
15
- updatedAt: 'string',
12
+ warningType: 'string',
13
+ thresholdValue: 'int',
14
+ taskIdentifier: 'string',
16
15
  };
17
- 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';
16
+ 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';
18
17
  export default async (argv, prompter, _options) => {
19
18
  if (argv.help || argv.h) {
20
19
  console.log(usage);
@@ -57,15 +56,14 @@ async function handleList(argv, _prompter) {
57
56
  try {
58
57
  const defaultSelect = {
59
58
  id: true,
60
- actorId: true,
61
59
  name: true,
62
- count: true,
63
- createdAt: true,
64
- updatedAt: true,
60
+ warningType: true,
61
+ thresholdValue: true,
62
+ taskIdentifier: true,
65
63
  };
66
64
  const findManyArgs = parseFindManyArgs(argv, defaultSelect);
67
65
  const client = getClient();
68
- const result = await client.appStep.findMany(findManyArgs).execute();
66
+ const result = await client.appLimitWarning.findMany(findManyArgs).execute();
69
67
  console.log(JSON.stringify(result, null, 2));
70
68
  }
71
69
  catch (error) {
@@ -80,15 +78,14 @@ async function handleFindFirst(argv, _prompter) {
80
78
  try {
81
79
  const defaultSelect = {
82
80
  id: true,
83
- actorId: true,
84
81
  name: true,
85
- count: true,
86
- createdAt: true,
87
- updatedAt: true,
82
+ warningType: true,
83
+ thresholdValue: true,
84
+ taskIdentifier: true,
88
85
  };
89
86
  const findFirstArgs = parseFindFirstArgs(argv, defaultSelect);
90
87
  const client = getClient();
91
- const result = await client.appStep.findFirst(findFirstArgs).execute();
88
+ const result = await client.appLimitWarning.findFirst(findFirstArgs).execute();
92
89
  console.log(JSON.stringify(result, null, 2));
93
90
  }
94
91
  catch (error) {
@@ -110,16 +107,15 @@ async function handleGet(argv, prompter) {
110
107
  },
111
108
  ]);
112
109
  const client = getClient();
113
- const result = await client.appStep
110
+ const result = await client.appLimitWarning
114
111
  .findOne({
115
112
  id: answers.id,
116
113
  select: {
117
114
  id: true,
118
- actorId: true,
119
115
  name: true,
120
- count: true,
121
- createdAt: true,
122
- updatedAt: true,
116
+ warningType: true,
117
+ thresholdValue: true,
118
+ taskIdentifier: true,
123
119
  },
124
120
  })
125
121
  .execute();
@@ -138,42 +134,46 @@ async function handleCreate(argv, prompter) {
138
134
  const rawAnswers = await prompter.prompt(argv, [
139
135
  {
140
136
  type: 'text',
141
- name: 'actorId',
142
- message: 'actorId',
143
- required: false,
144
- skipPrompt: true,
137
+ name: 'name',
138
+ message: 'name',
139
+ required: true,
145
140
  },
146
141
  {
147
142
  type: 'text',
148
- name: 'name',
149
- message: 'name',
143
+ name: 'warningType',
144
+ message: 'warningType',
150
145
  required: true,
151
146
  },
152
147
  {
153
148
  type: 'text',
154
- name: 'count',
155
- message: 'count',
156
- required: false,
157
- skipPrompt: true,
149
+ name: 'thresholdValue',
150
+ message: 'thresholdValue',
151
+ required: true,
152
+ },
153
+ {
154
+ type: 'text',
155
+ name: 'taskIdentifier',
156
+ message: 'taskIdentifier',
157
+ required: true,
158
158
  },
159
159
  ]);
160
160
  const answers = coerceAnswers(rawAnswers, fieldSchema);
161
161
  const cleanedData = stripUndefined(answers, fieldSchema);
162
162
  const client = getClient();
163
- const result = await client.appStep
163
+ const result = await client.appLimitWarning
164
164
  .create({
165
165
  data: {
166
- actorId: cleanedData.actorId,
167
166
  name: cleanedData.name,
168
- count: cleanedData.count,
167
+ warningType: cleanedData.warningType,
168
+ thresholdValue: cleanedData.thresholdValue,
169
+ taskIdentifier: cleanedData.taskIdentifier,
169
170
  },
170
171
  select: {
171
172
  id: true,
172
- actorId: true,
173
173
  name: true,
174
- count: true,
175
- createdAt: true,
176
- updatedAt: true,
174
+ warningType: true,
175
+ thresholdValue: true,
176
+ taskIdentifier: true,
177
177
  },
178
178
  })
179
179
  .execute();
@@ -198,45 +198,49 @@ async function handleUpdate(argv, prompter) {
198
198
  },
199
199
  {
200
200
  type: 'text',
201
- name: 'actorId',
202
- message: 'actorId',
201
+ name: 'name',
202
+ message: 'name',
203
203
  required: false,
204
- skipPrompt: true,
205
204
  },
206
205
  {
207
206
  type: 'text',
208
- name: 'name',
209
- message: 'name',
207
+ name: 'warningType',
208
+ message: 'warningType',
209
+ required: false,
210
+ },
211
+ {
212
+ type: 'text',
213
+ name: 'thresholdValue',
214
+ message: 'thresholdValue',
210
215
  required: false,
211
216
  },
212
217
  {
213
218
  type: 'text',
214
- name: 'count',
215
- message: 'count',
219
+ name: 'taskIdentifier',
220
+ message: 'taskIdentifier',
216
221
  required: false,
217
- skipPrompt: true,
218
222
  },
219
223
  ]);
220
224
  const answers = coerceAnswers(rawAnswers, fieldSchema);
221
225
  const cleanedData = stripUndefined(answers, fieldSchema);
222
226
  const client = getClient();
223
- const result = await client.appStep
227
+ const result = await client.appLimitWarning
224
228
  .update({
225
229
  where: {
226
230
  id: answers.id,
227
231
  },
228
232
  data: {
229
- actorId: cleanedData.actorId,
230
233
  name: cleanedData.name,
231
- count: cleanedData.count,
234
+ warningType: cleanedData.warningType,
235
+ thresholdValue: cleanedData.thresholdValue,
236
+ taskIdentifier: cleanedData.taskIdentifier,
232
237
  },
233
238
  select: {
234
239
  id: true,
235
- actorId: true,
236
240
  name: true,
237
- count: true,
238
- createdAt: true,
239
- updatedAt: true,
241
+ warningType: true,
242
+ thresholdValue: true,
243
+ taskIdentifier: true,
240
244
  },
241
245
  })
242
246
  .execute();
@@ -262,7 +266,7 @@ async function handleDelete(argv, prompter) {
262
266
  ]);
263
267
  const answers = coerceAnswers(rawAnswers, fieldSchema);
264
268
  const client = getClient();
265
- const result = await client.appStep
269
+ const result = await client.appLimitWarning
266
270
  .delete({
267
271
  where: {
268
272
  id: answers.id,
@@ -3,7 +3,7 @@ import { unflattenDotNotation, buildSelectFromPaths } from '../utils';
3
3
  export default async (argv, prompter, _options) => {
4
4
  try {
5
5
  if (argv.help || argv.h) {
6
- 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');
6
+ 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');
7
7
  process.exit(0);
8
8
  }
9
9
  const answers = await prompter.prompt(argv, [
@@ -3,7 +3,7 @@ import { unflattenDotNotation, buildSelectFromPaths } from '../utils';
3
3
  export default async (argv, prompter, _options) => {
4
4
  try {
5
5
  if (argv.help || argv.h) {
6
- 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");
6
+ 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");
7
7
  process.exit(0);
8
8
  }
9
9
  const answers = await prompter.prompt(argv, [
@@ -20,8 +20,11 @@ const fieldSchema = {
20
20
  chunkOverlap: 'int',
21
21
  chunkStrategy: 'string',
22
22
  metadataFields: 'json',
23
+ searchIndexes: 'json',
23
24
  enqueueChunkingJob: 'boolean',
24
25
  chunkingTaskName: 'string',
26
+ embeddingModel: 'string',
27
+ embeddingProvider: 'string',
25
28
  parentFkFieldId: 'uuid',
26
29
  createdAt: 'string',
27
30
  updatedAt: 'string',
@@ -81,8 +84,11 @@ async function handleList(argv, _prompter) {
81
84
  chunkOverlap: true,
82
85
  chunkStrategy: true,
83
86
  metadataFields: true,
87
+ searchIndexes: true,
84
88
  enqueueChunkingJob: true,
85
89
  chunkingTaskName: true,
90
+ embeddingModel: true,
91
+ embeddingProvider: true,
86
92
  parentFkFieldId: true,
87
93
  createdAt: true,
88
94
  updatedAt: true,
@@ -116,8 +122,11 @@ async function handleFindFirst(argv, _prompter) {
116
122
  chunkOverlap: true,
117
123
  chunkStrategy: true,
118
124
  metadataFields: true,
125
+ searchIndexes: true,
119
126
  enqueueChunkingJob: true,
120
127
  chunkingTaskName: true,
128
+ embeddingModel: true,
129
+ embeddingProvider: true,
121
130
  parentFkFieldId: true,
122
131
  createdAt: true,
123
132
  updatedAt: true,
@@ -163,8 +172,11 @@ async function handleGet(argv, prompter) {
163
172
  chunkOverlap: true,
164
173
  chunkStrategy: true,
165
174
  metadataFields: true,
175
+ searchIndexes: true,
166
176
  enqueueChunkingJob: true,
167
177
  chunkingTaskName: true,
178
+ embeddingModel: true,
179
+ embeddingProvider: true,
168
180
  parentFkFieldId: true,
169
181
  createdAt: true,
170
182
  updatedAt: true,
@@ -267,6 +279,13 @@ async function handleCreate(argv, prompter) {
267
279
  required: false,
268
280
  skipPrompt: true,
269
281
  },
282
+ {
283
+ type: 'json',
284
+ name: 'searchIndexes',
285
+ message: 'searchIndexes',
286
+ required: false,
287
+ skipPrompt: true,
288
+ },
270
289
  {
271
290
  type: 'boolean',
272
291
  name: 'enqueueChunkingJob',
@@ -281,6 +300,20 @@ async function handleCreate(argv, prompter) {
281
300
  required: false,
282
301
  skipPrompt: true,
283
302
  },
303
+ {
304
+ type: 'text',
305
+ name: 'embeddingModel',
306
+ message: 'embeddingModel',
307
+ required: false,
308
+ skipPrompt: true,
309
+ },
310
+ {
311
+ type: 'text',
312
+ name: 'embeddingProvider',
313
+ message: 'embeddingProvider',
314
+ required: false,
315
+ skipPrompt: true,
316
+ },
284
317
  {
285
318
  type: 'text',
286
319
  name: 'parentFkFieldId',
@@ -307,8 +340,11 @@ async function handleCreate(argv, prompter) {
307
340
  chunkOverlap: cleanedData.chunkOverlap,
308
341
  chunkStrategy: cleanedData.chunkStrategy,
309
342
  metadataFields: cleanedData.metadataFields,
343
+ searchIndexes: cleanedData.searchIndexes,
310
344
  enqueueChunkingJob: cleanedData.enqueueChunkingJob,
311
345
  chunkingTaskName: cleanedData.chunkingTaskName,
346
+ embeddingModel: cleanedData.embeddingModel,
347
+ embeddingProvider: cleanedData.embeddingProvider,
312
348
  parentFkFieldId: cleanedData.parentFkFieldId,
313
349
  },
314
350
  select: {
@@ -325,8 +361,11 @@ async function handleCreate(argv, prompter) {
325
361
  chunkOverlap: true,
326
362
  chunkStrategy: true,
327
363
  metadataFields: true,
364
+ searchIndexes: true,
328
365
  enqueueChunkingJob: true,
329
366
  chunkingTaskName: true,
367
+ embeddingModel: true,
368
+ embeddingProvider: true,
330
369
  parentFkFieldId: true,
331
370
  createdAt: true,
332
371
  updatedAt: true,
@@ -435,6 +474,13 @@ async function handleUpdate(argv, prompter) {
435
474
  required: false,
436
475
  skipPrompt: true,
437
476
  },
477
+ {
478
+ type: 'json',
479
+ name: 'searchIndexes',
480
+ message: 'searchIndexes',
481
+ required: false,
482
+ skipPrompt: true,
483
+ },
438
484
  {
439
485
  type: 'boolean',
440
486
  name: 'enqueueChunkingJob',
@@ -449,6 +495,20 @@ async function handleUpdate(argv, prompter) {
449
495
  required: false,
450
496
  skipPrompt: true,
451
497
  },
498
+ {
499
+ type: 'text',
500
+ name: 'embeddingModel',
501
+ message: 'embeddingModel',
502
+ required: false,
503
+ skipPrompt: true,
504
+ },
505
+ {
506
+ type: 'text',
507
+ name: 'embeddingProvider',
508
+ message: 'embeddingProvider',
509
+ required: false,
510
+ skipPrompt: true,
511
+ },
452
512
  {
453
513
  type: 'text',
454
514
  name: 'parentFkFieldId',
@@ -478,8 +538,11 @@ async function handleUpdate(argv, prompter) {
478
538
  chunkOverlap: cleanedData.chunkOverlap,
479
539
  chunkStrategy: cleanedData.chunkStrategy,
480
540
  metadataFields: cleanedData.metadataFields,
541
+ searchIndexes: cleanedData.searchIndexes,
481
542
  enqueueChunkingJob: cleanedData.enqueueChunkingJob,
482
543
  chunkingTaskName: cleanedData.chunkingTaskName,
544
+ embeddingModel: cleanedData.embeddingModel,
545
+ embeddingProvider: cleanedData.embeddingProvider,
483
546
  parentFkFieldId: cleanedData.parentFkFieldId,
484
547
  },
485
548
  select: {
@@ -496,8 +559,11 @@ async function handleUpdate(argv, prompter) {
496
559
  chunkOverlap: true,
497
560
  chunkStrategy: true,
498
561
  metadataFields: true,
562
+ searchIndexes: true,
499
563
  enqueueChunkingJob: true,
500
564
  chunkingTaskName: true,
565
+ embeddingModel: true,
566
+ embeddingProvider: true,
501
567
  parentFkFieldId: true,
502
568
  createdAt: true,
503
569
  updatedAt: true,
@@ -20,6 +20,7 @@ const fieldSchema = {
20
20
  hasLevels: 'boolean',
21
21
  hasStorage: 'boolean',
22
22
  hasInvites: 'boolean',
23
+ hasInviteAchievements: 'boolean',
23
24
  storageConfig: 'json',
24
25
  skipEntityPolicies: 'boolean',
25
26
  tableProvision: 'json',
@@ -88,6 +89,7 @@ async function handleList(argv, _prompter) {
88
89
  hasLevels: true,
89
90
  hasStorage: true,
90
91
  hasInvites: true,
92
+ hasInviteAchievements: true,
91
93
  storageConfig: true,
92
94
  skipEntityPolicies: true,
93
95
  tableProvision: true,
@@ -130,6 +132,7 @@ async function handleFindFirst(argv, _prompter) {
130
132
  hasLevels: true,
131
133
  hasStorage: true,
132
134
  hasInvites: true,
135
+ hasInviteAchievements: true,
133
136
  storageConfig: true,
134
137
  skipEntityPolicies: true,
135
138
  tableProvision: true,
@@ -184,6 +187,7 @@ async function handleGet(argv, prompter) {
184
187
  hasLevels: true,
185
188
  hasStorage: true,
186
189
  hasInvites: true,
190
+ hasInviteAchievements: true,
187
191
  storageConfig: true,
188
192
  skipEntityPolicies: true,
189
193
  tableProvision: true,
@@ -293,6 +297,13 @@ async function handleCreate(argv, prompter) {
293
297
  required: false,
294
298
  skipPrompt: true,
295
299
  },
300
+ {
301
+ type: 'boolean',
302
+ name: 'hasInviteAchievements',
303
+ message: 'hasInviteAchievements',
304
+ required: false,
305
+ skipPrompt: true,
306
+ },
296
307
  {
297
308
  type: 'json',
298
309
  name: 'storageConfig',
@@ -396,6 +407,7 @@ async function handleCreate(argv, prompter) {
396
407
  hasLevels: cleanedData.hasLevels,
397
408
  hasStorage: cleanedData.hasStorage,
398
409
  hasInvites: cleanedData.hasInvites,
410
+ hasInviteAchievements: cleanedData.hasInviteAchievements,
399
411
  storageConfig: cleanedData.storageConfig,
400
412
  skipEntityPolicies: cleanedData.skipEntityPolicies,
401
413
  tableProvision: cleanedData.tableProvision,
@@ -423,6 +435,7 @@ async function handleCreate(argv, prompter) {
423
435
  hasLevels: true,
424
436
  hasStorage: true,
425
437
  hasInvites: true,
438
+ hasInviteAchievements: true,
426
439
  storageConfig: true,
427
440
  skipEntityPolicies: true,
428
441
  tableProvision: true,
@@ -538,6 +551,13 @@ async function handleUpdate(argv, prompter) {
538
551
  required: false,
539
552
  skipPrompt: true,
540
553
  },
554
+ {
555
+ type: 'boolean',
556
+ name: 'hasInviteAchievements',
557
+ message: 'hasInviteAchievements',
558
+ required: false,
559
+ skipPrompt: true,
560
+ },
541
561
  {
542
562
  type: 'json',
543
563
  name: 'storageConfig',
@@ -644,6 +664,7 @@ async function handleUpdate(argv, prompter) {
644
664
  hasLevels: cleanedData.hasLevels,
645
665
  hasStorage: cleanedData.hasStorage,
646
666
  hasInvites: cleanedData.hasInvites,
667
+ hasInviteAchievements: cleanedData.hasInviteAchievements,
647
668
  storageConfig: cleanedData.storageConfig,
648
669
  skipEntityPolicies: cleanedData.skipEntityPolicies,
649
670
  tableProvision: cleanedData.tableProvision,
@@ -671,6 +692,7 @@ async function handleUpdate(argv, prompter) {
671
692
  hasLevels: true,
672
693
  hasStorage: true,
673
694
  hasInvites: true,
695
+ hasInviteAchievements: true,
674
696
  storageConfig: true,
675
697
  skipEntityPolicies: true,
676
698
  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
  */