@constructive-sdk/cli 0.17.2 → 0.17.3

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 (213) hide show
  1. package/admin/cli/commands/app-invite.js +22 -0
  2. package/admin/cli/commands/app-limit-default.js +22 -0
  3. package/admin/cli/commands/{confirm-upload.d.ts → app-limit-event.d.ts} +1 -1
  4. package/admin/cli/commands/app-limit-event.js +212 -0
  5. package/admin/cli/commands/app-limit.js +66 -0
  6. package/admin/cli/commands/app-membership.js +0 -22
  7. package/admin/cli/commands/org-invite.js +22 -0
  8. package/{esm/admin/cli/commands/confirm-upload.d.ts → admin/cli/commands/org-limit-aggregate.d.ts} +1 -1
  9. package/admin/cli/commands/org-limit-aggregate.js +362 -0
  10. package/admin/cli/commands/org-limit-default.js +22 -0
  11. package/{auth/cli/commands/confirm-upload.d.ts → admin/cli/commands/org-limit-event.d.ts} +1 -1
  12. package/admin/cli/commands/org-limit-event.js +212 -0
  13. package/admin/cli/commands/org-limit.js +66 -0
  14. package/admin/cli/commands/org-membership-setting.js +44 -0
  15. package/admin/cli/commands.js +25 -21
  16. package/admin/cli/executor.d.ts +12 -14
  17. package/admin/orm/index.d.ts +24 -23
  18. package/admin/orm/index.js +24 -18
  19. package/admin/orm/input-types.d.ts +1297 -839
  20. package/admin/orm/models/appLimitEvent.d.ts +32 -0
  21. package/admin/orm/models/appLimitEvent.js +55 -0
  22. package/admin/orm/models/index.d.ts +12 -9
  23. package/admin/orm/models/index.js +25 -19
  24. package/admin/orm/models/orgLimitAggregate.d.ts +56 -0
  25. package/admin/orm/models/orgLimitAggregate.js +100 -0
  26. package/admin/orm/models/orgLimitEvent.d.ts +32 -0
  27. package/admin/orm/models/orgLimitEvent.js +55 -0
  28. package/admin/orm/mutation/index.d.ts +1 -15
  29. package/admin/orm/mutation/index.js +0 -12
  30. package/auth/cli/commands.js +1 -3
  31. package/auth/cli/executor.d.ts +0 -5
  32. package/auth/orm/index.d.ts +0 -5
  33. package/auth/orm/input-types.d.ts +0 -20
  34. package/auth/orm/mutation/index.d.ts +1 -15
  35. package/auth/orm/mutation/index.js +0 -12
  36. package/esm/admin/cli/commands/app-invite.js +22 -0
  37. package/esm/admin/cli/commands/app-limit-default.js +22 -0
  38. package/esm/{auth/cli/commands/confirm-upload.d.ts → admin/cli/commands/app-limit-event.d.ts} +1 -1
  39. package/esm/admin/cli/commands/app-limit-event.js +210 -0
  40. package/esm/admin/cli/commands/app-limit.js +66 -0
  41. package/esm/admin/cli/commands/app-membership.js +0 -22
  42. package/esm/admin/cli/commands/org-invite.js +22 -0
  43. package/esm/admin/cli/commands/org-limit-aggregate.d.ts +8 -0
  44. package/esm/admin/cli/commands/org-limit-aggregate.js +360 -0
  45. package/esm/admin/cli/commands/org-limit-default.js +22 -0
  46. package/esm/admin/cli/commands/org-limit-event.d.ts +8 -0
  47. package/esm/admin/cli/commands/org-limit-event.js +210 -0
  48. package/esm/admin/cli/commands/org-limit.js +66 -0
  49. package/esm/admin/cli/commands/org-membership-setting.js +44 -0
  50. package/esm/admin/cli/commands.js +25 -21
  51. package/esm/admin/cli/executor.d.ts +12 -14
  52. package/esm/admin/orm/index.d.ts +24 -23
  53. package/esm/admin/orm/index.js +24 -18
  54. package/esm/admin/orm/input-types.d.ts +1297 -839
  55. package/esm/admin/orm/models/appLimitEvent.d.ts +32 -0
  56. package/esm/admin/orm/models/appLimitEvent.js +51 -0
  57. package/esm/admin/orm/models/index.d.ts +12 -9
  58. package/esm/admin/orm/models/index.js +12 -9
  59. package/esm/admin/orm/models/orgLimitAggregate.d.ts +56 -0
  60. package/esm/admin/orm/models/orgLimitAggregate.js +96 -0
  61. package/esm/admin/orm/models/orgLimitEvent.d.ts +32 -0
  62. package/esm/admin/orm/models/orgLimitEvent.js +51 -0
  63. package/esm/admin/orm/mutation/index.d.ts +1 -15
  64. package/esm/admin/orm/mutation/index.js +0 -12
  65. package/esm/auth/cli/commands.js +1 -3
  66. package/esm/auth/cli/executor.d.ts +0 -5
  67. package/esm/auth/orm/index.d.ts +0 -5
  68. package/esm/auth/orm/input-types.d.ts +0 -20
  69. package/esm/auth/orm/mutation/index.d.ts +1 -15
  70. package/esm/auth/orm/mutation/index.js +0 -12
  71. package/esm/objects/cli/commands.js +1 -3
  72. package/esm/objects/cli/executor.d.ts +0 -5
  73. package/esm/objects/orm/index.d.ts +0 -5
  74. package/esm/objects/orm/input-types.d.ts +0 -20
  75. package/esm/objects/orm/mutation/index.d.ts +1 -15
  76. package/esm/objects/orm/mutation/index.js +0 -12
  77. package/esm/public/cli/commands/agent-message.d.ts +8 -0
  78. package/esm/public/cli/commands/agent-message.js +324 -0
  79. package/esm/public/cli/commands/agent-task.d.ts +8 -0
  80. package/esm/public/cli/commands/agent-task.js +368 -0
  81. package/esm/public/cli/commands/agent-thread.d.ts +8 -0
  82. package/esm/public/cli/commands/agent-thread.js +372 -0
  83. package/esm/public/cli/commands/app-invite.js +22 -0
  84. package/esm/public/cli/commands/app-limit-default.js +22 -0
  85. package/esm/public/cli/commands/app-limit-event.d.ts +8 -0
  86. package/esm/public/cli/commands/app-limit-event.js +210 -0
  87. package/esm/public/cli/commands/app-limit.js +66 -0
  88. package/esm/public/cli/commands/app-membership.js +0 -22
  89. package/esm/public/cli/commands/billing-module.d.ts +8 -0
  90. package/esm/public/cli/commands/billing-module.js +492 -0
  91. package/esm/public/cli/commands/limits-module.js +22 -0
  92. package/esm/public/cli/commands/node-type-registry.d.ts +8 -0
  93. package/esm/public/cli/commands/node-type-registry.js +343 -0
  94. package/esm/public/cli/commands/org-invite.js +22 -0
  95. package/esm/public/cli/commands/org-limit-aggregate.d.ts +8 -0
  96. package/esm/public/cli/commands/org-limit-aggregate.js +360 -0
  97. package/esm/public/cli/commands/org-limit-default.js +22 -0
  98. package/esm/public/cli/commands/org-limit-event.d.ts +8 -0
  99. package/esm/public/cli/commands/org-limit-event.js +210 -0
  100. package/esm/public/cli/commands/org-limit.js +66 -0
  101. package/esm/public/cli/commands/org-membership-setting.js +44 -0
  102. package/esm/public/cli/commands/plans-module.d.ts +8 -0
  103. package/esm/public/cli/commands/plans-module.js +426 -0
  104. package/esm/public/cli/commands/profiles-module.js +44 -0
  105. package/esm/public/cli/commands/storage-module.js +22 -44
  106. package/esm/public/cli/commands.js +45 -29
  107. package/esm/public/cli/executor.d.ts +38 -34
  108. package/esm/public/orm/index.d.ts +56 -43
  109. package/esm/public/orm/index.js +36 -18
  110. package/esm/public/orm/input-types.d.ts +2983 -1112
  111. package/esm/public/orm/input-types.js +9 -0
  112. package/esm/public/orm/models/agentMessage.d.ts +56 -0
  113. package/esm/public/orm/models/agentMessage.js +96 -0
  114. package/esm/public/orm/models/agentTask.d.ts +56 -0
  115. package/esm/public/orm/models/agentTask.js +96 -0
  116. package/esm/public/orm/models/agentThread.d.ts +56 -0
  117. package/esm/public/orm/models/agentThread.js +96 -0
  118. package/esm/public/orm/models/appLimitEvent.d.ts +32 -0
  119. package/esm/public/orm/models/appLimitEvent.js +51 -0
  120. package/esm/public/orm/models/billingModule.d.ts +56 -0
  121. package/esm/public/orm/models/billingModule.js +96 -0
  122. package/esm/public/orm/models/index.d.ts +18 -9
  123. package/esm/public/orm/models/index.js +18 -9
  124. package/esm/public/orm/models/nodeTypeRegistry.d.ts +56 -0
  125. package/esm/public/orm/models/nodeTypeRegistry.js +96 -0
  126. package/esm/public/orm/models/orgLimitAggregate.d.ts +56 -0
  127. package/esm/public/orm/models/orgLimitAggregate.js +96 -0
  128. package/esm/public/orm/models/orgLimitEvent.d.ts +32 -0
  129. package/esm/public/orm/models/orgLimitEvent.js +51 -0
  130. package/esm/public/orm/models/plansModule.d.ts +56 -0
  131. package/esm/public/orm/models/plansModule.js +96 -0
  132. package/esm/public/orm/mutation/index.d.ts +17 -31
  133. package/esm/public/orm/mutation/index.js +24 -36
  134. package/esm/public/orm/query/index.d.ts +28 -28
  135. package/esm/public/orm/query/index.js +48 -48
  136. package/objects/cli/commands.js +1 -3
  137. package/objects/cli/executor.d.ts +0 -5
  138. package/objects/orm/index.d.ts +0 -5
  139. package/objects/orm/input-types.d.ts +0 -20
  140. package/objects/orm/mutation/index.d.ts +1 -15
  141. package/objects/orm/mutation/index.js +0 -12
  142. package/package.json +4 -4
  143. package/public/cli/commands/agent-message.d.ts +8 -0
  144. package/public/cli/commands/agent-message.js +326 -0
  145. package/public/cli/commands/agent-task.d.ts +8 -0
  146. package/public/cli/commands/agent-task.js +370 -0
  147. package/public/cli/commands/agent-thread.d.ts +8 -0
  148. package/public/cli/commands/agent-thread.js +374 -0
  149. package/public/cli/commands/app-invite.js +22 -0
  150. package/public/cli/commands/app-limit-default.js +22 -0
  151. package/public/cli/commands/app-limit-event.d.ts +8 -0
  152. package/public/cli/commands/app-limit-event.js +212 -0
  153. package/public/cli/commands/app-limit.js +66 -0
  154. package/public/cli/commands/app-membership.js +0 -22
  155. package/public/cli/commands/billing-module.d.ts +8 -0
  156. package/public/cli/commands/billing-module.js +494 -0
  157. package/public/cli/commands/limits-module.js +22 -0
  158. package/public/cli/commands/node-type-registry.d.ts +8 -0
  159. package/public/cli/commands/node-type-registry.js +345 -0
  160. package/public/cli/commands/org-invite.js +22 -0
  161. package/public/cli/commands/org-limit-aggregate.d.ts +8 -0
  162. package/public/cli/commands/org-limit-aggregate.js +362 -0
  163. package/public/cli/commands/org-limit-default.js +22 -0
  164. package/public/cli/commands/org-limit-event.d.ts +8 -0
  165. package/public/cli/commands/org-limit-event.js +212 -0
  166. package/public/cli/commands/org-limit.js +66 -0
  167. package/public/cli/commands/org-membership-setting.js +44 -0
  168. package/public/cli/commands/plans-module.d.ts +8 -0
  169. package/public/cli/commands/plans-module.js +428 -0
  170. package/public/cli/commands/profiles-module.js +44 -0
  171. package/public/cli/commands/storage-module.js +22 -44
  172. package/public/cli/commands.js +45 -29
  173. package/public/cli/executor.d.ts +38 -34
  174. package/public/orm/index.d.ts +56 -43
  175. package/public/orm/index.js +36 -18
  176. package/public/orm/input-types.d.ts +2983 -1112
  177. package/public/orm/input-types.js +9 -0
  178. package/public/orm/models/agentMessage.d.ts +56 -0
  179. package/public/orm/models/agentMessage.js +100 -0
  180. package/public/orm/models/agentTask.d.ts +56 -0
  181. package/public/orm/models/agentTask.js +100 -0
  182. package/public/orm/models/agentThread.d.ts +56 -0
  183. package/public/orm/models/agentThread.js +100 -0
  184. package/public/orm/models/appLimitEvent.d.ts +32 -0
  185. package/public/orm/models/appLimitEvent.js +55 -0
  186. package/public/orm/models/billingModule.d.ts +56 -0
  187. package/public/orm/models/billingModule.js +100 -0
  188. package/public/orm/models/index.d.ts +18 -9
  189. package/public/orm/models/index.js +39 -21
  190. package/public/orm/models/nodeTypeRegistry.d.ts +56 -0
  191. package/public/orm/models/nodeTypeRegistry.js +100 -0
  192. package/public/orm/models/orgLimitAggregate.d.ts +56 -0
  193. package/public/orm/models/orgLimitAggregate.js +100 -0
  194. package/public/orm/models/orgLimitEvent.d.ts +32 -0
  195. package/public/orm/models/orgLimitEvent.js +55 -0
  196. package/public/orm/models/plansModule.d.ts +56 -0
  197. package/public/orm/models/plansModule.js +100 -0
  198. package/public/orm/mutation/index.d.ts +17 -31
  199. package/public/orm/mutation/index.js +24 -36
  200. package/public/orm/query/index.d.ts +28 -28
  201. package/public/orm/query/index.js +48 -48
  202. package/admin/cli/commands/confirm-upload.js +0 -36
  203. package/auth/cli/commands/confirm-upload.js +0 -36
  204. package/esm/admin/cli/commands/confirm-upload.js +0 -34
  205. package/esm/auth/cli/commands/confirm-upload.js +0 -34
  206. package/esm/objects/cli/commands/confirm-upload.d.ts +0 -8
  207. package/esm/objects/cli/commands/confirm-upload.js +0 -34
  208. package/esm/public/cli/commands/confirm-upload.d.ts +0 -8
  209. package/esm/public/cli/commands/confirm-upload.js +0 -34
  210. package/objects/cli/commands/confirm-upload.d.ts +0 -8
  211. package/objects/cli/commands/confirm-upload.js +0 -36
  212. package/public/cli/commands/confirm-upload.d.ts +0 -8
  213. package/public/cli/commands/confirm-upload.js +0 -36
