@constructive-sdk/cli 0.25.9 → 0.25.11

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 (229) hide show
  1. package/admin/cli/commands/app-admin-grant.js +3 -1
  2. package/admin/cli/commands/app-grant.js +3 -1
  3. package/admin/cli/commands/app-invite.js +44 -0
  4. package/admin/cli/commands/app-owner-grant.js +3 -1
  5. package/admin/cli/commands/app-permission-default-grant.d.ts +8 -0
  6. package/admin/cli/commands/app-permission-default-grant.js +286 -0
  7. package/admin/cli/commands/app-permission-default-permission.d.ts +8 -0
  8. package/admin/cli/commands/app-permission-default-permission.js +242 -0
  9. package/admin/cli/commands/org-admin-grant.js +3 -1
  10. package/admin/cli/commands/org-grant.js +3 -1
  11. package/admin/cli/commands/org-invite.js +44 -0
  12. package/admin/cli/commands/org-owner-grant.js +3 -1
  13. package/admin/cli/commands/org-permission-default-grant.d.ts +8 -0
  14. package/admin/cli/commands/org-permission-default-grant.js +306 -0
  15. package/admin/cli/commands/org-permission-default-permission.d.ts +8 -0
  16. package/admin/cli/commands/org-permission-default-permission.js +262 -0
  17. package/admin/cli/commands.js +11 -3
  18. package/admin/cli/executor.d.ts +5 -1
  19. package/admin/orm/index.d.ts +10 -2
  20. package/admin/orm/index.js +10 -2
  21. package/admin/orm/input-types.d.ts +1611 -230
  22. package/admin/orm/input-types.js +9 -1
  23. package/admin/orm/models/appPermissionDefaultGrant.d.ts +54 -0
  24. package/admin/orm/models/appPermissionDefaultGrant.js +104 -0
  25. package/admin/orm/models/appPermissionDefaultPermission.d.ts +54 -0
  26. package/admin/orm/models/appPermissionDefaultPermission.js +104 -0
  27. package/admin/orm/models/index.d.ts +5 -1
  28. package/admin/orm/models/index.js +11 -3
  29. package/admin/orm/models/orgPermissionDefaultGrant.d.ts +54 -0
  30. package/admin/orm/models/orgPermissionDefaultGrant.js +104 -0
  31. package/admin/orm/models/orgPermissionDefaultPermission.d.ts +54 -0
  32. package/admin/orm/models/orgPermissionDefaultPermission.js +104 -0
  33. package/agent/cli/commands/agent-message.js +34 -12
  34. package/agent/cli/commands/agent-task.js +12 -12
  35. package/agent/cli/embedder.d.ts +5 -0
  36. package/agent/cli/embedder.js +46 -9
  37. package/agent/orm/input-types.d.ts +289 -47
  38. package/agent/orm/input-types.js +1 -0
  39. package/api/cli/commands/check-constraint.js +0 -22
  40. package/api/cli/commands/composite-type.d.ts +8 -0
  41. package/api/cli/commands/composite-type.js +424 -0
  42. package/api/cli/commands/enum.js +0 -22
  43. package/api/cli/commands/field.js +0 -22
  44. package/api/cli/commands/foreign-key-constraint.js +0 -22
  45. package/api/cli/commands/index.js +0 -22
  46. package/api/cli/commands/policy.js +0 -22
  47. package/api/cli/commands/primary-key-constraint.js +0 -22
  48. package/api/cli/commands/schema.js +0 -22
  49. package/api/cli/commands/spatial-relation.js +0 -22
  50. package/api/cli/commands/table.js +6 -28
  51. package/api/cli/commands/trigger.js +0 -22
  52. package/api/cli/commands/unique-constraint.js +0 -22
  53. package/api/cli/commands/view-table.js +22 -0
  54. package/api/cli/commands/view.js +0 -22
  55. package/api/cli/commands.js +3 -1
  56. package/api/cli/executor.d.ts +1 -0
  57. package/api/orm/index.d.ts +2 -0
  58. package/api/orm/index.js +2 -0
  59. package/api/orm/input-types.d.ts +1064 -125
  60. package/api/orm/input-types.js +3 -0
  61. package/api/orm/models/compositeType.d.ts +54 -0
  62. package/api/orm/models/compositeType.js +104 -0
  63. package/api/orm/models/index.d.ts +1 -0
  64. package/api/orm/models/index.js +3 -1
  65. package/auth/cli/commands/link-identity.d.ts +8 -0
  66. package/auth/cli/commands/link-identity.js +36 -0
  67. package/auth/cli/commands/sign-in-sms-otp.d.ts +8 -0
  68. package/auth/cli/commands/sign-in-sms-otp.js +36 -0
  69. package/auth/cli/commands/sign-up-sms.d.ts +8 -0
  70. package/auth/cli/commands/sign-up-sms.js +36 -0
  71. package/auth/cli/commands.js +7 -1
  72. package/auth/cli/executor.d.ts +15 -0
  73. package/auth/orm/index.d.ts +15 -0
  74. package/auth/orm/input-types.d.ts +197 -1
  75. package/auth/orm/mutation/index.d.ts +25 -1
  76. package/auth/orm/mutation/index.js +36 -0
  77. package/esm/admin/cli/commands/app-admin-grant.js +3 -1
  78. package/esm/admin/cli/commands/app-grant.js +3 -1
  79. package/esm/admin/cli/commands/app-invite.js +44 -0
  80. package/esm/admin/cli/commands/app-owner-grant.js +3 -1
  81. package/esm/admin/cli/commands/app-permission-default-grant.d.ts +8 -0
  82. package/esm/admin/cli/commands/app-permission-default-grant.js +284 -0
  83. package/esm/admin/cli/commands/app-permission-default-permission.d.ts +8 -0
  84. package/esm/admin/cli/commands/app-permission-default-permission.js +240 -0
  85. package/esm/admin/cli/commands/org-admin-grant.js +3 -1
  86. package/esm/admin/cli/commands/org-grant.js +3 -1
  87. package/esm/admin/cli/commands/org-invite.js +44 -0
  88. package/esm/admin/cli/commands/org-owner-grant.js +3 -1
  89. package/esm/admin/cli/commands/org-permission-default-grant.d.ts +8 -0
  90. package/esm/admin/cli/commands/org-permission-default-grant.js +304 -0
  91. package/esm/admin/cli/commands/org-permission-default-permission.d.ts +8 -0
  92. package/esm/admin/cli/commands/org-permission-default-permission.js +260 -0
  93. package/esm/admin/cli/commands.js +11 -3
  94. package/esm/admin/cli/executor.d.ts +5 -1
  95. package/esm/admin/orm/index.d.ts +10 -2
  96. package/esm/admin/orm/index.js +10 -2
  97. package/esm/admin/orm/input-types.d.ts +1611 -230
  98. package/esm/admin/orm/input-types.js +9 -1
  99. package/esm/admin/orm/models/appPermissionDefaultGrant.d.ts +54 -0
  100. package/esm/admin/orm/models/appPermissionDefaultGrant.js +100 -0
  101. package/esm/admin/orm/models/appPermissionDefaultPermission.d.ts +54 -0
  102. package/esm/admin/orm/models/appPermissionDefaultPermission.js +100 -0
  103. package/esm/admin/orm/models/index.d.ts +5 -1
  104. package/esm/admin/orm/models/index.js +5 -1
  105. package/esm/admin/orm/models/orgPermissionDefaultGrant.d.ts +54 -0
  106. package/esm/admin/orm/models/orgPermissionDefaultGrant.js +100 -0
  107. package/esm/admin/orm/models/orgPermissionDefaultPermission.d.ts +54 -0
  108. package/esm/admin/orm/models/orgPermissionDefaultPermission.js +100 -0
  109. package/esm/agent/cli/commands/agent-message.js +34 -12
  110. package/esm/agent/cli/commands/agent-task.js +12 -12
  111. package/esm/agent/cli/embedder.d.ts +5 -0
  112. package/esm/agent/cli/embedder.js +10 -2
  113. package/esm/agent/orm/input-types.d.ts +289 -47
  114. package/esm/agent/orm/input-types.js +1 -0
  115. package/esm/api/cli/commands/check-constraint.js +0 -22
  116. package/esm/api/cli/commands/composite-type.d.ts +8 -0
  117. package/esm/api/cli/commands/composite-type.js +422 -0
  118. package/esm/api/cli/commands/enum.js +0 -22
  119. package/esm/api/cli/commands/field.js +0 -22
  120. package/esm/api/cli/commands/foreign-key-constraint.js +0 -22
  121. package/esm/api/cli/commands/index.js +0 -22
  122. package/esm/api/cli/commands/policy.js +0 -22
  123. package/esm/api/cli/commands/primary-key-constraint.js +0 -22
  124. package/esm/api/cli/commands/schema.js +0 -22
  125. package/esm/api/cli/commands/spatial-relation.js +0 -22
  126. package/esm/api/cli/commands/table.js +6 -28
  127. package/esm/api/cli/commands/trigger.js +0 -22
  128. package/esm/api/cli/commands/unique-constraint.js +0 -22
  129. package/esm/api/cli/commands/view-table.js +22 -0
  130. package/esm/api/cli/commands/view.js +0 -22
  131. package/esm/api/cli/commands.js +3 -1
  132. package/esm/api/cli/executor.d.ts +1 -0
  133. package/esm/api/orm/index.d.ts +2 -0
  134. package/esm/api/orm/index.js +2 -0
  135. package/esm/api/orm/input-types.d.ts +1064 -125
  136. package/esm/api/orm/input-types.js +3 -0
  137. package/esm/api/orm/models/compositeType.d.ts +54 -0
  138. package/esm/api/orm/models/compositeType.js +100 -0
  139. package/esm/api/orm/models/index.d.ts +1 -0
  140. package/esm/api/orm/models/index.js +1 -0
  141. package/esm/auth/cli/commands/link-identity.d.ts +8 -0
  142. package/esm/auth/cli/commands/link-identity.js +34 -0
  143. package/esm/auth/cli/commands/sign-in-sms-otp.d.ts +8 -0
  144. package/esm/auth/cli/commands/sign-in-sms-otp.js +34 -0
  145. package/esm/auth/cli/commands/sign-up-sms.d.ts +8 -0
  146. package/esm/auth/cli/commands/sign-up-sms.js +34 -0
  147. package/esm/auth/cli/commands.js +7 -1
  148. package/esm/auth/cli/executor.d.ts +15 -0
  149. package/esm/auth/orm/index.d.ts +15 -0
  150. package/esm/auth/orm/input-types.d.ts +197 -1
  151. package/esm/auth/orm/mutation/index.d.ts +25 -1
  152. package/esm/auth/orm/mutation/index.js +36 -0
  153. package/esm/modules/cli/commands/agent-module.js +88 -0
  154. package/esm/modules/cli/commands/billing-module.js +66 -0
  155. package/esm/modules/cli/commands/compute-log-module.js +44 -0
  156. package/esm/modules/cli/commands/config-secrets-module.js +44 -0
  157. package/esm/modules/cli/commands/db-usage-module.js +66 -0
  158. package/esm/modules/cli/commands/entity-type-provision.js +0 -44
  159. package/esm/modules/cli/commands/events-module.js +66 -0
  160. package/esm/modules/cli/commands/function-invocation-module.d.ts +8 -0
  161. package/esm/modules/cli/commands/function-invocation-module.js +580 -0
  162. package/esm/modules/cli/commands/function-module.js +22 -198
  163. package/esm/modules/cli/commands/graph-module.js +22 -0
  164. package/esm/modules/cli/commands/hierarchy-module.js +22 -0
  165. package/esm/modules/cli/commands/identity-providers-module.js +44 -0
  166. package/esm/modules/cli/commands/inference-log-module.js +44 -0
  167. package/esm/modules/cli/commands/invites-module.js +44 -0
  168. package/esm/modules/cli/commands/limits-module.js +44 -0
  169. package/esm/modules/cli/commands/memberships-module.js +88 -0
  170. package/esm/modules/cli/commands/merkle-store-module.js +22 -0
  171. package/esm/modules/cli/commands/namespace-module.js +22 -0
  172. package/esm/modules/cli/commands/notifications-module.js +88 -0
  173. package/esm/modules/cli/commands/permissions-module.js +44 -0
  174. package/esm/modules/cli/commands/plans-module.js +44 -0
  175. package/esm/modules/cli/commands/profiles-module.js +44 -0
  176. package/esm/modules/cli/commands/rate-limit-meters-module.js +66 -0
  177. package/esm/modules/cli/commands/storage-log-module.js +44 -0
  178. package/esm/modules/cli/commands/storage-module.js +66 -0
  179. package/esm/modules/cli/commands/transfer-log-module.js +44 -0
  180. package/esm/modules/cli/commands.js +29 -27
  181. package/esm/modules/cli/executor.d.ts +14 -13
  182. package/esm/modules/orm/index.d.ts +28 -26
  183. package/esm/modules/orm/index.js +28 -26
  184. package/esm/modules/orm/input-types.d.ts +4485 -2514
  185. package/esm/modules/orm/models/functionInvocationModule.d.ts +54 -0
  186. package/esm/modules/orm/models/functionInvocationModule.js +100 -0
  187. package/esm/modules/orm/models/index.d.ts +14 -13
  188. package/esm/modules/orm/models/index.js +14 -13
  189. package/esm/objects/orm/input-types.d.ts +62 -0
  190. package/esm/usage/orm/input-types.d.ts +314 -19
  191. package/modules/cli/commands/agent-module.js +88 -0
  192. package/modules/cli/commands/billing-module.js +66 -0
  193. package/modules/cli/commands/compute-log-module.js +44 -0
  194. package/modules/cli/commands/config-secrets-module.js +44 -0
  195. package/modules/cli/commands/db-usage-module.js +66 -0
  196. package/modules/cli/commands/entity-type-provision.js +0 -44
  197. package/modules/cli/commands/events-module.js +66 -0
  198. package/modules/cli/commands/function-invocation-module.d.ts +8 -0
  199. package/modules/cli/commands/function-invocation-module.js +582 -0
  200. package/modules/cli/commands/function-module.js +22 -198
  201. package/modules/cli/commands/graph-module.js +22 -0
  202. package/modules/cli/commands/hierarchy-module.js +22 -0
  203. package/modules/cli/commands/identity-providers-module.js +44 -0
  204. package/modules/cli/commands/inference-log-module.js +44 -0
  205. package/modules/cli/commands/invites-module.js +44 -0
  206. package/modules/cli/commands/limits-module.js +44 -0
  207. package/modules/cli/commands/memberships-module.js +88 -0
  208. package/modules/cli/commands/merkle-store-module.js +22 -0
  209. package/modules/cli/commands/namespace-module.js +22 -0
  210. package/modules/cli/commands/notifications-module.js +88 -0
  211. package/modules/cli/commands/permissions-module.js +44 -0
  212. package/modules/cli/commands/plans-module.js +44 -0
  213. package/modules/cli/commands/profiles-module.js +44 -0
  214. package/modules/cli/commands/rate-limit-meters-module.js +66 -0
  215. package/modules/cli/commands/storage-log-module.js +44 -0
  216. package/modules/cli/commands/storage-module.js +66 -0
  217. package/modules/cli/commands/transfer-log-module.js +44 -0
  218. package/modules/cli/commands.js +29 -27
  219. package/modules/cli/executor.d.ts +14 -13
  220. package/modules/orm/index.d.ts +28 -26
  221. package/modules/orm/index.js +28 -26
  222. package/modules/orm/input-types.d.ts +4485 -2514
  223. package/modules/orm/models/functionInvocationModule.d.ts +54 -0
  224. package/modules/orm/models/functionInvocationModule.js +104 -0
  225. package/modules/orm/models/index.d.ts +14 -13
  226. package/modules/orm/models/index.js +30 -28
  227. package/objects/orm/input-types.d.ts +62 -0
  228. package/package.json +4 -4
  229. package/usage/orm/input-types.d.ts +314 -19
