@knowledge-stack/ksapi 1.72.4 → 1.77.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/.openapi-generator/FILES +36 -4
  2. package/README.md +33 -11
  3. package/dist/apis/AgentApi.d.ts +114 -0
  4. package/dist/apis/AgentApi.js +156 -0
  5. package/dist/apis/ChunksApi.d.ts +19 -16
  6. package/dist/apis/ChunksApi.js +9 -6
  7. package/dist/apis/DocumentsApi.d.ts +4 -4
  8. package/dist/apis/DocumentsApi.js +2 -2
  9. package/dist/apis/FoldersApi.d.ts +4 -4
  10. package/dist/apis/FoldersApi.js +2 -2
  11. package/dist/apis/InvitesApi.d.ts +54 -7
  12. package/dist/apis/InvitesApi.js +51 -2
  13. package/dist/apis/PublicApi.d.ts +59 -0
  14. package/dist/apis/PublicApi.js +103 -0
  15. package/dist/apis/SubscriptionsApi.d.ts +120 -0
  16. package/dist/apis/SubscriptionsApi.js +162 -0
  17. package/dist/apis/TenantsApi.d.ts +45 -1
  18. package/dist/apis/TenantsApi.js +44 -0
  19. package/dist/apis/ThreadsApi.d.ts +4 -4
  20. package/dist/apis/ThreadsApi.js +2 -2
  21. package/dist/apis/index.d.ts +3 -0
  22. package/dist/apis/index.js +3 -0
  23. package/dist/esm/apis/AgentApi.d.ts +114 -0
  24. package/dist/esm/apis/AgentApi.js +119 -0
  25. package/dist/esm/apis/ChunksApi.d.ts +19 -16
  26. package/dist/esm/apis/ChunksApi.js +9 -6
  27. package/dist/esm/apis/DocumentsApi.d.ts +4 -4
  28. package/dist/esm/apis/DocumentsApi.js +2 -2
  29. package/dist/esm/apis/FoldersApi.d.ts +4 -4
  30. package/dist/esm/apis/FoldersApi.js +2 -2
  31. package/dist/esm/apis/InvitesApi.d.ts +54 -7
  32. package/dist/esm/apis/InvitesApi.js +52 -3
  33. package/dist/esm/apis/PublicApi.d.ts +59 -0
  34. package/dist/esm/apis/PublicApi.js +66 -0
  35. package/dist/esm/apis/SubscriptionsApi.d.ts +120 -0
  36. package/dist/esm/apis/SubscriptionsApi.js +125 -0
  37. package/dist/esm/apis/TenantsApi.d.ts +45 -1
  38. package/dist/esm/apis/TenantsApi.js +45 -1
  39. package/dist/esm/apis/ThreadsApi.d.ts +4 -4
  40. package/dist/esm/apis/ThreadsApi.js +2 -2
  41. package/dist/esm/apis/index.d.ts +3 -0
  42. package/dist/esm/apis/index.js +3 -0
  43. package/dist/esm/models/AcceptInviteResponse.d.ts +6 -0
  44. package/dist/esm/models/AcceptInviteResponse.js +2 -0
  45. package/dist/esm/models/AskRequest.d.ts +47 -0
  46. package/dist/esm/models/AskRequest.js +44 -0
  47. package/dist/esm/models/AskResponse.d.ts +47 -0
  48. package/dist/esm/models/AskResponse.js +44 -0
  49. package/dist/esm/models/ChangeSubscriptionRequest.d.ts +53 -0
  50. package/dist/esm/models/ChangeSubscriptionRequest.js +53 -0
  51. package/dist/esm/models/CheckpointDetails.d.ts +96 -0
  52. package/dist/esm/models/CheckpointDetails.js +91 -0
  53. package/dist/esm/models/ChunkBulkResponse.d.ts +3 -3
  54. package/dist/esm/models/ChunkBulkResponse.js +3 -3
  55. package/dist/esm/models/ChunkContentItem.d.ts +3 -3
  56. package/dist/esm/models/ChunkContentItem.js +3 -3
  57. package/dist/esm/models/{ChunkMetadataInput.d.ts → ChunkMetadata.d.ts} +23 -23
  58. package/dist/esm/models/{ChunkMetadataInput.js → ChunkMetadata.js} +9 -9
  59. package/dist/esm/models/ChunkNeighborsResponse.d.ts +18 -0
  60. package/dist/esm/models/ChunkNeighborsResponse.js +10 -0
  61. package/dist/esm/models/ChunkResponse.d.ts +3 -3
  62. package/dist/esm/models/ChunkResponse.js +3 -3
  63. package/dist/esm/models/CreateChunkRequest.d.ts +3 -3
  64. package/dist/esm/models/CreateChunkRequest.js +3 -3
  65. package/dist/esm/models/DocumentResponse.d.ts +6 -0
  66. package/dist/esm/models/DocumentResponse.js +4 -0
  67. package/dist/esm/models/DocumentVersionMetadata.d.ts +24 -0
  68. package/dist/esm/models/DocumentVersionMetadata.js +8 -0
  69. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +24 -0
  70. package/dist/esm/models/DocumentVersionMetadataUpdate.js +8 -0
  71. package/dist/esm/models/ExtractRequest.d.ts +61 -0
  72. package/dist/esm/models/ExtractRequest.js +48 -0
  73. package/dist/esm/models/ExtractResponse.d.ts +49 -0
  74. package/dist/esm/models/ExtractResponse.js +44 -0
  75. package/dist/esm/models/FolderResponse.d.ts +6 -0
  76. package/dist/esm/models/FolderResponse.js +4 -0
  77. package/dist/esm/models/InviteLinkSettingsRequest.d.ts +70 -0
  78. package/dist/esm/models/InviteLinkSettingsRequest.js +58 -0
  79. package/dist/esm/models/InviteLinkSettingsResponse.d.ts +67 -0
  80. package/dist/esm/models/InviteLinkSettingsResponse.js +57 -0
  81. package/dist/esm/models/InviteResponse.d.ts +6 -0
  82. package/dist/esm/models/InviteResponse.js +2 -0
  83. package/dist/esm/models/InviteUserRequest.d.ts +6 -0
  84. package/dist/esm/models/InviteUserRequest.js +8 -1
  85. package/dist/esm/models/LineageNodeResponse.d.ts +3 -3
  86. package/dist/esm/models/LineageNodeResponse.js +3 -3
  87. package/dist/esm/models/MeteredQuotaStatus.d.ts +72 -0
  88. package/dist/esm/models/MeteredQuotaStatus.js +61 -0
  89. package/dist/esm/models/PathPartAncestorItem.d.ts +6 -0
  90. package/dist/esm/models/PathPartAncestorItem.js +4 -0
  91. package/dist/esm/models/PathPartResponse.d.ts +6 -0
  92. package/dist/esm/models/PathPartResponse.js +4 -0
  93. package/dist/esm/models/PipelineStatus.d.ts +1 -0
  94. package/dist/esm/models/PipelineStatus.js +2 -1
  95. package/dist/esm/models/ScoredChunkResponse.d.ts +3 -3
  96. package/dist/esm/models/ScoredChunkResponse.js +3 -3
  97. package/dist/esm/models/SeatQuotaStatus.d.ts +55 -0
  98. package/dist/esm/models/SeatQuotaStatus.js +48 -0
  99. package/dist/esm/models/SubscriptionPlanResponse.d.ts +101 -0
  100. package/dist/esm/models/SubscriptionPlanResponse.js +76 -0
  101. package/dist/esm/models/TenantQuotaStateResponse.d.ts +55 -0
  102. package/dist/esm/models/TenantQuotaStateResponse.js +50 -0
  103. package/dist/esm/models/TenantResponse.d.ts +12 -0
  104. package/dist/esm/models/TenantResponse.js +14 -1
  105. package/dist/esm/models/TenantSettingsResponse.d.ts +7 -0
  106. package/dist/esm/models/TenantSettingsResponse.js +5 -0
  107. package/dist/esm/models/TenantSettingsUpdate.d.ts +7 -0
  108. package/dist/esm/models/TenantSettingsUpdate.js +3 -0
  109. package/dist/esm/models/ThreadMessageDetailsInput.d.ts +7 -0
  110. package/dist/esm/models/ThreadMessageDetailsInput.js +3 -0
  111. package/dist/esm/models/ThreadMessageDetailsOutput.d.ts +7 -0
  112. package/dist/esm/models/ThreadMessageDetailsOutput.js +3 -0
  113. package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +3 -3
  114. package/dist/esm/models/UpdateChunkMetadataRequest.js +3 -3
  115. package/dist/esm/models/UpdateDocumentRequest.d.ts +7 -1
  116. package/dist/esm/models/UpdateDocumentRequest.js +2 -0
  117. package/dist/esm/models/UpdateFolderRequest.d.ts +7 -1
  118. package/dist/esm/models/UpdateFolderRequest.js +2 -0
  119. package/dist/esm/models/UpdateInviteRequest.d.ts +53 -0
  120. package/dist/esm/models/UpdateInviteRequest.js +49 -0
  121. package/dist/esm/models/UsageMetric.d.ts +26 -0
  122. package/dist/esm/models/UsageMetric.js +44 -0
  123. package/dist/esm/models/index.d.ts +15 -2
  124. package/dist/esm/models/index.js +15 -2
  125. package/dist/models/AcceptInviteResponse.d.ts +6 -0
  126. package/dist/models/AcceptInviteResponse.js +2 -0
  127. package/dist/models/AskRequest.d.ts +47 -0
  128. package/dist/models/AskRequest.js +52 -0
  129. package/dist/models/AskResponse.d.ts +47 -0
  130. package/dist/models/AskResponse.js +52 -0
  131. package/dist/models/ChangeSubscriptionRequest.d.ts +53 -0
  132. package/dist/models/ChangeSubscriptionRequest.js +61 -0
  133. package/dist/models/CheckpointDetails.d.ts +96 -0
  134. package/dist/models/CheckpointDetails.js +99 -0
  135. package/dist/models/ChunkBulkResponse.d.ts +3 -3
  136. package/dist/models/ChunkBulkResponse.js +3 -3
  137. package/dist/models/ChunkContentItem.d.ts +3 -3
  138. package/dist/models/ChunkContentItem.js +3 -3
  139. package/dist/models/{ChunkMetadataInput.d.ts → ChunkMetadata.d.ts} +23 -23
  140. package/dist/models/{ChunkMetadataInput.js → ChunkMetadata.js} +15 -15
  141. package/dist/models/ChunkNeighborsResponse.d.ts +18 -0
  142. package/dist/models/ChunkNeighborsResponse.js +10 -0
  143. package/dist/models/ChunkResponse.d.ts +3 -3
  144. package/dist/models/ChunkResponse.js +3 -3
  145. package/dist/models/CreateChunkRequest.d.ts +3 -3
  146. package/dist/models/CreateChunkRequest.js +3 -3
  147. package/dist/models/DocumentResponse.d.ts +6 -0
  148. package/dist/models/DocumentResponse.js +4 -0
  149. package/dist/models/DocumentVersionMetadata.d.ts +24 -0
  150. package/dist/models/DocumentVersionMetadata.js +8 -0
  151. package/dist/models/DocumentVersionMetadataUpdate.d.ts +24 -0
  152. package/dist/models/DocumentVersionMetadataUpdate.js +8 -0
  153. package/dist/models/ExtractRequest.d.ts +61 -0
  154. package/dist/models/ExtractRequest.js +56 -0
  155. package/dist/models/ExtractResponse.d.ts +49 -0
  156. package/dist/models/ExtractResponse.js +52 -0
  157. package/dist/models/FolderResponse.d.ts +6 -0
  158. package/dist/models/FolderResponse.js +4 -0
  159. package/dist/models/InviteLinkSettingsRequest.d.ts +70 -0
  160. package/dist/models/InviteLinkSettingsRequest.js +66 -0
  161. package/dist/models/InviteLinkSettingsResponse.d.ts +67 -0
  162. package/dist/models/InviteLinkSettingsResponse.js +65 -0
  163. package/dist/models/InviteResponse.d.ts +6 -0
  164. package/dist/models/InviteResponse.js +2 -0
  165. package/dist/models/InviteUserRequest.d.ts +6 -0
  166. package/dist/models/InviteUserRequest.js +8 -1
  167. package/dist/models/LineageNodeResponse.d.ts +3 -3
  168. package/dist/models/LineageNodeResponse.js +3 -3
  169. package/dist/models/MeteredQuotaStatus.d.ts +72 -0
  170. package/dist/models/MeteredQuotaStatus.js +69 -0
  171. package/dist/models/PathPartAncestorItem.d.ts +6 -0
  172. package/dist/models/PathPartAncestorItem.js +4 -0
  173. package/dist/models/PathPartResponse.d.ts +6 -0
  174. package/dist/models/PathPartResponse.js +4 -0
  175. package/dist/models/PipelineStatus.d.ts +1 -0
  176. package/dist/models/PipelineStatus.js +2 -1
  177. package/dist/models/ScoredChunkResponse.d.ts +3 -3
  178. package/dist/models/ScoredChunkResponse.js +3 -3
  179. package/dist/models/SeatQuotaStatus.d.ts +55 -0
  180. package/dist/models/SeatQuotaStatus.js +56 -0
  181. package/dist/models/SubscriptionPlanResponse.d.ts +101 -0
  182. package/dist/models/SubscriptionPlanResponse.js +84 -0
  183. package/dist/models/TenantQuotaStateResponse.d.ts +55 -0
  184. package/dist/models/TenantQuotaStateResponse.js +58 -0
  185. package/dist/models/TenantResponse.d.ts +12 -0
  186. package/dist/models/TenantResponse.js +14 -1
  187. package/dist/models/TenantSettingsResponse.d.ts +7 -0
  188. package/dist/models/TenantSettingsResponse.js +5 -0
  189. package/dist/models/TenantSettingsUpdate.d.ts +7 -0
  190. package/dist/models/TenantSettingsUpdate.js +3 -0
  191. package/dist/models/ThreadMessageDetailsInput.d.ts +7 -0
  192. package/dist/models/ThreadMessageDetailsInput.js +3 -0
  193. package/dist/models/ThreadMessageDetailsOutput.d.ts +7 -0
  194. package/dist/models/ThreadMessageDetailsOutput.js +3 -0
  195. package/dist/models/UpdateChunkMetadataRequest.d.ts +3 -3
  196. package/dist/models/UpdateChunkMetadataRequest.js +3 -3
  197. package/dist/models/UpdateDocumentRequest.d.ts +7 -1
  198. package/dist/models/UpdateDocumentRequest.js +2 -0
  199. package/dist/models/UpdateFolderRequest.d.ts +7 -1
  200. package/dist/models/UpdateFolderRequest.js +2 -0
  201. package/dist/models/UpdateInviteRequest.d.ts +53 -0
  202. package/dist/models/UpdateInviteRequest.js +57 -0
  203. package/dist/models/UsageMetric.d.ts +26 -0
  204. package/dist/models/UsageMetric.js +52 -0
  205. package/dist/models/index.d.ts +15 -2
  206. package/dist/models/index.js +15 -2
  207. package/docs/AcceptInviteResponse.md +2 -0
  208. package/docs/AgentApi.md +158 -0
  209. package/docs/AskRequest.md +35 -0
  210. package/docs/AskResponse.md +35 -0
  211. package/docs/ChangeSubscriptionRequest.md +37 -0
  212. package/docs/CheckpointDetails.md +49 -0
  213. package/docs/ChunkBulkResponse.md +1 -1
  214. package/docs/ChunkContentItem.md +1 -1
  215. package/docs/{ChunkMetadataInput.md → ChunkMetadata.md} +4 -4
  216. package/docs/ChunkNeighborsResponse.md +6 -0
  217. package/docs/ChunkResponse.md +1 -1
  218. package/docs/ChunksApi.md +13 -10
  219. package/docs/CreateChunkRequest.md +1 -1
  220. package/docs/DocumentResponse.md +2 -0
  221. package/docs/DocumentVersionMetadata.md +8 -0
  222. package/docs/DocumentVersionMetadataUpdate.md +8 -0
  223. package/docs/DocumentsApi.md +1 -1
  224. package/docs/ExtractRequest.md +39 -0
  225. package/docs/ExtractResponse.md +35 -0
  226. package/docs/FolderResponse.md +2 -0
  227. package/docs/FolderResponseOrDocumentResponse.md +2 -0
  228. package/docs/FoldersApi.md +1 -1
  229. package/docs/InviteLinkSettingsRequest.md +39 -0
  230. package/docs/InviteLinkSettingsResponse.md +39 -0
  231. package/docs/InviteResponse.md +2 -0
  232. package/docs/InviteUserRequest.md +2 -0
  233. package/docs/InvitesApi.md +81 -3
  234. package/docs/LineageNodeResponse.md +1 -1
  235. package/docs/MeteredQuotaStatus.md +43 -0
  236. package/docs/PathPartAncestorItem.md +2 -0
  237. package/docs/PathPartResponse.md +2 -0
  238. package/docs/PublicApi.md +68 -0
  239. package/docs/ScoredChunkResponse.md +1 -1
  240. package/docs/SeatQuotaStatus.md +37 -0
  241. package/docs/SectionContentItemOrChunkContentItem.md +1 -1
  242. package/docs/SubscriptionPlanResponse.md +51 -0
  243. package/docs/SubscriptionsApi.md +164 -0
  244. package/docs/TenantQuotaStateResponse.md +37 -0
  245. package/docs/TenantResponse.md +4 -0
  246. package/docs/TenantSettingsResponse.md +2 -0
  247. package/docs/TenantSettingsUpdate.md +2 -0
  248. package/docs/TenantsApi.md +75 -0
  249. package/docs/ThreadMessageDetailsInput.md +2 -0
  250. package/docs/ThreadMessageDetailsOutput.md +2 -0
  251. package/docs/ThreadsApi.md +1 -1
  252. package/docs/UpdateChunkMetadataRequest.md +1 -1
  253. package/docs/UpdateDocumentRequest.md +3 -1
  254. package/docs/UpdateFolderRequest.md +3 -1
  255. package/docs/UpdateInviteRequest.md +37 -0
  256. package/docs/UsageMetric.md +32 -0
  257. package/package.json +1 -1
  258. package/src/apis/AgentApi.ts +225 -0
  259. package/src/apis/ChunksApi.ts +27 -17
  260. package/src/apis/DocumentsApi.ts +4 -4
  261. package/src/apis/FoldersApi.ts +4 -4
  262. package/src/apis/InvitesApi.ts +107 -6
  263. package/src/apis/PublicApi.ts +100 -0
  264. package/src/apis/SubscriptionsApi.ts +238 -0
  265. package/src/apis/TenantsApi.ts +88 -0
  266. package/src/apis/ThreadsApi.ts +4 -4
  267. package/src/apis/index.ts +3 -0
  268. package/src/models/AcceptInviteResponse.ts +8 -0
  269. package/src/models/AskRequest.ts +83 -0
  270. package/src/models/AskResponse.ts +83 -0
  271. package/src/models/ChangeSubscriptionRequest.ts +96 -0
  272. package/src/models/CheckpointDetails.ts +169 -0
  273. package/src/models/ChunkBulkResponse.ts +11 -11
  274. package/src/models/ChunkContentItem.ts +10 -10
  275. package/src/models/{ChunkMetadataInput.ts → ChunkMetadata.ts} +25 -25
  276. package/src/models/ChunkNeighborsResponse.ts +26 -0
  277. package/src/models/ChunkResponse.ts +11 -11
  278. package/src/models/CreateChunkRequest.ts +10 -10
  279. package/src/models/DocumentResponse.ts +9 -0
  280. package/src/models/DocumentVersionMetadata.ts +32 -0
  281. package/src/models/DocumentVersionMetadataUpdate.ts +32 -0
  282. package/src/models/ExtractRequest.ts +99 -0
  283. package/src/models/ExtractResponse.ts +83 -0
  284. package/src/models/FolderResponse.ts +9 -0
  285. package/src/models/InviteLinkSettingsRequest.ts +116 -0
  286. package/src/models/InviteLinkSettingsResponse.ts +111 -0
  287. package/src/models/InviteResponse.ts +8 -0
  288. package/src/models/InviteUserRequest.ts +12 -0
  289. package/src/models/LineageNodeResponse.ts +10 -10
  290. package/src/models/MeteredQuotaStatus.ts +129 -0
  291. package/src/models/PathPartAncestorItem.ts +9 -0
  292. package/src/models/PathPartResponse.ts +9 -0
  293. package/src/models/PipelineStatus.ts +2 -1
  294. package/src/models/ScoredChunkResponse.ts +11 -11
  295. package/src/models/SeatQuotaStatus.ts +94 -0
  296. package/src/models/SubscriptionPlanResponse.ts +161 -0
  297. package/src/models/TenantQuotaStateResponse.ts +107 -0
  298. package/src/models/TenantResponse.ts +22 -0
  299. package/src/models/TenantSettingsResponse.ts +16 -0
  300. package/src/models/TenantSettingsUpdate.ts +15 -0
  301. package/src/models/ThreadMessageDetailsInput.ts +15 -0
  302. package/src/models/ThreadMessageDetailsOutput.ts +15 -0
  303. package/src/models/UpdateChunkMetadataRequest.ts +10 -10
  304. package/src/models/UpdateDocumentRequest.ts +9 -1
  305. package/src/models/UpdateFolderRequest.ts +9 -1
  306. package/src/models/UpdateInviteRequest.ts +94 -0
  307. package/src/models/UsageMetric.ts +54 -0
  308. package/src/models/index.ts +15 -2
  309. package/dist/esm/models/ChunkMetadataOutput.d.ts +0 -135
  310. package/dist/esm/models/ChunkMetadataOutput.js +0 -70
  311. package/dist/models/ChunkMetadataOutput.d.ts +0 -135
  312. package/dist/models/ChunkMetadataOutput.js +0 -78
  313. package/docs/ChunkMetadataOutput.md +0 -61
  314. package/src/models/ChunkMetadataOutput.ts +0 -203
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
28
+ }) : function(o, v) {
29
+ o["default"] = v;
30
+ });
31
+ var __importStar = (this && this.__importStar) || (function () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
49
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
50
+ return new (P || (P = Promise))(function (resolve, reject) {
51
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
52
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
53
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
54
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
55
+ });
56
+ };
57
+ Object.defineProperty(exports, "__esModule", { value: true });
58
+ exports.PublicApi = void 0;
59
+ const runtime = __importStar(require("../runtime"));
60
+ const index_1 = require("../models/index");
61
+ /**
62
+ *
63
+ */
64
+ class PublicApi extends runtime.BaseAPI {
65
+ /**
66
+ * Creates request options for listPublicSubscriptions without sending the request
67
+ */
68
+ listPublicSubscriptionsRequestOpts() {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const queryParameters = {};
71
+ const headerParameters = {};
72
+ let urlPath = `/public/subscriptions`;
73
+ return {
74
+ path: urlPath,
75
+ method: 'GET',
76
+ headers: headerParameters,
77
+ query: queryParameters,
78
+ };
79
+ });
80
+ }
81
+ /**
82
+ * List publicly-visible subscription plans (no authentication required). Filters to ``subscription_plan.public = true`` — custom enterprise tiers (created with ``public=False`` via ``POST /system/subscriptions``) are excluded. Tenants on a private plan can still read it via ``GET /v1/tenants/{tenant_id}/subscriptions``.
83
+ * List Public Subscriptions Handler
84
+ */
85
+ listPublicSubscriptionsRaw(initOverrides) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ const requestOptions = yield this.listPublicSubscriptionsRequestOpts();
88
+ const response = yield this.request(requestOptions, initOverrides);
89
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.SubscriptionPlanResponseFromJSON));
90
+ });
91
+ }
92
+ /**
93
+ * List publicly-visible subscription plans (no authentication required). Filters to ``subscription_plan.public = true`` — custom enterprise tiers (created with ``public=False`` via ``POST /system/subscriptions``) are excluded. Tenants on a private plan can still read it via ``GET /v1/tenants/{tenant_id}/subscriptions``.
94
+ * List Public Subscriptions Handler
95
+ */
96
+ listPublicSubscriptions(initOverrides) {
97
+ return __awaiter(this, void 0, void 0, function* () {
98
+ const response = yield this.listPublicSubscriptionsRaw(initOverrides);
99
+ return yield response.value();
100
+ });
101
+ }
102
+ }
103
+ exports.PublicApi = PublicApi;
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { ChangeSubscriptionRequest, SubscriptionPlanResponse, TenantResponse } from '../models/index';
14
+ export interface ChangeTenantSubscriptionRequest {
15
+ tenantId: string;
16
+ changeSubscriptionRequest: ChangeSubscriptionRequest;
17
+ idempotencyKey?: string | null;
18
+ authorization?: string | null;
19
+ ksUat?: string | null;
20
+ }
21
+ export interface GetTenantSubscriptionRequest {
22
+ tenantId: string;
23
+ authorization?: string | null;
24
+ ksUat?: string | null;
25
+ }
26
+ /**
27
+ * SubscriptionsApi - interface
28
+ *
29
+ * @export
30
+ * @interface SubscriptionsApiInterface
31
+ */
32
+ export interface SubscriptionsApiInterface {
33
+ /**
34
+ * Creates request options for changeTenantSubscription without sending the request
35
+ * @param {string} tenantId
36
+ * @param {ChangeSubscriptionRequest} changeSubscriptionRequest
37
+ * @param {string} [idempotencyKey]
38
+ * @param {string} [authorization]
39
+ * @param {string} [ksUat]
40
+ * @throws {RequiredError}
41
+ * @memberof SubscriptionsApiInterface
42
+ */
43
+ changeTenantSubscriptionRequestOpts(requestParameters: ChangeTenantSubscriptionRequest): Promise<runtime.RequestOpts>;
44
+ /**
45
+ * Change the tenant\'s subscription plan and/or seat count. OWNER-only on the target tenant. Covers three scenarios with one shape: - Plan change (with optional seat-count change). - Pure seat-count change (same plan, different ``num_seats``). - No-op (same plan, same seats) — returns 200, performs no DB or Stripe writes. Optional ``Idempotency-Key`` request header is forwarded to Stripe verbatim (clients that retry the same logical operation MUST send the same value across attempts; Stripe collapses duplicates server- side). Absent the header, the server generates a fresh ``uuid4()`` per call and emits a warning — retries in that case are NOT deduplicated. v1 mock-Stripe doesn\'t care, but the contract is in place for the real integration.
46
+ * @summary Change Tenant Subscription Handler
47
+ * @param {string} tenantId
48
+ * @param {ChangeSubscriptionRequest} changeSubscriptionRequest
49
+ * @param {string} [idempotencyKey]
50
+ * @param {string} [authorization]
51
+ * @param {string} [ksUat]
52
+ * @param {*} [options] Override http request option.
53
+ * @throws {RequiredError}
54
+ * @memberof SubscriptionsApiInterface
55
+ */
56
+ changeTenantSubscriptionRaw(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
57
+ /**
58
+ * Change the tenant\'s subscription plan and/or seat count. OWNER-only on the target tenant. Covers three scenarios with one shape: - Plan change (with optional seat-count change). - Pure seat-count change (same plan, different ``num_seats``). - No-op (same plan, same seats) — returns 200, performs no DB or Stripe writes. Optional ``Idempotency-Key`` request header is forwarded to Stripe verbatim (clients that retry the same logical operation MUST send the same value across attempts; Stripe collapses duplicates server- side). Absent the header, the server generates a fresh ``uuid4()`` per call and emits a warning — retries in that case are NOT deduplicated. v1 mock-Stripe doesn\'t care, but the contract is in place for the real integration.
59
+ * Change Tenant Subscription Handler
60
+ */
61
+ changeTenantSubscription(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
62
+ /**
63
+ * Creates request options for getTenantSubscription without sending the request
64
+ * @param {string} tenantId
65
+ * @param {string} [authorization]
66
+ * @param {string} [ksUat]
67
+ * @throws {RequiredError}
68
+ * @memberof SubscriptionsApiInterface
69
+ */
70
+ getTenantSubscriptionRequestOpts(requestParameters: GetTenantSubscriptionRequest): Promise<runtime.RequestOpts>;
71
+ /**
72
+ * Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
73
+ * @summary Get Tenant Subscription Handler
74
+ * @param {string} tenantId
75
+ * @param {string} [authorization]
76
+ * @param {string} [ksUat]
77
+ * @param {*} [options] Override http request option.
78
+ * @throws {RequiredError}
79
+ * @memberof SubscriptionsApiInterface
80
+ */
81
+ getTenantSubscriptionRaw(requestParameters: GetTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionPlanResponse>>;
82
+ /**
83
+ * Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
84
+ * Get Tenant Subscription Handler
85
+ */
86
+ getTenantSubscription(requestParameters: GetTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionPlanResponse>;
87
+ }
88
+ /**
89
+ *
90
+ */
91
+ export declare class SubscriptionsApi extends runtime.BaseAPI implements SubscriptionsApiInterface {
92
+ /**
93
+ * Creates request options for changeTenantSubscription without sending the request
94
+ */
95
+ changeTenantSubscriptionRequestOpts(requestParameters: ChangeTenantSubscriptionRequest): Promise<runtime.RequestOpts>;
96
+ /**
97
+ * Change the tenant\'s subscription plan and/or seat count. OWNER-only on the target tenant. Covers three scenarios with one shape: - Plan change (with optional seat-count change). - Pure seat-count change (same plan, different ``num_seats``). - No-op (same plan, same seats) — returns 200, performs no DB or Stripe writes. Optional ``Idempotency-Key`` request header is forwarded to Stripe verbatim (clients that retry the same logical operation MUST send the same value across attempts; Stripe collapses duplicates server- side). Absent the header, the server generates a fresh ``uuid4()`` per call and emits a warning — retries in that case are NOT deduplicated. v1 mock-Stripe doesn\'t care, but the contract is in place for the real integration.
98
+ * Change Tenant Subscription Handler
99
+ */
100
+ changeTenantSubscriptionRaw(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
101
+ /**
102
+ * Change the tenant\'s subscription plan and/or seat count. OWNER-only on the target tenant. Covers three scenarios with one shape: - Plan change (with optional seat-count change). - Pure seat-count change (same plan, different ``num_seats``). - No-op (same plan, same seats) — returns 200, performs no DB or Stripe writes. Optional ``Idempotency-Key`` request header is forwarded to Stripe verbatim (clients that retry the same logical operation MUST send the same value across attempts; Stripe collapses duplicates server- side). Absent the header, the server generates a fresh ``uuid4()`` per call and emits a warning — retries in that case are NOT deduplicated. v1 mock-Stripe doesn\'t care, but the contract is in place for the real integration.
103
+ * Change Tenant Subscription Handler
104
+ */
105
+ changeTenantSubscription(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
106
+ /**
107
+ * Creates request options for getTenantSubscription without sending the request
108
+ */
109
+ getTenantSubscriptionRequestOpts(requestParameters: GetTenantSubscriptionRequest): Promise<runtime.RequestOpts>;
110
+ /**
111
+ * Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
112
+ * Get Tenant Subscription Handler
113
+ */
114
+ getTenantSubscriptionRaw(requestParameters: GetTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionPlanResponse>>;
115
+ /**
116
+ * Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
117
+ * Get Tenant Subscription Handler
118
+ */
119
+ getTenantSubscription(requestParameters: GetTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionPlanResponse>;
120
+ }
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
28
+ }) : function(o, v) {
29
+ o["default"] = v;
30
+ });
31
+ var __importStar = (this && this.__importStar) || (function () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
49
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
50
+ return new (P || (P = Promise))(function (resolve, reject) {
51
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
52
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
53
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
54
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
55
+ });
56
+ };
57
+ Object.defineProperty(exports, "__esModule", { value: true });
58
+ exports.SubscriptionsApi = void 0;
59
+ const runtime = __importStar(require("../runtime"));
60
+ const index_1 = require("../models/index");
61
+ /**
62
+ *
63
+ */
64
+ class SubscriptionsApi extends runtime.BaseAPI {
65
+ /**
66
+ * Creates request options for changeTenantSubscription without sending the request
67
+ */
68
+ changeTenantSubscriptionRequestOpts(requestParameters) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ if (requestParameters['tenantId'] == null) {
71
+ throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling changeTenantSubscription().');
72
+ }
73
+ if (requestParameters['changeSubscriptionRequest'] == null) {
74
+ throw new runtime.RequiredError('changeSubscriptionRequest', 'Required parameter "changeSubscriptionRequest" was null or undefined when calling changeTenantSubscription().');
75
+ }
76
+ const queryParameters = {};
77
+ const headerParameters = {};
78
+ headerParameters['Content-Type'] = 'application/json';
79
+ if (requestParameters['idempotencyKey'] != null) {
80
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
81
+ }
82
+ if (requestParameters['authorization'] != null) {
83
+ headerParameters['authorization'] = String(requestParameters['authorization']);
84
+ }
85
+ let urlPath = `/v1/tenants/{tenant_id}/subscriptions`;
86
+ urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
87
+ return {
88
+ path: urlPath,
89
+ method: 'POST',
90
+ headers: headerParameters,
91
+ query: queryParameters,
92
+ body: (0, index_1.ChangeSubscriptionRequestToJSON)(requestParameters['changeSubscriptionRequest']),
93
+ };
94
+ });
95
+ }
96
+ /**
97
+ * Change the tenant\'s subscription plan and/or seat count. OWNER-only on the target tenant. Covers three scenarios with one shape: - Plan change (with optional seat-count change). - Pure seat-count change (same plan, different ``num_seats``). - No-op (same plan, same seats) — returns 200, performs no DB or Stripe writes. Optional ``Idempotency-Key`` request header is forwarded to Stripe verbatim (clients that retry the same logical operation MUST send the same value across attempts; Stripe collapses duplicates server- side). Absent the header, the server generates a fresh ``uuid4()`` per call and emits a warning — retries in that case are NOT deduplicated. v1 mock-Stripe doesn\'t care, but the contract is in place for the real integration.
98
+ * Change Tenant Subscription Handler
99
+ */
100
+ changeTenantSubscriptionRaw(requestParameters, initOverrides) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ const requestOptions = yield this.changeTenantSubscriptionRequestOpts(requestParameters);
103
+ const response = yield this.request(requestOptions, initOverrides);
104
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TenantResponseFromJSON)(jsonValue));
105
+ });
106
+ }
107
+ /**
108
+ * Change the tenant\'s subscription plan and/or seat count. OWNER-only on the target tenant. Covers three scenarios with one shape: - Plan change (with optional seat-count change). - Pure seat-count change (same plan, different ``num_seats``). - No-op (same plan, same seats) — returns 200, performs no DB or Stripe writes. Optional ``Idempotency-Key`` request header is forwarded to Stripe verbatim (clients that retry the same logical operation MUST send the same value across attempts; Stripe collapses duplicates server- side). Absent the header, the server generates a fresh ``uuid4()`` per call and emits a warning — retries in that case are NOT deduplicated. v1 mock-Stripe doesn\'t care, but the contract is in place for the real integration.
109
+ * Change Tenant Subscription Handler
110
+ */
111
+ changeTenantSubscription(requestParameters, initOverrides) {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ const response = yield this.changeTenantSubscriptionRaw(requestParameters, initOverrides);
114
+ return yield response.value();
115
+ });
116
+ }
117
+ /**
118
+ * Creates request options for getTenantSubscription without sending the request
119
+ */
120
+ getTenantSubscriptionRequestOpts(requestParameters) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ if (requestParameters['tenantId'] == null) {
123
+ throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling getTenantSubscription().');
124
+ }
125
+ const queryParameters = {};
126
+ const headerParameters = {};
127
+ if (requestParameters['authorization'] != null) {
128
+ headerParameters['authorization'] = String(requestParameters['authorization']);
129
+ }
130
+ let urlPath = `/v1/tenants/{tenant_id}/subscriptions`;
131
+ urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
132
+ return {
133
+ path: urlPath,
134
+ method: 'GET',
135
+ headers: headerParameters,
136
+ query: queryParameters,
137
+ };
138
+ });
139
+ }
140
+ /**
141
+ * Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
142
+ * Get Tenant Subscription Handler
143
+ */
144
+ getTenantSubscriptionRaw(requestParameters, initOverrides) {
145
+ return __awaiter(this, void 0, void 0, function* () {
146
+ const requestOptions = yield this.getTenantSubscriptionRequestOpts(requestParameters);
147
+ const response = yield this.request(requestOptions, initOverrides);
148
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubscriptionPlanResponseFromJSON)(jsonValue));
149
+ });
150
+ }
151
+ /**
152
+ * Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
153
+ * Get Tenant Subscription Handler
154
+ */
155
+ getTenantSubscription(requestParameters, initOverrides) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ const response = yield this.getTenantSubscriptionRaw(requestParameters, initOverrides);
158
+ return yield response.value();
159
+ });
160
+ }
161
+ }
162
+ exports.SubscriptionsApi = SubscriptionsApi;
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { BrandingLogoType, PaginatedResponseTenantResponse, PaginatedResponseTenantUserResponse, TenantResponse, TenantUserEditRequest, TenantUserResponse, UpdateTenantRequest } from '../models/index';
13
+ import type { BrandingLogoType, PaginatedResponseTenantResponse, PaginatedResponseTenantUserResponse, TenantQuotaStateResponse, TenantResponse, TenantUserEditRequest, TenantUserResponse, UpdateTenantRequest } from '../models/index';
14
14
  export interface ActivateTenantUserRequest {
15
15
  tenantId: string;
16
16
  userId: string;
@@ -45,6 +45,11 @@ export interface GetTenantRequest {
45
45
  authorization?: string | null;
46
46
  ksUat?: string | null;
47
47
  }
48
+ export interface GetTenantQuotaStateRequest {
49
+ tenantId: string;
50
+ authorization?: string | null;
51
+ ksUat?: string | null;
52
+ }
48
53
  export interface ListTenantUsersRequest {
49
54
  tenantId: string;
50
55
  limit?: number;
@@ -243,6 +248,31 @@ export interface TenantsApiInterface {
243
248
  * Get Tenant
244
249
  */
245
250
  getTenant(requestParameters: GetTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
251
+ /**
252
+ * Creates request options for getTenantQuotaState without sending the request
253
+ * @param {string} tenantId
254
+ * @param {string} [authorization]
255
+ * @param {string} [ksUat]
256
+ * @throws {RequiredError}
257
+ * @memberof TenantsApiInterface
258
+ */
259
+ getTenantQuotaStateRequestOpts(requestParameters: GetTenantQuotaStateRequest): Promise<runtime.RequestOpts>;
260
+ /**
261
+ * Read the tenant\'s current quota state across all metered caps + seats. Any active member of the tenant can read. Read-only — does not mutate quota state.
262
+ * @summary Get Tenant Quota State Handler
263
+ * @param {string} tenantId
264
+ * @param {string} [authorization]
265
+ * @param {string} [ksUat]
266
+ * @param {*} [options] Override http request option.
267
+ * @throws {RequiredError}
268
+ * @memberof TenantsApiInterface
269
+ */
270
+ getTenantQuotaStateRaw(requestParameters: GetTenantQuotaStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantQuotaStateResponse>>;
271
+ /**
272
+ * Read the tenant\'s current quota state across all metered caps + seats. Any active member of the tenant can read. Read-only — does not mutate quota state.
273
+ * Get Tenant Quota State Handler
274
+ */
275
+ getTenantQuotaState(requestParameters: GetTenantQuotaStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantQuotaStateResponse>;
246
276
  /**
247
277
  * Creates request options for listTenantUsers without sending the request
248
278
  * @param {string} tenantId
@@ -473,6 +503,20 @@ export declare class TenantsApi extends runtime.BaseAPI implements TenantsApiInt
473
503
  * Get Tenant
474
504
  */
475
505
  getTenant(requestParameters: GetTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
506
+ /**
507
+ * Creates request options for getTenantQuotaState without sending the request
508
+ */
509
+ getTenantQuotaStateRequestOpts(requestParameters: GetTenantQuotaStateRequest): Promise<runtime.RequestOpts>;
510
+ /**
511
+ * Read the tenant\'s current quota state across all metered caps + seats. Any active member of the tenant can read. Read-only — does not mutate quota state.
512
+ * Get Tenant Quota State Handler
513
+ */
514
+ getTenantQuotaStateRaw(requestParameters: GetTenantQuotaStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantQuotaStateResponse>>;
515
+ /**
516
+ * Read the tenant\'s current quota state across all metered caps + seats. Any active member of the tenant can read. Read-only — does not mutate quota state.
517
+ * Get Tenant Quota State Handler
518
+ */
519
+ getTenantQuotaState(requestParameters: GetTenantQuotaStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantQuotaStateResponse>;
476
520
  /**
477
521
  * Creates request options for listTenantUsers without sending the request
478
522
  */
@@ -339,6 +339,50 @@ class TenantsApi extends runtime.BaseAPI {
339
339
  return yield response.value();
340
340
  });
341
341
  }
342
+ /**
343
+ * Creates request options for getTenantQuotaState without sending the request
344
+ */
345
+ getTenantQuotaStateRequestOpts(requestParameters) {
346
+ return __awaiter(this, void 0, void 0, function* () {
347
+ if (requestParameters['tenantId'] == null) {
348
+ throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling getTenantQuotaState().');
349
+ }
350
+ const queryParameters = {};
351
+ const headerParameters = {};
352
+ if (requestParameters['authorization'] != null) {
353
+ headerParameters['authorization'] = String(requestParameters['authorization']);
354
+ }
355
+ let urlPath = `/v1/tenants/{tenant_id}/quota`;
356
+ urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
357
+ return {
358
+ path: urlPath,
359
+ method: 'GET',
360
+ headers: headerParameters,
361
+ query: queryParameters,
362
+ };
363
+ });
364
+ }
365
+ /**
366
+ * Read the tenant\'s current quota state across all metered caps + seats. Any active member of the tenant can read. Read-only — does not mutate quota state.
367
+ * Get Tenant Quota State Handler
368
+ */
369
+ getTenantQuotaStateRaw(requestParameters, initOverrides) {
370
+ return __awaiter(this, void 0, void 0, function* () {
371
+ const requestOptions = yield this.getTenantQuotaStateRequestOpts(requestParameters);
372
+ const response = yield this.request(requestOptions, initOverrides);
373
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TenantQuotaStateResponseFromJSON)(jsonValue));
374
+ });
375
+ }
376
+ /**
377
+ * Read the tenant\'s current quota state across all metered caps + seats. Any active member of the tenant can read. Read-only — does not mutate quota state.
378
+ * Get Tenant Quota State Handler
379
+ */
380
+ getTenantQuotaState(requestParameters, initOverrides) {
381
+ return __awaiter(this, void 0, void 0, function* () {
382
+ const response = yield this.getTenantQuotaStateRaw(requestParameters, initOverrides);
383
+ return yield response.value();
384
+ });
385
+ }
342
386
  /**
343
387
  * Creates request options for listTenantUsers without sending the request
344
388
  */
@@ -174,7 +174,7 @@ export interface ThreadsApiInterface {
174
174
  */
175
175
  sendUserMessageRequestOpts(requestParameters: SendUserMessageRequest): Promise<runtime.RequestOpts>;
176
176
  /**
177
- * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output.
177
+ * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output. Quota: consumes one MESSAGE inside the same transaction that creates the user-message row and starts the workflow. Any failure on the consume, the workflow start, or anywhere in between rolls back the whole transaction via the session context manager — message insert, quota consume, and downstream side effects are all-or-nothing. No explicit refund path is needed because nothing commits until the workflow has been durably enqueued. Workflow failures observed asynchronously (after enqueue) do **not** refund — the consume stands, matching agent-ask\'s v1 simplification.
178
178
  * @summary Send User Message Handler
179
179
  * @param {string} threadId
180
180
  * @param {UserMessageRequest} userMessageRequest
@@ -186,7 +186,7 @@ export interface ThreadsApiInterface {
186
186
  */
187
187
  sendUserMessageRaw(requestParameters: SendUserMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserMessageResponse>>;
188
188
  /**
189
- * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output.
189
+ * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output. Quota: consumes one MESSAGE inside the same transaction that creates the user-message row and starts the workflow. Any failure on the consume, the workflow start, or anywhere in between rolls back the whole transaction via the session context manager — message insert, quota consume, and downstream side effects are all-or-nothing. No explicit refund path is needed because nothing commits until the workflow has been durably enqueued. Workflow failures observed asynchronously (after enqueue) do **not** refund — the consume stands, matching agent-ask\'s v1 simplification.
190
190
  * Send User Message Handler
191
191
  */
192
192
  sendUserMessage(requestParameters: SendUserMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserMessageResponse>;
@@ -312,12 +312,12 @@ export declare class ThreadsApi extends runtime.BaseAPI implements ThreadsApiInt
312
312
  */
313
313
  sendUserMessageRequestOpts(requestParameters: SendUserMessageRequest): Promise<runtime.RequestOpts>;
314
314
  /**
315
- * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output.
315
+ * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output. Quota: consumes one MESSAGE inside the same transaction that creates the user-message row and starts the workflow. Any failure on the consume, the workflow start, or anywhere in between rolls back the whole transaction via the session context manager — message insert, quota consume, and downstream side effects are all-or-nothing. No explicit refund path is needed because nothing commits until the workflow has been durably enqueued. Workflow failures observed asynchronously (after enqueue) do **not** refund — the consume stands, matching agent-ask\'s v1 simplification.
316
316
  * Send User Message Handler
317
317
  */
318
318
  sendUserMessageRaw(requestParameters: SendUserMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserMessageResponse>>;
319
319
  /**
320
- * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output.
320
+ * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output. Quota: consumes one MESSAGE inside the same transaction that creates the user-message row and starts the workflow. Any failure on the consume, the workflow start, or anywhere in between rolls back the whole transaction via the session context manager — message insert, quota consume, and downstream side effects are all-or-nothing. No explicit refund path is needed because nothing commits until the workflow has been durably enqueued. Workflow failures observed asynchronously (after enqueue) do **not** refund — the consume stands, matching agent-ask\'s v1 simplification.
321
321
  * Send User Message Handler
322
322
  */
323
323
  sendUserMessage(requestParameters: SendUserMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserMessageResponse>;
@@ -272,7 +272,7 @@ class ThreadsApi extends runtime.BaseAPI {
272
272
  });
273
273
  }
274
274
  /**
275
- * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output.
275
+ * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output. Quota: consumes one MESSAGE inside the same transaction that creates the user-message row and starts the workflow. Any failure on the consume, the workflow start, or anywhere in between rolls back the whole transaction via the session context manager — message insert, quota consume, and downstream side effects are all-or-nothing. No explicit refund path is needed because nothing commits until the workflow has been durably enqueued. Workflow failures observed asynchronously (after enqueue) do **not** refund — the consume stands, matching agent-ask\'s v1 simplification.
276
276
  * Send User Message Handler
277
277
  */
278
278
  sendUserMessageRaw(requestParameters, initOverrides) {
@@ -283,7 +283,7 @@ class ThreadsApi extends runtime.BaseAPI {
283
283
  });
284
284
  }
285
285
  /**
286
- * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output.
286
+ * Send a user message and trigger agent generation. Returns immediately with a workflow_id. Connect to GET /{thread_id}/stream (SSE) before or after calling this endpoint to receive the streamed output. Quota: consumes one MESSAGE inside the same transaction that creates the user-message row and starts the workflow. Any failure on the consume, the workflow start, or anywhere in between rolls back the whole transaction via the session context manager — message insert, quota consume, and downstream side effects are all-or-nothing. No explicit refund path is needed because nothing commits until the workflow has been durably enqueued. Workflow failures observed asynchronously (after enqueue) do **not** refund — the consume stands, matching agent-ask\'s v1 simplification.
287
287
  * Send User Message Handler
288
288
  */
289
289
  sendUserMessage(requestParameters, initOverrides) {
@@ -1,3 +1,4 @@
1
+ export * from './AgentApi';
1
2
  export * from './ApiKeysApi';
2
3
  export * from './AuthApi';
3
4
  export * from './ChunkLineagesApi';
@@ -10,7 +11,9 @@ export * from './FeedbackApi';
10
11
  export * from './FoldersApi';
11
12
  export * from './InvitesApi';
12
13
  export * from './PathPartsApi';
14
+ export * from './PublicApi';
13
15
  export * from './SectionsApi';
16
+ export * from './SubscriptionsApi';
14
17
  export * from './TagsApi';
15
18
  export * from './TenantGroupsApi';
16
19
  export * from './TenantsApi';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
+ __exportStar(require("./AgentApi"), exports);
19
20
  __exportStar(require("./ApiKeysApi"), exports);
20
21
  __exportStar(require("./AuthApi"), exports);
21
22
  __exportStar(require("./ChunkLineagesApi"), exports);
@@ -28,7 +29,9 @@ __exportStar(require("./FeedbackApi"), exports);
28
29
  __exportStar(require("./FoldersApi"), exports);
29
30
  __exportStar(require("./InvitesApi"), exports);
30
31
  __exportStar(require("./PathPartsApi"), exports);
32
+ __exportStar(require("./PublicApi"), exports);
31
33
  __exportStar(require("./SectionsApi"), exports);
34
+ __exportStar(require("./SubscriptionsApi"), exports);
32
35
  __exportStar(require("./TagsApi"), exports);
33
36
  __exportStar(require("./TenantGroupsApi"), exports);
34
37
  __exportStar(require("./TenantsApi"), exports);