@@ -19,6 +19,8 @@ const fieldSchema = {
19
19
  profileGrantsTableName: 'string',
20
20
  profileDefinitionGrantsTableId: 'uuid',
21
21
  profileDefinitionGrantsTableName: 'string',
22
+ profileTemplatesTableId: 'uuid',
23
+ profileTemplatesTableName: 'string',
22
24
  membershipType: 'int',
23
25
  entityTableId: 'uuid',
24
26
  actorTableId: 'uuid',
@@ -80,6 +82,8 @@ async function handleList(argv, _prompter) {
80
82
  profileGrantsTableName: true,
81
83
  profileDefinitionGrantsTableId: true,
82
84
  profileDefinitionGrantsTableName: true,
85
+ profileTemplatesTableId: true,
86
+ profileTemplatesTableName: true,
83
87
  membershipType: true,
84
88
  entityTableId: true,
85
89
  actorTableId: true,
@@ -115,6 +119,8 @@ async function handleFindFirst(argv, _prompter) {
115
119
  profileGrantsTableName: true,
116
120
  profileDefinitionGrantsTableId: true,
117
121
  profileDefinitionGrantsTableName: true,
122
+ profileTemplatesTableId: true,
123
+ profileTemplatesTableName: true,
118
124
  membershipType: true,
119
125
  entityTableId: true,
120
126
  actorTableId: true,
@@ -162,6 +168,8 @@ async function handleGet(argv, prompter) {
162
168
  profileGrantsTableName: true,
163
169
  profileDefinitionGrantsTableId: true,
164
170
  profileDefinitionGrantsTableName: true,
171
+ profileTemplatesTableId: true,
172
+ profileTemplatesTableName: true,
165
173
  membershipType: true,
166
174
  entityTableId: true,
167
175
  actorTableId: true,
@@ -260,6 +268,20 @@ async function handleCreate(argv, prompter) {
260
268
  required: false,
261
269
  skipPrompt: true,
262
270
  },
271
+ {
272
+ type: 'text',
273
+ name: 'profileTemplatesTableId',
274
+ message: 'profileTemplatesTableId',
275
+ required: false,
276
+ skipPrompt: true,
277
+ },
278
+ {
279
+ type: 'text',
280
+ name: 'profileTemplatesTableName',
281
+ message: 'profileTemplatesTableName',
282
+ required: false,
283
+ skipPrompt: true,
284
+ },
263
285
  {
264
286
  type: 'text',
265
287
  name: 'membershipType',
@@ -319,6 +341,8 @@ async function handleCreate(argv, prompter) {
319
341
  profileGrantsTableName: cleanedData.profileGrantsTableName,
320
342
  profileDefinitionGrantsTableId: cleanedData.profileDefinitionGrantsTableId,
321
343
  profileDefinitionGrantsTableName: cleanedData.profileDefinitionGrantsTableName,
344
+ profileTemplatesTableId: cleanedData.profileTemplatesTableId,
345
+ profileTemplatesTableName: cleanedData.profileTemplatesTableName,
322
346
  membershipType: cleanedData.membershipType,
323
347
  entityTableId: cleanedData.entityTableId,
324
348
  actorTableId: cleanedData.actorTableId,
@@ -339,6 +363,8 @@ async function handleCreate(argv, prompter) {
339
363
  profileGrantsTableName: true,
340
364
  profileDefinitionGrantsTableId: true,
341
365
  profileDefinitionGrantsTableName: true,
366
+ profileTemplatesTableId: true,
367
+ profileTemplatesTableName: true,
342
368
  membershipType: true,
343
369
  entityTableId: true,
344
370
  actorTableId: true,
@@ -443,6 +469,20 @@ async function handleUpdate(argv, prompter) {
443
469
  required: false,
444
470
  skipPrompt: true,
445
471
  },
472
+ {
473
+ type: 'text',
474
+ name: 'profileTemplatesTableId',
475
+ message: 'profileTemplatesTableId',
476
+ required: false,
477
+ skipPrompt: true,
478
+ },
479
+ {
480
+ type: 'text',
481
+ name: 'profileTemplatesTableName',
482
+ message: 'profileTemplatesTableName',
483
+ required: false,
484
+ skipPrompt: true,
485
+ },
446
486
  {
447
487
  type: 'text',
448
488
  name: 'membershipType',
@@ -505,6 +545,8 @@ async function handleUpdate(argv, prompter) {
505
545
  profileGrantsTableName: cleanedData.profileGrantsTableName,
506
546
  profileDefinitionGrantsTableId: cleanedData.profileDefinitionGrantsTableId,
507
547
  profileDefinitionGrantsTableName: cleanedData.profileDefinitionGrantsTableName,
548
+ profileTemplatesTableId: cleanedData.profileTemplatesTableId,
549
+ profileTemplatesTableName: cleanedData.profileTemplatesTableName,
508
550
  membershipType: cleanedData.membershipType,
509
551
  entityTableId: cleanedData.entityTableId,
510
552
  actorTableId: cleanedData.actorTableId,
@@ -525,6 +567,8 @@ async function handleUpdate(argv, prompter) {
525
567
  profileGrantsTableName: true,
526
568
  profileDefinitionGrantsTableId: true,
527
569
  profileDefinitionGrantsTableName: true,
570
+ profileTemplatesTableId: true,
571
+ profileTemplatesTableName: true,
528
572
  membershipType: true,
529
573
  entityTableId: true,
530
574
  actorTableId: true,
@@ -13,10 +13,8 @@ const fieldSchema = {
13
13
  privateSchemaId: 'uuid',
14
14
  bucketsTableId: 'uuid',
15
15
  filesTableId: 'uuid',
16
- uploadRequestsTableId: 'uuid',
17
16
  bucketsTableName: 'string',
18
17
  filesTableName: 'string',
19
- uploadRequestsTableName: 'string',
20
18
  membershipType: 'int',
21
19
  policies: 'json',
22
20
  skipDefaultPolicyTables: 'string',
@@ -25,6 +23,7 @@ const fieldSchema = {
25
23
  publicUrlPrefix: 'string',
26
24
  provider: 'string',
27
25
  allowedOrigins: 'string',
26
+ restrictReads: 'boolean',
28
27
  uploadUrlExpirySeconds: 'int',
29
28
  downloadUrlExpirySeconds: 'int',
30
29
  defaultMaxFileSize: 'int',
@@ -79,10 +78,8 @@ async function handleList(argv, _prompter) {
79
78
  privateSchemaId: true,
80
79
  bucketsTableId: true,
81
80
  filesTableId: true,
82
- uploadRequestsTableId: true,
83
81
  bucketsTableName: true,
84
82
  filesTableName: true,
85
- uploadRequestsTableName: true,
86
83
  membershipType: true,
87
84
  policies: true,
88
85
  skipDefaultPolicyTables: true,
@@ -91,6 +88,7 @@ async function handleList(argv, _prompter) {
91
88
  publicUrlPrefix: true,
92
89
  provider: true,
93
90
  allowedOrigins: true,
91
+ restrictReads: true,
94
92
  uploadUrlExpirySeconds: true,
95
93
  downloadUrlExpirySeconds: true,
96
94
  defaultMaxFileSize: true,
@@ -119,10 +117,8 @@ async function handleFindFirst(argv, _prompter) {
119
117
  privateSchemaId: true,
120
118
  bucketsTableId: true,
121
119
  filesTableId: true,
122
- uploadRequestsTableId: true,
123
120
  bucketsTableName: true,
124
121
  filesTableName: true,
125
- uploadRequestsTableName: true,
126
122
  membershipType: true,
127
123
  policies: true,
128
124
  skipDefaultPolicyTables: true,
@@ -131,6 +127,7 @@ async function handleFindFirst(argv, _prompter) {
131
127
  publicUrlPrefix: true,
132
128
  provider: true,
133
129
  allowedOrigins: true,
130
+ restrictReads: true,
134
131
  uploadUrlExpirySeconds: true,
135
132
  downloadUrlExpirySeconds: true,
136
133
  defaultMaxFileSize: true,
@@ -171,10 +168,8 @@ async function handleGet(argv, prompter) {
171
168
  privateSchemaId: true,
172
169
  bucketsTableId: true,
173
170
  filesTableId: true,
174
- uploadRequestsTableId: true,
175
171
  bucketsTableName: true,
176
172
  filesTableName: true,
177
- uploadRequestsTableName: true,
178
173
  membershipType: true,
179
174
  policies: true,
180
175
  skipDefaultPolicyTables: true,
@@ -183,6 +178,7 @@ async function handleGet(argv, prompter) {
183
178
  publicUrlPrefix: true,
184
179
  provider: true,
185
180
  allowedOrigins: true,
181
+ restrictReads: true,
186
182
  uploadUrlExpirySeconds: true,
187
183
  downloadUrlExpirySeconds: true,
188
184
  defaultMaxFileSize: true,
@@ -238,13 +234,6 @@ async function handleCreate(argv, prompter) {
238
234
  required: false,
239
235
  skipPrompt: true,
240
236
  },
241
- {
242
- type: 'text',
243
- name: 'uploadRequestsTableId',
244
- message: 'uploadRequestsTableId',
245
- required: false,
246
- skipPrompt: true,
247
- },
248
237
  {
249
238
  type: 'text',
250
239
  name: 'bucketsTableName',
@@ -259,13 +248,6 @@ async function handleCreate(argv, prompter) {
259
248
  required: false,
260
249
  skipPrompt: true,
261
250
  },
262
- {
263
- type: 'text',
264
- name: 'uploadRequestsTableName',
265
- message: 'uploadRequestsTableName',
266
- required: false,
267
- skipPrompt: true,
268
- },
269
251
  {
270
252
  type: 'text',
271
253
  name: 'membershipType',
@@ -322,6 +304,13 @@ async function handleCreate(argv, prompter) {
322
304
  required: false,
323
305
  skipPrompt: true,
324
306
  },
307
+ {
308
+ type: 'boolean',
309
+ name: 'restrictReads',
310
+ message: 'restrictReads',
311
+ required: false,
312
+ skipPrompt: true,
313
+ },
325
314
  {
326
315
  type: 'text',
327
316
  name: 'uploadUrlExpirySeconds',
@@ -369,10 +358,8 @@ async function handleCreate(argv, prompter) {
369
358
  privateSchemaId: cleanedData.privateSchemaId,
370
359
  bucketsTableId: cleanedData.bucketsTableId,
371
360
  filesTableId: cleanedData.filesTableId,
372
- uploadRequestsTableId: cleanedData.uploadRequestsTableId,
373
361
  bucketsTableName: cleanedData.bucketsTableName,
374
362
  filesTableName: cleanedData.filesTableName,
375
- uploadRequestsTableName: cleanedData.uploadRequestsTableName,
376
363
  membershipType: cleanedData.membershipType,
377
364
  policies: cleanedData.policies,
378
365
  skipDefaultPolicyTables: cleanedData.skipDefaultPolicyTables,
@@ -381,6 +368,7 @@ async function handleCreate(argv, prompter) {
381
368
  publicUrlPrefix: cleanedData.publicUrlPrefix,
382
369
  provider: cleanedData.provider,
383
370
  allowedOrigins: cleanedData.allowedOrigins,
371
+ restrictReads: cleanedData.restrictReads,
384
372
  uploadUrlExpirySeconds: cleanedData.uploadUrlExpirySeconds,
385
373
  downloadUrlExpirySeconds: cleanedData.downloadUrlExpirySeconds,
386
374
  defaultMaxFileSize: cleanedData.defaultMaxFileSize,
@@ -394,10 +382,8 @@ async function handleCreate(argv, prompter) {
394
382
  privateSchemaId: true,
395
383
  bucketsTableId: true,
396
384
  filesTableId: true,
397
- uploadRequestsTableId: true,
398
385
  bucketsTableName: true,
399
386
  filesTableName: true,
400
- uploadRequestsTableName: true,
401
387
  membershipType: true,
402
388
  policies: true,
403
389
  skipDefaultPolicyTables: true,
@@ -406,6 +392,7 @@ async function handleCreate(argv, prompter) {
406
392
  publicUrlPrefix: true,
407
393
  provider: true,
408
394
  allowedOrigins: true,
395
+ restrictReads: true,
409
396
  uploadUrlExpirySeconds: true,
410
397
  downloadUrlExpirySeconds: true,
411
398
  defaultMaxFileSize: true,
@@ -467,13 +454,6 @@ async function handleUpdate(argv, prompter) {
467
454
  required: false,
468
455
  skipPrompt: true,
469
456
  },
470
- {
471
- type: 'text',
472
- name: 'uploadRequestsTableId',
473
- message: 'uploadRequestsTableId',
474
- required: false,
475
- skipPrompt: true,
476
- },
477
457
  {
478
458
  type: 'text',
479
459
  name: 'bucketsTableName',
@@ -488,13 +468,6 @@ async function handleUpdate(argv, prompter) {
488
468
  required: false,
489
469
  skipPrompt: true,
490
470
  },
491
- {
492
- type: 'text',
493
- name: 'uploadRequestsTableName',
494
- message: 'uploadRequestsTableName',
495
- required: false,
496
- skipPrompt: true,
497
- },
498
471
  {
499
472
  type: 'text',
500
473
  name: 'membershipType',
@@ -551,6 +524,13 @@ async function handleUpdate(argv, prompter) {
551
524
  required: false,
552
525
  skipPrompt: true,
553
526
  },
527
+ {
528
+ type: 'boolean',
529
+ name: 'restrictReads',
530
+ message: 'restrictReads',
531
+ required: false,
532
+ skipPrompt: true,
533
+ },
554
534
  {
555
535
  type: 'text',
556
536
  name: 'uploadUrlExpirySeconds',
@@ -601,10 +581,8 @@ async function handleUpdate(argv, prompter) {
601
581
  privateSchemaId: cleanedData.privateSchemaId,
602
582
  bucketsTableId: cleanedData.bucketsTableId,
603
583
  filesTableId: cleanedData.filesTableId,
604
- uploadRequestsTableId: cleanedData.uploadRequestsTableId,
605
584
  bucketsTableName: cleanedData.bucketsTableName,
606
585
  filesTableName: cleanedData.filesTableName,
607
- uploadRequestsTableName: cleanedData.uploadRequestsTableName,
608
586
  membershipType: cleanedData.membershipType,
609
587
  policies: cleanedData.policies,
610
588
  skipDefaultPolicyTables: cleanedData.skipDefaultPolicyTables,
@@ -613,6 +591,7 @@ async function handleUpdate(argv, prompter) {
613
591
  publicUrlPrefix: cleanedData.publicUrlPrefix,
614
592
  provider: cleanedData.provider,
615
593
  allowedOrigins: cleanedData.allowedOrigins,
594
+ restrictReads: cleanedData.restrictReads,
616
595
  uploadUrlExpirySeconds: cleanedData.uploadUrlExpirySeconds,
617
596
  downloadUrlExpirySeconds: cleanedData.downloadUrlExpirySeconds,
618
597
  defaultMaxFileSize: cleanedData.defaultMaxFileSize,
@@ -626,10 +605,8 @@ async function handleUpdate(argv, prompter) {
626
605
  privateSchemaId: true,
627
606
  bucketsTableId: true,
628
607
  filesTableId: true,
629
- uploadRequestsTableId: true,
630
608
  bucketsTableName: true,
631
609
  filesTableName: true,
632
- uploadRequestsTableName: true,
633
610
  membershipType: true,
634
611
  policies: true,
635
612
  skipDefaultPolicyTables: true,
@@ -638,6 +615,7 @@ async function handleUpdate(argv, prompter) {
638
615
  publicUrlPrefix: true,
639
616
  provider: true,
640
617
  allowedOrigins: true,
618
+ restrictReads: true,
641
619
  uploadUrlExpirySeconds: true,
642
620
  downloadUrlExpirySeconds: true,
643
621
  defaultMaxFileSize: true,
@@ -9,9 +9,9 @@ import authCmd from './commands/auth';
9
9
  import orgGetManagersRecordCmd from './commands/org-get-managers-record';
10
10
  import orgGetSubordinatesRecordCmd from './commands/org-get-subordinates-record';
11
11
  import getAllRecordCmd from './commands/get-all-record';
12
- import objectCmd from './commands/object';
13
12
  import appPermissionCmd from './commands/app-permission';
14
13
  import orgPermissionCmd from './commands/org-permission';
14
+ import objectCmd from './commands/object';
15
15
  import appLevelRequirementCmd from './commands/app-level-requirement';
16
16
  import databaseCmd from './commands/database';
17
17
  import schemaCmd from './commands/schema';
@@ -92,6 +92,7 @@ import orgChartEdgeGrantCmd from './commands/org-chart-edge-grant';
92
92
  import orgPermissionDefaultCmd from './commands/org-permission-default';
93
93
  import appLimitCmd from './commands/app-limit';
94
94
  import orgLimitCmd from './commands/org-limit';
95
+ import orgLimitAggregateCmd from './commands/org-limit-aggregate';
95
96
  import appStepCmd from './commands/app-step';
96
97
  import appAchievementCmd from './commands/app-achievement';
97
98
  import appLevelCmd from './commands/app-level';
@@ -104,26 +105,34 @@ import appClaimedInviteCmd from './commands/app-claimed-invite';
104
105
  import orgInviteCmd from './commands/org-invite';
105
106
  import orgClaimedInviteCmd from './commands/org-claimed-invite';
106
107
  import auditLogCmd from './commands/audit-log';
107
- import appPermissionDefaultCmd from './commands/app-permission-default';
108
+ import agentThreadCmd from './commands/agent-thread';
109
+ import agentMessageCmd from './commands/agent-message';
110
+ import agentTaskCmd from './commands/agent-task';
111
+ import roleTypeCmd from './commands/role-type';
108
112
  import identityProviderCmd from './commands/identity-provider';
109
113
  import refCmd from './commands/ref';
110
114
  import storeCmd from './commands/store';
111
- import roleTypeCmd from './commands/role-type';
115
+ import appPermissionDefaultCmd from './commands/app-permission-default';
116
+ import membershipTypeCmd from './commands/membership-type';
112
117
  import migrateFileCmd from './commands/migrate-file';
118
+ import devicesModuleCmd from './commands/devices-module';
119
+ import nodeTypeRegistryCmd from './commands/node-type-registry';
113
120
  import appLimitDefaultCmd from './commands/app-limit-default';
114
121
  import orgLimitDefaultCmd from './commands/org-limit-default';
115
- import devicesModuleCmd from './commands/devices-module';
116
122
  import userConnectedAccountCmd from './commands/user-connected-account';
117
- import appMembershipDefaultCmd from './commands/app-membership-default';
118
- import orgMembershipDefaultCmd from './commands/org-membership-default';
119
123
  import commitCmd from './commands/commit';
120
124
  import rateLimitsModuleCmd from './commands/rate-limits-module';
121
- import membershipTypeCmd from './commands/membership-type';
125
+ import appMembershipDefaultCmd from './commands/app-membership-default';
126
+ import orgMembershipDefaultCmd from './commands/org-membership-default';
127
+ import appLimitEventCmd from './commands/app-limit-event';
128
+ import orgLimitEventCmd from './commands/org-limit-event';
129
+ import plansModuleCmd from './commands/plans-module';
122
130
  import rlsModuleCmd from './commands/rls-module';
123
131
  import sqlActionCmd from './commands/sql-action';
124
- import orgMembershipSettingCmd from './commands/org-membership-setting';
125
- import userCmd from './commands/user';
132
+ import billingModuleCmd from './commands/billing-module';
126
133
  import astMigrationCmd from './commands/ast-migration';
134
+ import userCmd from './commands/user';
135
+ import orgMembershipSettingCmd from './commands/org-membership-setting';
127
136
  import appMembershipCmd from './commands/app-membership';
128
137
  import hierarchyModuleCmd from './commands/hierarchy-module';
129
138
  import currentUserIdCmd from './commands/current-user-id';
@@ -141,11 +150,11 @@ import orgPermissionsGetMaskCmd from './commands/org-permissions-get-mask';
141
150
  import resolveBlueprintTableCmd from './commands/resolve-blueprint-table';
142
151
  import appPermissionsGetMaskByNamesCmd from './commands/app-permissions-get-mask-by-names';
143
152
  import orgPermissionsGetMaskByNamesCmd from './commands/org-permissions-get-mask-by-names';
153
+ import appPermissionsGetByMaskCmd from './commands/app-permissions-get-by-mask';
154
+ import orgPermissionsGetByMaskCmd from './commands/org-permissions-get-by-mask';
144
155
  import getAllObjectsFromRootCmd from './commands/get-all-objects-from-root';
145
156
  import getPathObjectsFromRootCmd from './commands/get-path-objects-from-root';
146
157
  import getObjectAtPathCmd from './commands/get-object-at-path';
147
- import appPermissionsGetByMaskCmd from './commands/app-permissions-get-by-mask';
148
- import orgPermissionsGetByMaskCmd from './commands/org-permissions-get-by-mask';
149
158
  import stepsRequiredCmd from './commands/steps-required';
150
159
  import currentUserCmd from './commands/current-user';
151
160
  import sendAccountDeletionEmailCmd from './commands/send-account-deletion-email';
@@ -189,14 +198,13 @@ import signInCrossOriginCmd from './commands/sign-in-cross-origin';
189
198
  import createUserDatabaseCmd from './commands/create-user-database';
190
199
  import extendTokenExpiresCmd from './commands/extend-token-expires';
191
200
  import createApiKeyCmd from './commands/create-api-key';
201
+ import sendVerificationEmailCmd from './commands/send-verification-email';
202
+ import forgotPasswordCmd from './commands/forgot-password';
192
203
  import signUpCmd from './commands/sign-up';
193
204
  import requestCrossOriginTokenCmd from './commands/request-cross-origin-token';
194
205
  import signInCmd from './commands/sign-in';
195
206
  import provisionTableCmd from './commands/provision-table';
196
- import sendVerificationEmailCmd from './commands/send-verification-email';
197
- import forgotPasswordCmd from './commands/forgot-password';
198
207
  import requestUploadUrlCmd from './commands/request-upload-url';
199
- import confirmUploadCmd from './commands/confirm-upload';
200
208
  import provisionBucketCmd from './commands/provision-bucket';
201
209
  const createCommandMap = () => ({
202
210
  context: contextCmd,
@@ -204,9 +212,9 @@ const createCommandMap = () => ({
204
212
  'org-get-managers-record': orgGetManagersRecordCmd,
205
213
  'org-get-subordinates-record': orgGetSubordinatesRecordCmd,
206
214
  'get-all-record': getAllRecordCmd,
207
- object: objectCmd,
208
215
  'app-permission': appPermissionCmd,
209
216
  'org-permission': orgPermissionCmd,
217
+ object: objectCmd,
210
218
  'app-level-requirement': appLevelRequirementCmd,
211
219
  database: databaseCmd,
212
220
  schema: schemaCmd,
@@ -287,6 +295,7 @@ const createCommandMap = () => ({
287
295
  'org-permission-default': orgPermissionDefaultCmd,
288
296
  'app-limit': appLimitCmd,
289
297
  'org-limit': orgLimitCmd,
298
+ 'org-limit-aggregate': orgLimitAggregateCmd,
290
299
  'app-step': appStepCmd,
291
300
  'app-achievement': appAchievementCmd,
292
301
  'app-level': appLevelCmd,
@@ -299,26 +308,34 @@ const createCommandMap = () => ({
299
308
  'org-invite': orgInviteCmd,
300
309
  'org-claimed-invite': orgClaimedInviteCmd,
301
310
  'audit-log': auditLogCmd,
302
- 'app-permission-default': appPermissionDefaultCmd,
311
+ 'agent-thread': agentThreadCmd,
312
+ 'agent-message': agentMessageCmd,
313
+ 'agent-task': agentTaskCmd,
314
+ 'role-type': roleTypeCmd,
303
315
  'identity-provider': identityProviderCmd,
304
316
  ref: refCmd,
305
317
  store: storeCmd,
306
- 'role-type': roleTypeCmd,
318
+ 'app-permission-default': appPermissionDefaultCmd,
319
+ 'membership-type': membershipTypeCmd,
307
320
  'migrate-file': migrateFileCmd,
321
+ 'devices-module': devicesModuleCmd,
322
+ 'node-type-registry': nodeTypeRegistryCmd,
308
323
  'app-limit-default': appLimitDefaultCmd,
309
324
  'org-limit-default': orgLimitDefaultCmd,
310
- 'devices-module': devicesModuleCmd,
311
325
  'user-connected-account': userConnectedAccountCmd,
312
- 'app-membership-default': appMembershipDefaultCmd,
313
- 'org-membership-default': orgMembershipDefaultCmd,
314
326
  commit: commitCmd,
315
327
  'rate-limits-module': rateLimitsModuleCmd,
316
- 'membership-type': membershipTypeCmd,
328
+ 'app-membership-default': appMembershipDefaultCmd,
329
+ 'org-membership-default': orgMembershipDefaultCmd,
330
+ 'app-limit-event': appLimitEventCmd,
331
+ 'org-limit-event': orgLimitEventCmd,
332
+ 'plans-module': plansModuleCmd,
317
333
  'rls-module': rlsModuleCmd,
318
334
  'sql-action': sqlActionCmd,
319
- 'org-membership-setting': orgMembershipSettingCmd,
320
- user: userCmd,
335
+ 'billing-module': billingModuleCmd,
321
336
  'ast-migration': astMigrationCmd,
337
+ user: userCmd,
338
+ 'org-membership-setting': orgMembershipSettingCmd,
322
339
  'app-membership': appMembershipCmd,
323
340
  'hierarchy-module': hierarchyModuleCmd,
324
341
  'current-user-id': currentUserIdCmd,
@@ -336,11 +353,11 @@ const createCommandMap = () => ({
336
353
  'resolve-blueprint-table': resolveBlueprintTableCmd,
337
354
  'app-permissions-get-mask-by-names': appPermissionsGetMaskByNamesCmd,
338
355
  'org-permissions-get-mask-by-names': orgPermissionsGetMaskByNamesCmd,
356
+ 'app-permissions-get-by-mask': appPermissionsGetByMaskCmd,
357
+ 'org-permissions-get-by-mask': orgPermissionsGetByMaskCmd,
339
358
  'get-all-objects-from-root': getAllObjectsFromRootCmd,
340
359
  'get-path-objects-from-root': getPathObjectsFromRootCmd,
341
360
  'get-object-at-path': getObjectAtPathCmd,
342
- 'app-permissions-get-by-mask': appPermissionsGetByMaskCmd,
343
- 'org-permissions-get-by-mask': orgPermissionsGetByMaskCmd,
344
361
  'steps-required': stepsRequiredCmd,
345
362
  'current-user': currentUserCmd,
346
363
  'send-account-deletion-email': sendAccountDeletionEmailCmd,
@@ -384,17 +401,16 @@ const createCommandMap = () => ({
384
401
  'create-user-database': createUserDatabaseCmd,
385
402
  'extend-token-expires': extendTokenExpiresCmd,
386
403
  'create-api-key': createApiKeyCmd,
404
+ 'send-verification-email': sendVerificationEmailCmd,
405
+ 'forgot-password': forgotPasswordCmd,
387
406
  'sign-up': signUpCmd,
388
407
  'request-cross-origin-token': requestCrossOriginTokenCmd,
389
408
  'sign-in': signInCmd,
390
409
  'provision-table': provisionTableCmd,
391
- 'send-verification-email': sendVerificationEmailCmd,
392
- 'forgot-password': forgotPasswordCmd,
393
410
  'request-upload-url': requestUploadUrlCmd,
394
- 'confirm-upload': confirmUploadCmd,
395
411
  'provision-bucket': provisionBucketCmd,
396
412
  });
397
- const usage = "\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n get-all-record getAllRecord CRUD operations\n object object CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n database database CRUD operations\n schema schema CRUD operations\n table table CRUD operations\n check-constraint checkConstraint CRUD operations\n field field CRUD operations\n spatial-relation spatialRelation CRUD operations\n foreign-key-constraint foreignKeyConstraint CRUD operations\n full-text-search fullTextSearch CRUD operations\n index index CRUD operations\n policy policy CRUD operations\n primary-key-constraint primaryKeyConstraint CRUD operations\n table-grant tableGrant CRUD operations\n trigger trigger CRUD operations\n unique-constraint uniqueConstraint CRUD operations\n view view CRUD operations\n view-table viewTable CRUD operations\n view-grant viewGrant CRUD operations\n view-rule viewRule CRUD operations\n embedding-chunk embeddingChunk CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n relation-provision relationProvision CRUD operations\n session-secrets-module sessionSecretsModule CRUD operations\n identity-providers-module identityProvidersModule CRUD operations\n schema-grant schemaGrant CRUD operations\n default-privilege defaultPrivilege CRUD operations\n enum enum CRUD operations\n api-schema apiSchema CRUD operations\n api-module apiModule CRUD operations\n domain domain CRUD operations\n site-metadatum siteMetadatum CRUD operations\n site-module siteModule CRUD operations\n site-theme siteTheme CRUD operations\n trigger-function triggerFunction CRUD operations\n database-transfer databaseTransfer CRUD operations\n api api CRUD operations\n site site CRUD operations\n app app CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n default-ids-module defaultIdsModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n emails-module emailsModule CRUD operations\n encrypted-secrets-module encryptedSecretsModule CRUD operations\n invites-module invitesModule CRUD operations\n levels-module levelsModule CRUD operations\n limits-module limitsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n memberships-module membershipsModule CRUD operations\n permissions-module permissionsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n profiles-module profilesModule CRUD operations\n secrets-module secretsModule CRUD operations\n sessions-module sessionsModule CRUD operations\n user-auth-module userAuthModule CRUD operations\n users-module usersModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n blueprint-construction blueprintConstruction CRUD operations\n storage-module storageModule CRUD operations\n entity-type-provision entityTypeProvision CRUD operations\n webauthn-credentials-module webauthnCredentialsModule CRUD operations\n webauthn-auth-module webauthnAuthModule CRUD operations\n notifications-module notificationsModule CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-grant appGrant CRUD operations\n org-membership orgMembership CRUD operations\n org-member orgMember CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n org-member-profile orgMemberProfile CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-limit appLimit CRUD operations\n org-limit orgLimit CRUD operations\n app-step appStep CRUD operations\n app-achievement appAchievement CRUD operations\n app-level appLevel CRUD operations\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n webauthn-credential webauthnCredential CRUD operations\n app-invite appInvite CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n org-invite orgInvite CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n audit-log auditLog CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n identity-provider identityProvider CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n role-type roleType CRUD operations\n migrate-file migrateFile CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n devices-module devicesModule CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n commit commit CRUD operations\n rate-limits-module rateLimitsModule CRUD operations\n membership-type membershipType CRUD operations\n rls-module rlsModule CRUD operations\n sql-action sqlAction CRUD operations\n org-membership-setting orgMembershipSetting CRUD operations\n user user CRUD operations\n ast-migration astMigration CRUD operations\n app-membership appMembership CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n current-user-id currentUserId\n current-user-agent currentUserAgent\n current-ip-address currentIpAddress\n require-step-up requireStepUp\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n steps-achieved stepsAchieved\n rev-parse revParse\n resolve-blueprint-field Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. \"location\") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this.\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n resolve-blueprint-table Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error.\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n get-all-objects-from-root Reads and enables pagination through a set of `Object`.\n get-path-objects-from-root Reads and enables pagination through a set of `Object`.\n get-object-at-path getObjectAtPath\n app-permissions-get-by-mask Reads and enables pagination through a set of `AppPermission`.\n org-permissions-get-by-mask Reads and enables pagination through a set of `OrgPermission`.\n steps-required Reads and enables pagination through a set of `AppLevelRequirement`.\n current-user currentUser\n send-account-deletion-email sendAccountDeletionEmail\n sign-out signOut\n accept-database-transfer acceptDatabaseTransfer\n cancel-database-transfer cancelDatabaseTransfer\n reject-database-transfer rejectDatabaseTransfer\n disconnect-account disconnectAccount\n revoke-api-key revokeApiKey\n revoke-session revokeSession\n verify-password verifyPassword\n verify-totp verifyTotp\n submit-app-invite-code submitAppInviteCode\n submit-org-invite-code submitOrgInviteCode\n check-password checkPassword\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n freeze-objects freezeObjects\n init-empty-repo initEmptyRepo\n construct-blueprint Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Six 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 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. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.\n provision-new-user provisionNewUser\n reset-password resetPassword\n remove-node-at-path removeNodeAtPath\n copy-template-to-blueprint Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID.\n provision-spatial-relation Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin \u2194 param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist \u2014 this is a metadata-only insert.\n bootstrap-user bootstrapUser\n set-field-order setFieldOrder\n provision-unique-constraint Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.\n provision-full-text-search Creates a full-text search configuration on a table. Accepts a jsonb definition with field (tsvector column name) and sources (array of {field, weight, lang}). Graceful: skips if FTS config already exists for the same (table_id, field_id). Returns the fts_id.\n provision-index Creates an index on a table. Accepts a jsonb definition with columns (array of names or single column string), access_method (default BTREE), is_unique, op_classes, options, and name (auto-generated if omitted). Graceful: skips if an index with the same (table_id, field_ids, access_method) already exists. Returns the index_id.\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n provision-database-with-user provisionDatabaseWithUser\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n provision-relation Composable relation provisioning: creates FK fields, indexes, unique constraints, and junction tables depending on the relation_type. Supports RelationBelongsTo, RelationHasOne, RelationHasMany, and RelationManyToMany. ManyToMany uses provision_table() internally for junction table creation with full node/grant/policy support. All operations are graceful (skip existing). Returns (out_field_id, out_junction_table_id, out_source_field_id, out_target_field_id).\n apply-rls applyRls\n sign-in-cross-origin signInCrossOrigin\n 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 extend-token-expires extendTokenExpires\n create-api-key createApiKey\n sign-up signUp\n request-cross-origin-token requestCrossOriginToken\n sign-in signIn\n provision-table Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields).\n send-verification-email sendVerificationEmail\n forgot-password forgotPassword\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n confirm-upload Confirm that a file has been uploaded to S3.\nVerifies the object exists in S3, checks content-type,\nand transitions the file status from 'pending' to 'ready'.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n";
413
+ const usage = "\ncsdk <command>\n\nCommands:\n context Manage API contexts\n auth Manage authentication\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n get-all-record getAllRecord CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n object object CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n database database CRUD operations\n schema schema CRUD operations\n table table CRUD operations\n check-constraint checkConstraint CRUD operations\n field field CRUD operations\n spatial-relation spatialRelation CRUD operations\n foreign-key-constraint foreignKeyConstraint CRUD operations\n full-text-search fullTextSearch CRUD operations\n index index CRUD operations\n policy policy CRUD operations\n primary-key-constraint primaryKeyConstraint CRUD operations\n table-grant tableGrant CRUD operations\n trigger trigger CRUD operations\n unique-constraint uniqueConstraint CRUD operations\n view view CRUD operations\n view-table viewTable CRUD operations\n view-grant viewGrant CRUD operations\n view-rule viewRule CRUD operations\n embedding-chunk embeddingChunk CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n relation-provision relationProvision CRUD operations\n session-secrets-module sessionSecretsModule CRUD operations\n identity-providers-module identityProvidersModule CRUD operations\n schema-grant schemaGrant CRUD operations\n default-privilege defaultPrivilege CRUD operations\n enum enum CRUD operations\n api-schema apiSchema CRUD operations\n api-module apiModule CRUD operations\n domain domain CRUD operations\n site-metadatum siteMetadatum CRUD operations\n site-module siteModule CRUD operations\n site-theme siteTheme CRUD operations\n trigger-function triggerFunction CRUD operations\n database-transfer databaseTransfer CRUD operations\n api api CRUD operations\n site site CRUD operations\n app app CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n default-ids-module defaultIdsModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n emails-module emailsModule CRUD operations\n encrypted-secrets-module encryptedSecretsModule CRUD operations\n invites-module invitesModule CRUD operations\n levels-module levelsModule CRUD operations\n limits-module limitsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n memberships-module membershipsModule CRUD operations\n permissions-module permissionsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n profiles-module profilesModule CRUD operations\n secrets-module secretsModule CRUD operations\n sessions-module sessionsModule CRUD operations\n user-auth-module userAuthModule CRUD operations\n users-module usersModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n blueprint-construction blueprintConstruction CRUD operations\n storage-module storageModule CRUD operations\n entity-type-provision entityTypeProvision CRUD operations\n webauthn-credentials-module webauthnCredentialsModule CRUD operations\n webauthn-auth-module webauthnAuthModule CRUD operations\n notifications-module notificationsModule CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-grant appGrant CRUD operations\n org-membership orgMembership CRUD operations\n org-member orgMember CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n org-member-profile orgMemberProfile CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-limit appLimit CRUD operations\n org-limit orgLimit CRUD operations\n org-limit-aggregate orgLimitAggregate CRUD operations\n app-step appStep CRUD operations\n app-achievement appAchievement CRUD operations\n app-level appLevel CRUD operations\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n webauthn-credential webauthnCredential CRUD operations\n app-invite appInvite CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n org-invite orgInvite CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n audit-log auditLog CRUD operations\n agent-thread agentThread CRUD operations\n agent-message agentMessage CRUD operations\n agent-task agentTask CRUD operations\n role-type roleType CRUD operations\n identity-provider identityProvider CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n membership-type membershipType CRUD operations\n migrate-file migrateFile CRUD operations\n devices-module devicesModule CRUD operations\n node-type-registry nodeTypeRegistry CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n commit commit CRUD operations\n rate-limits-module rateLimitsModule CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n app-limit-event appLimitEvent CRUD operations\n org-limit-event orgLimitEvent CRUD operations\n plans-module plansModule CRUD operations\n rls-module rlsModule CRUD operations\n sql-action sqlAction CRUD operations\n billing-module billingModule CRUD operations\n ast-migration astMigration CRUD operations\n user user CRUD operations\n org-membership-setting orgMembershipSetting CRUD operations\n app-membership appMembership CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n current-user-id currentUserId\n current-user-agent currentUserAgent\n current-ip-address currentIpAddress\n require-step-up requireStepUp\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n steps-achieved stepsAchieved\n rev-parse revParse\n resolve-blueprint-field Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. \"location\") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this.\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n resolve-blueprint-table Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error.\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n app-permissions-get-by-mask Reads and enables pagination through a set of `AppPermission`.\n org-permissions-get-by-mask Reads and enables pagination through a set of `OrgPermission`.\n get-all-objects-from-root Reads and enables pagination through a set of `Object`.\n get-path-objects-from-root Reads and enables pagination through a set of `Object`.\n get-object-at-path getObjectAtPath\n steps-required Reads and enables pagination through a set of `AppLevelRequirement`.\n current-user currentUser\n send-account-deletion-email sendAccountDeletionEmail\n sign-out signOut\n accept-database-transfer acceptDatabaseTransfer\n cancel-database-transfer cancelDatabaseTransfer\n reject-database-transfer rejectDatabaseTransfer\n disconnect-account disconnectAccount\n revoke-api-key revokeApiKey\n revoke-session revokeSession\n verify-password verifyPassword\n verify-totp verifyTotp\n submit-app-invite-code submitAppInviteCode\n submit-org-invite-code submitOrgInviteCode\n check-password checkPassword\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n freeze-objects freezeObjects\n init-empty-repo initEmptyRepo\n construct-blueprint Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Six 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 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. Phase 0 entity tables are added to the table_map so subsequent phases can reference them by name. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Returns the construction record ID on success, NULL on failure.\n provision-new-user provisionNewUser\n reset-password resetPassword\n remove-node-at-path removeNodeAtPath\n copy-template-to-blueprint Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID.\n provision-spatial-relation Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin \u2194 param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist \u2014 this is a metadata-only insert.\n bootstrap-user bootstrapUser\n set-field-order setFieldOrder\n provision-unique-constraint Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.\n provision-full-text-search Creates a full-text search configuration on a table. Accepts a jsonb definition with field (tsvector column name) and sources (array of {field, weight, lang}). Graceful: skips if FTS config already exists for the same (table_id, field_id). Returns the fts_id.\n provision-index Creates an index on a table. Accepts a jsonb definition with columns (array of names or single column string), access_method (default BTREE), is_unique, op_classes, options, and name (auto-generated if omitted). Graceful: skips if an index with the same (table_id, field_ids, access_method) already exists. Returns the index_id.\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n provision-database-with-user provisionDatabaseWithUser\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n provision-relation Composable relation provisioning: creates FK fields, indexes, unique constraints, and junction tables depending on the relation_type. Supports RelationBelongsTo, RelationHasOne, RelationHasMany, and RelationManyToMany. ManyToMany uses provision_table() internally for junction table creation with full node/grant/policy support. All operations are graceful (skip existing). Returns (out_field_id, out_junction_table_id, out_source_field_id, out_target_field_id).\n apply-rls applyRls\n sign-in-cross-origin signInCrossOrigin\n 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 extend-token-expires extendTokenExpires\n create-api-key createApiKey\n send-verification-email sendVerificationEmail\n forgot-password forgotPassword\n sign-up signUp\n request-cross-origin-token requestCrossOriginToken\n sign-in signIn\n provision-table Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields).\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n";
398
414
  export const commands = async (argv, prompter, options) => {
399
415
  if (argv.help || argv.h) {
400
416
  console.log(usage);