@@ -1866,6 +1866,320 @@ export interface IntervalFilter {
1866
1866
  /** Greater than or equal to the specified value. */
1867
1867
  greaterThanOrEqualTo?: IntervalInput;
1868
1868
  }
1869
+ /** An input for mutations affecting `AppLimitCapsDefault` */
1870
+ export interface AppLimitCapsDefaultInput {
1871
+ id?: string;
1872
+ /** Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) */
1873
+ name: string;
1874
+ /** Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. */
1875
+ max?: string;
1876
+ }
1877
+ /** An input for mutations affecting `OrgLimitCapsDefault` */
1878
+ export interface OrgLimitCapsDefaultInput {
1879
+ id?: string;
1880
+ /** Name identifier of the cap (e.g. max_file_upload_size, advanced_analytics) */
1881
+ name: string;
1882
+ /** Default cap value. For feature flags: 0=disabled, 1=enabled. For size caps: the limit in bytes/units. */
1883
+ max?: string;
1884
+ }
1885
+ /** An input for mutations affecting `AppLimitCap` */
1886
+ export interface AppLimitCapInput {
1887
+ id?: string;
1888
+ /** Name identifier of the cap being overridden */
1889
+ name: string;
1890
+ /** Entity this cap override applies to */
1891
+ entityId: string;
1892
+ /** Override cap value for this entity */
1893
+ max?: string;
1894
+ }
1895
+ /** An input for mutations affecting `OrgLimitCap` */
1896
+ export interface OrgLimitCapInput {
1897
+ id?: string;
1898
+ /** Name identifier of the cap being overridden */
1899
+ name: string;
1900
+ /** Entity this cap override applies to */
1901
+ entityId: string;
1902
+ /** Override cap value for this entity */
1903
+ max?: string;
1904
+ }
1905
+ /** An input for mutations affecting `AppLimitDefault` */
1906
+ export interface AppLimitDefaultInput {
1907
+ id?: string;
1908
+ /** Name identifier of the limit this default applies to */
1909
+ name: string;
1910
+ /** Default maximum usage allowed for this limit */
1911
+ max?: string;
1912
+ /** Default soft limit threshold for warnings; NULL means no soft limit */
1913
+ softMax?: string;
1914
+ }
1915
+ /** An input for mutations affecting `AppLimitCredit` */
1916
+ export interface AppLimitCreditInput {
1917
+ id?: string;
1918
+ /** FK to default_limits — which limit definition this credit applies to */
1919
+ defaultLimitId: string;
1920
+ /** User this credit is for; NULL for aggregate entity-level credits */
1921
+ actorId?: string;
1922
+ /** Number of credits to grant (positive to add, negative to revoke) */
1923
+ amount: string;
1924
+ /** Credit durability: permanent (survives window reset) or period (resets on window expiry) */
1925
+ creditType?: string;
1926
+ /** Optional reason for the credit grant (promo code, admin grant, etc.) */
1927
+ reason?: string;
1928
+ }
1929
+ /** An input for mutations affecting `AppLimitCreditCodeItem` */
1930
+ export interface AppLimitCreditCodeItemInput {
1931
+ id?: string;
1932
+ /** FK to credit_codes — which code this item belongs to */
1933
+ creditCodeId: string;
1934
+ /** FK to default_limits — which limit this item grants credits for */
1935
+ defaultLimitId: string;
1936
+ /** Number of credits this item grants per redemption */
1937
+ amount: string;
1938
+ /** Credit durability: permanent (survives window reset) or period (resets on window expiry) */
1939
+ creditType?: string;
1940
+ }
1941
+ /** An input for mutations affecting `AppLimitCreditRedemption` */
1942
+ export interface AppLimitCreditRedemptionInput {
1943
+ id?: string;
1944
+ /** FK to credit_codes — which code is being redeemed */
1945
+ creditCodeId: string;
1946
+ /** Entity receiving the credits (personal org user_id or org entity_id) */
1947
+ entityId: string;
1948
+ /** Resolved billable organization via get_organization_id */
1949
+ organizationId?: string;
1950
+ /** Membership prefix identifying the entity kind (org, team, app) */
1951
+ entityType?: string;
1952
+ }
1953
+ /** An input for mutations affecting `OrgLimitDefault` */
1954
+ export interface OrgLimitDefaultInput {
1955
+ id?: string;
1956
+ /** Name identifier of the limit this default applies to */
1957
+ name: string;
1958
+ /** Default maximum usage allowed for this limit */
1959
+ max?: string;
1960
+ /** Default soft limit threshold for warnings; NULL means no soft limit */
1961
+ softMax?: string;
1962
+ }
1963
+ /** An input for mutations affecting `OrgLimitCredit` */
1964
+ export interface OrgLimitCreditInput {
1965
+ id?: string;
1966
+ /** FK to default_limits — which limit definition this credit applies to */
1967
+ defaultLimitId: string;
1968
+ /** User this credit is for; NULL for aggregate entity-level credits */
1969
+ actorId?: string;
1970
+ /** Entity this credit applies to; NULL for actor-only credits */
1971
+ entityId?: string;
1972
+ /** Resolved billable organization via get_organization_id */
1973
+ organizationId?: string;
1974
+ /** Membership prefix identifying the entity kind (org, team, app) */
1975
+ entityType?: string;
1976
+ /** Number of credits to grant (positive to add, negative to revoke) */
1977
+ amount: string;
1978
+ /** Credit durability: permanent (survives window reset) or period (resets on window expiry) */
1979
+ creditType?: string;
1980
+ /** Optional reason for the credit grant (promo code, admin grant, etc.) */
1981
+ reason?: string;
1982
+ }
1983
+ /** An input for mutations affecting `AppLimitWarning` */
1984
+ export interface AppLimitWarningInput {
1985
+ id?: string;
1986
+ /** Limit name this warning applies to (must match a default_limits entry) */
1987
+ name: string;
1988
+ /** Threshold type: absolute (fixed count) or percentage (of max) */
1989
+ warningType: string;
1990
+ /** Threshold value — either an absolute count or a percentage (1-100) depending on warning_type */
1991
+ thresholdValue: string;
1992
+ /** Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) */
1993
+ taskIdentifier: string;
1994
+ }
1995
+ /** An input for mutations affecting `OrgLimitWarning` */
1996
+ export interface OrgLimitWarningInput {
1997
+ id?: string;
1998
+ /** Limit name this warning applies to (must match a default_limits entry) */
1999
+ name: string;
2000
+ /** Threshold type: absolute (fixed count) or percentage (of max) */
2001
+ warningType: string;
2002
+ /** Threshold value — either an absolute count or a percentage (1-100) depending on warning_type */
2003
+ thresholdValue: string;
2004
+ /** Job task name to enqueue when warning fires (e.g. email:limit_warning, notification:approaching_limit) */
2005
+ taskIdentifier: string;
2006
+ /** Per-entity override (NULL = scope default for all entities) */
2007
+ entityId?: string;
2008
+ }
2009
+ /** An input for mutations affecting `AppLimitCreditCode` */
2010
+ export interface AppLimitCreditCodeInput {
2011
+ id?: string;
2012
+ /** Human-readable credit code (case-insensitive, unique) */
2013
+ code: string;
2014
+ /** Maximum total redemptions allowed; NULL for unlimited */
2015
+ maxRedemptions?: number;
2016
+ /** Current number of redemptions (incremented by trigger on credit_redemptions) */
2017
+ currentRedemptions?: number;
2018
+ /** Expiration timestamp; NULL for no expiry */
2019
+ expiresAt?: string;
2020
+ }
2021
+ /** An input for mutations affecting `AppLimitEvent` */
2022
+ export interface AppLimitEventInput {
2023
+ createdAt?: string;
2024
+ /** Unique identifier for each limit event */
2025
+ id?: string;
2026
+ /** Limit name this event applies to */
2027
+ name?: string;
2028
+ /** User who triggered this event; NULL for system/aggregate events */
2029
+ actorId?: string;
2030
+ /** Entity this event applies to; NULL for app-level events */
2031
+ entityId?: string;
2032
+ /** Resolved billable organization via get_organization_id; NULL for app-level events */
2033
+ organizationId?: string;
2034
+ /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */
2035
+ entityType?: string;
2036
+ /** Event type: inc, dec, check, modify, transfer, apply_plan, reset */
2037
+ eventType?: string;
2038
+ /** Change amount: positive for increment, negative for decrement */
2039
+ delta?: string;
2040
+ /** Usage count before this event */
2041
+ numBefore?: string;
2042
+ /** Usage count after this event */
2043
+ numAfter?: string;
2044
+ /** Max limit ceiling at the time of this event */
2045
+ maxAtEvent?: string;
2046
+ /** Optional reason or source: achievement, invite, plan_change, purchase, etc. */
2047
+ reason?: string;
2048
+ }
2049
+ /** An input for mutations affecting `OrgLimitEvent` */
2050
+ export interface OrgLimitEventInput {
2051
+ createdAt?: string;
2052
+ /** Unique identifier for each limit event */
2053
+ id?: string;
2054
+ /** Limit name this event applies to */
2055
+ name?: string;
2056
+ /** User who triggered this event; NULL for system/aggregate events */
2057
+ actorId?: string;
2058
+ /** Entity this event applies to; NULL for app-level events */
2059
+ entityId?: string;
2060
+ /** Resolved billable organization via get_organization_id; NULL for app-level events */
2061
+ organizationId?: string;
2062
+ /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */
2063
+ entityType?: string;
2064
+ /** Event type: inc, dec, check, modify, transfer, apply_plan, reset */
2065
+ eventType?: string;
2066
+ /** Change amount: positive for increment, negative for decrement */
2067
+ delta?: string;
2068
+ /** Usage count before this event */
2069
+ numBefore?: string;
2070
+ /** Usage count after this event */
2071
+ numAfter?: string;
2072
+ /** Max limit ceiling at the time of this event */
2073
+ maxAtEvent?: string;
2074
+ /** Optional reason or source: achievement, invite, plan_change, purchase, etc. */
2075
+ reason?: string;
2076
+ }
2077
+ /** An input for mutations affecting `AppLimit` */
2078
+ export interface AppLimitInput {
2079
+ id?: string;
2080
+ /** Name identifier of the limit being tracked */
2081
+ name?: string;
2082
+ /** User whose usage is being tracked against this limit */
2083
+ actorId: string;
2084
+ /** Current usage count for this actor and limit */
2085
+ num?: string;
2086
+ /** Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. */
2087
+ max?: string;
2088
+ /** Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. */
2089
+ softMax?: string;
2090
+ /** Start of the current metering window; NULL means no time window */
2091
+ windowStart?: string;
2092
+ /** Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window */
2093
+ windowDuration?: IntervalInput;
2094
+ /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */
2095
+ planMax?: string;
2096
+ /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */
2097
+ purchasedCredits?: string;
2098
+ /** Temporary credits for the current billing window. Resets to 0 on window expiry. */
2099
+ periodCredits?: string;
2100
+ /** Resolved billable organization via get_organization_id */
2101
+ organizationId?: string;
2102
+ /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */
2103
+ entityType?: string;
2104
+ }
2105
+ /** An interval of time that has passed where the smallest distinct unit is a second. */
2106
+ export interface IntervalInput {
2107
+ /**
2108
+ * A quantity of seconds. This is the only non-integer field, as all the other
2109
+ * fields will dump their overflow into a smaller unit of time. Intervals don’t
2110
+ * have a smaller unit than seconds.
2111
+ */
2112
+ seconds?: number;
2113
+ /** A quantity of minutes. */
2114
+ minutes?: number;
2115
+ /** A quantity of hours. */
2116
+ hours?: number;
2117
+ /** A quantity of days. */
2118
+ days?: number;
2119
+ /** A quantity of months. */
2120
+ months?: number;
2121
+ /** A quantity of years. */
2122
+ years?: number;
2123
+ }
2124
+ /** An input for mutations affecting `OrgLimitAggregate` */
2125
+ export interface OrgLimitAggregateInput {
2126
+ id?: string;
2127
+ /** Name identifier of the aggregate limit being tracked */
2128
+ name?: string;
2129
+ /** Entity (org) whose aggregate usage is being tracked */
2130
+ entityId: string;
2131
+ /** Current aggregate usage count for this entity and limit */
2132
+ num?: string;
2133
+ /** Maximum allowed aggregate usage; negative means unlimited */
2134
+ max?: string;
2135
+ /** Soft limit threshold for warnings; NULL means no soft limit */
2136
+ softMax?: string;
2137
+ /** Start of the current metering window; NULL means no time window */
2138
+ windowStart?: string;
2139
+ /** Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window */
2140
+ windowDuration?: IntervalInput;
2141
+ /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */
2142
+ planMax?: string;
2143
+ /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */
2144
+ purchasedCredits?: string;
2145
+ /** Temporary credits for the current billing window. Resets to 0 on window expiry. */
2146
+ periodCredits?: string;
2147
+ /** Capacity reserved by child entities in budgeted allocation mode. Available = max - num - reserved. */
2148
+ reserved?: string;
2149
+ /** Resolved billable organization via get_organization_id */
2150
+ organizationId?: string;
2151
+ /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */
2152
+ entityType?: string;
2153
+ }
2154
+ /** An input for mutations affecting `OrgLimit` */
2155
+ export interface OrgLimitInput {
2156
+ id?: string;
2157
+ /** Name identifier of the limit being tracked */
2158
+ name?: string;
2159
+ /** User whose usage is being tracked against this limit */
2160
+ actorId: string;
2161
+ /** Current usage count for this actor and limit */
2162
+ num?: string;
2163
+ /** Maximum allowed usage; negative means unlimited. Modified by plans, credits, and achievements. */
2164
+ max?: string;
2165
+ /** Soft limit threshold for warnings; NULL means no soft limit. When num >= soft_max, consumers should warn but still allow until max is reached. */
2166
+ softMax?: string;
2167
+ /** Start of the current metering window; NULL means no time window */
2168
+ windowStart?: string;
2169
+ /** Duration of the metering window (e.g. 1 day, 1 month); NULL means no time window */
2170
+ windowDuration?: IntervalInput;
2171
+ /** Ceiling set by the active plan via apply_plan(). Window reset does not change this value. */
2172
+ planMax?: string;
2173
+ /** Permanent credits from purchases, admin grants, or lifetime rewards. Survives window reset. */
2174
+ purchasedCredits?: string;
2175
+ /** Temporary credits for the current billing window. Resets to 0 on window expiry. */
2176
+ periodCredits?: string;
2177
+ entityId: string;
2178
+ /** Resolved billable organization via get_organization_id */
2179
+ organizationId?: string;
2180
+ /** Entity type prefix (org, team, app, etc.) for interpreting entity_id */
2181
+ entityType?: string;
2182
+ }
1869
2183
  /** A filter to be used against `AppLimitCredit` object types. All fields are combined with a logical ‘and.’ */
1870
2184
  export interface AppLimitCreditFilter {
1871
2185
  /** Filter by the object’s `id` field. */
@@ -1962,25 +2276,6 @@ export interface AppLimitCreditRedemptionFilter {
1962
2276
  /** Filter by the object’s `creditCode` relation. */
1963
2277
  creditCode?: AppLimitCreditCodeFilter;
1964
2278
  }
1965
- /** An interval of time that has passed where the smallest distinct unit is a second. */
1966
- export interface IntervalInput {
1967
- /**
1968
- * A quantity of seconds. This is the only non-integer field, as all the other
1969
- * fields will dump their overflow into a smaller unit of time. Intervals don’t
1970
- * have a smaller unit than seconds.
1971
- */
1972
- seconds?: number;
1973
- /** A quantity of minutes. */
1974
- minutes?: number;
1975
- /** A quantity of hours. */
1976
- hours?: number;
1977
- /** A quantity of days. */
1978
- days?: number;
1979
- /** A quantity of months. */
1980
- months?: number;
1981
- /** A quantity of years. */
1982
- years?: number;
1983
- }
1984
2279
  /** A filter to be used against UUID fields. All fields are combined with a logical ‘and.’ */
1985
2280
  export interface UUIDFilter {
1986
2281
  /** Is null (if `true` is specified) or is not null (if `false` is specified). */
@@ -13,6 +13,8 @@ const fieldSchema = {
13
13
  databaseId: 'uuid',
14
14
  schemaId: 'uuid',
15
15
  privateSchemaId: 'uuid',
16
+ publicSchemaName: 'string',
17
+ privateSchemaName: 'string',
16
18
  threadTableId: 'uuid',
17
19
  messageTableId: 'uuid',
18
20
  taskTableId: 'uuid',
@@ -32,6 +34,7 @@ const fieldSchema = {
32
34
  hasPlans: 'boolean',
33
35
  hasResources: 'boolean',
34
36
  hasAgents: 'boolean',
37
+ shared: 'boolean',
35
38
  apiName: 'string',
36
39
  privateApiName: 'string',
37
40
  scope: 'string',
@@ -40,6 +43,7 @@ const fieldSchema = {
40
43
  policies: 'json',
41
44
  resources: 'json',
42
45
  provisions: 'json',
46
+ defaultPermissions: 'string',
43
47
  };
44
48
  const usage = '\nagent-module <command>\n\nCommands:\n list List agentModule records\n find-first Find first matching agentModule record\n get Get a agentModule by ID\n create Create a new agentModule\n update Update an existing agentModule\n delete Delete a agentModule\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';
45
49
  exports.default = async (argv, prompter, _options) => {
@@ -87,6 +91,8 @@ async function handleList(argv, _prompter) {
87
91
  databaseId: true,
88
92
  schemaId: true,
89
93
  privateSchemaId: true,
94
+ publicSchemaName: true,
95
+ privateSchemaName: true,
90
96
  threadTableId: true,
91
97
  messageTableId: true,
92
98
  taskTableId: true,
@@ -106,6 +112,7 @@ async function handleList(argv, _prompter) {
106
112
  hasPlans: true,
107
113
  hasResources: true,
108
114
  hasAgents: true,
115
+ shared: true,
109
116
  apiName: true,
110
117
  privateApiName: true,
111
118
  scope: true,
@@ -114,6 +121,7 @@ async function handleList(argv, _prompter) {
114
121
  policies: true,
115
122
  resources: true,
116
123
  provisions: true,
124
+ defaultPermissions: true,
117
125
  };
118
126
  const findManyArgs = (0, utils_1.parseFindManyArgs)(argv, defaultSelect);
119
127
  const client = (0, executor_1.getClient)();
@@ -135,6 +143,8 @@ async function handleFindFirst(argv, _prompter) {
135
143
  databaseId: true,
136
144
  schemaId: true,
137
145
  privateSchemaId: true,
146
+ publicSchemaName: true,
147
+ privateSchemaName: true,
138
148
  threadTableId: true,
139
149
  messageTableId: true,
140
150
  taskTableId: true,
@@ -154,6 +164,7 @@ async function handleFindFirst(argv, _prompter) {
154
164
  hasPlans: true,
155
165
  hasResources: true,
156
166
  hasAgents: true,
167
+ shared: true,
157
168
  apiName: true,
158
169
  privateApiName: true,
159
170
  scope: true,
@@ -162,6 +173,7 @@ async function handleFindFirst(argv, _prompter) {
162
173
  policies: true,
163
174
  resources: true,
164
175
  provisions: true,
176
+ defaultPermissions: true,
165
177
  };
166
178
  const findFirstArgs = (0, utils_1.parseFindFirstArgs)(argv, defaultSelect);
167
179
  const client = (0, executor_1.getClient)();
@@ -195,6 +207,8 @@ async function handleGet(argv, prompter) {
195
207
  databaseId: true,
196
208
  schemaId: true,
197
209
  privateSchemaId: true,
210
+ publicSchemaName: true,
211
+ privateSchemaName: true,
198
212
  threadTableId: true,
199
213
  messageTableId: true,
200
214
  taskTableId: true,
@@ -214,6 +228,7 @@ async function handleGet(argv, prompter) {
214
228
  hasPlans: true,
215
229
  hasResources: true,
216
230
  hasAgents: true,
231
+ shared: true,
217
232
  apiName: true,
218
233
  privateApiName: true,
219
234
  scope: true,
@@ -222,6 +237,7 @@ async function handleGet(argv, prompter) {
222
237
  policies: true,
223
238
  resources: true,
224
239
  provisions: true,
240
+ defaultPermissions: true,
225
241
  },
226
242
  })
227
243
  .execute();
@@ -258,6 +274,20 @@ async function handleCreate(argv, prompter) {
258
274
  required: false,
259
275
  skipPrompt: true,
260
276
  },
277
+ {
278
+ type: 'text',
279
+ name: 'publicSchemaName',
280
+ message: 'publicSchemaName',
281
+ required: false,
282
+ skipPrompt: true,
283
+ },
284
+ {
285
+ type: 'text',
286
+ name: 'privateSchemaName',
287
+ message: 'privateSchemaName',
288
+ required: false,
289
+ skipPrompt: true,
290
+ },
261
291
  {
262
292
  type: 'text',
263
293
  name: 'threadTableId',
@@ -391,6 +421,13 @@ async function handleCreate(argv, prompter) {
391
421
  required: false,
392
422
  skipPrompt: true,
393
423
  },
424
+ {
425
+ type: 'boolean',
426
+ name: 'shared',
427
+ message: 'shared',
428
+ required: false,
429
+ skipPrompt: true,
430
+ },
394
431
  {
395
432
  type: 'text',
396
433
  name: 'apiName',
@@ -447,6 +484,13 @@ async function handleCreate(argv, prompter) {
447
484
  required: false,
448
485
  skipPrompt: true,
449
486
  },
487
+ {
488
+ type: 'text',
489
+ name: 'defaultPermissions',
490
+ message: 'defaultPermissions',
491
+ required: false,
492
+ skipPrompt: true,
493
+ },
450
494
  ]);
451
495
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
452
496
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
@@ -457,6 +501,8 @@ async function handleCreate(argv, prompter) {
457
501
  databaseId: cleanedData.databaseId,
458
502
  schemaId: cleanedData.schemaId,
459
503
  privateSchemaId: cleanedData.privateSchemaId,
504
+ publicSchemaName: cleanedData.publicSchemaName,
505
+ privateSchemaName: cleanedData.privateSchemaName,
460
506
  threadTableId: cleanedData.threadTableId,
461
507
  messageTableId: cleanedData.messageTableId,
462
508
  taskTableId: cleanedData.taskTableId,
@@ -476,6 +522,7 @@ async function handleCreate(argv, prompter) {
476
522
  hasPlans: cleanedData.hasPlans,
477
523
  hasResources: cleanedData.hasResources,
478
524
  hasAgents: cleanedData.hasAgents,
525
+ shared: cleanedData.shared,
479
526
  apiName: cleanedData.apiName,
480
527
  privateApiName: cleanedData.privateApiName,
481
528
  scope: cleanedData.scope,
@@ -484,12 +531,15 @@ async function handleCreate(argv, prompter) {
484
531
  policies: cleanedData.policies,
485
532
  resources: cleanedData.resources,
486
533
  provisions: cleanedData.provisions,
534
+ defaultPermissions: cleanedData.defaultPermissions,
487
535
  },
488
536
  select: {
489
537
  id: true,
490
538
  databaseId: true,
491
539
  schemaId: true,
492
540
  privateSchemaId: true,
541
+ publicSchemaName: true,
542
+ privateSchemaName: true,
493
543
  threadTableId: true,
494
544
  messageTableId: true,
495
545
  taskTableId: true,
@@ -509,6 +559,7 @@ async function handleCreate(argv, prompter) {
509
559
  hasPlans: true,
510
560
  hasResources: true,
511
561
  hasAgents: true,
562
+ shared: true,
512
563
  apiName: true,
513
564
  privateApiName: true,
514
565
  scope: true,
@@ -517,6 +568,7 @@ async function handleCreate(argv, prompter) {
517
568
  policies: true,
518
569
  resources: true,
519
570
  provisions: true,
571
+ defaultPermissions: true,
520
572
  },
521
573
  })
522
574
  .execute();
@@ -559,6 +611,20 @@ async function handleUpdate(argv, prompter) {
559
611
  required: false,
560
612
  skipPrompt: true,
561
613
  },
614
+ {
615
+ type: 'text',
616
+ name: 'publicSchemaName',
617
+ message: 'publicSchemaName',
618
+ required: false,
619
+ skipPrompt: true,
620
+ },
621
+ {
622
+ type: 'text',
623
+ name: 'privateSchemaName',
624
+ message: 'privateSchemaName',
625
+ required: false,
626
+ skipPrompt: true,
627
+ },
562
628
  {
563
629
  type: 'text',
564
630
  name: 'threadTableId',
@@ -692,6 +758,13 @@ async function handleUpdate(argv, prompter) {
692
758
  required: false,
693
759
  skipPrompt: true,
694
760
  },
761
+ {
762
+ type: 'boolean',
763
+ name: 'shared',
764
+ message: 'shared',
765
+ required: false,
766
+ skipPrompt: true,
767
+ },
695
768
  {
696
769
  type: 'text',
697
770
  name: 'apiName',
@@ -748,6 +821,13 @@ async function handleUpdate(argv, prompter) {
748
821
  required: false,
749
822
  skipPrompt: true,
750
823
  },
824
+ {
825
+ type: 'text',
826
+ name: 'defaultPermissions',
827
+ message: 'defaultPermissions',
828
+ required: false,
829
+ skipPrompt: true,
830
+ },
751
831
  ]);
752
832
  const answers = (0, utils_1.coerceAnswers)(rawAnswers, fieldSchema);
753
833
  const cleanedData = (0, utils_1.stripUndefined)(answers, fieldSchema);
@@ -761,6 +841,8 @@ async function handleUpdate(argv, prompter) {
761
841
  databaseId: cleanedData.databaseId,
762
842
  schemaId: cleanedData.schemaId,
763
843
  privateSchemaId: cleanedData.privateSchemaId,
844
+ publicSchemaName: cleanedData.publicSchemaName,
845
+ privateSchemaName: cleanedData.privateSchemaName,
764
846
  threadTableId: cleanedData.threadTableId,
765
847
  messageTableId: cleanedData.messageTableId,
766
848
  taskTableId: cleanedData.taskTableId,
@@ -780,6 +862,7 @@ async function handleUpdate(argv, prompter) {
780
862
  hasPlans: cleanedData.hasPlans,
781
863
  hasResources: cleanedData.hasResources,
782
864
  hasAgents: cleanedData.hasAgents,
865
+ shared: cleanedData.shared,
783
866
  apiName: cleanedData.apiName,
784
867
  privateApiName: cleanedData.privateApiName,
785
868
  scope: cleanedData.scope,
@@ -788,12 +871,15 @@ async function handleUpdate(argv, prompter) {
788
871
  policies: cleanedData.policies,
789
872
  resources: cleanedData.resources,
790
873
  provisions: cleanedData.provisions,
874
+ defaultPermissions: cleanedData.defaultPermissions,
791
875
  },
792
876
  select: {
793
877
  id: true,
794
878
  databaseId: true,
795
879
  schemaId: true,
796
880
  privateSchemaId: true,
881
+ publicSchemaName: true,
882
+ privateSchemaName: true,
797
883
  threadTableId: true,
798
884
  messageTableId: true,
799
885
  taskTableId: true,
@@ -813,6 +899,7 @@ async function handleUpdate(argv, prompter) {
813
899
  hasPlans: true,
814
900
  hasResources: true,
815
901
  hasAgents: true,
902
+ shared: true,
816
903
  apiName: true,
817
904
  privateApiName: true,
818
905
  scope: true,
@@ -821,6 +908,7 @@ async function handleUpdate(argv, prompter) {
821
908
  policies: true,
822
909
  resources: true,
823
910
  provisions: true,
911
+ defaultPermissions: true,
824
912
  },
825
913
  })
826
914
  .execute();