@knowledge-stack/ksapi 1.41.0 → 1.42.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 (133) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +18 -9
  3. package/dist/apis/ApiKeysApi.d.ts +187 -0
  4. package/dist/apis/ApiKeysApi.js +193 -0
  5. package/dist/apis/AuthApi.d.ts +6 -0
  6. package/dist/apis/AuthApi.js +6 -0
  7. package/dist/apis/ChunkLineagesApi.d.ts +9 -0
  8. package/dist/apis/ChunkLineagesApi.js +9 -0
  9. package/dist/apis/ChunksApi.d.ts +24 -0
  10. package/dist/apis/ChunksApi.js +24 -0
  11. package/dist/apis/DocumentVersionsApi.d.ts +21 -0
  12. package/dist/apis/DocumentVersionsApi.js +21 -0
  13. package/dist/apis/DocumentsApi.d.ts +21 -0
  14. package/dist/apis/DocumentsApi.js +21 -0
  15. package/dist/apis/FoldersApi.d.ts +21 -0
  16. package/dist/apis/FoldersApi.js +21 -0
  17. package/dist/apis/InvitesApi.d.ts +12 -0
  18. package/dist/apis/InvitesApi.js +12 -0
  19. package/dist/apis/PathPartsApi.d.ts +18 -0
  20. package/dist/apis/PathPartsApi.js +18 -0
  21. package/dist/apis/SectionsApi.d.ts +12 -0
  22. package/dist/apis/SectionsApi.js +12 -0
  23. package/dist/apis/TagsApi.d.ts +15 -0
  24. package/dist/apis/TagsApi.js +15 -0
  25. package/dist/apis/TenantsApi.d.ts +24 -0
  26. package/dist/apis/TenantsApi.js +24 -0
  27. package/dist/apis/ThreadMessagesApi.d.ts +9 -0
  28. package/dist/apis/ThreadMessagesApi.js +9 -0
  29. package/dist/apis/ThreadsApi.d.ts +21 -0
  30. package/dist/apis/ThreadsApi.js +21 -0
  31. package/dist/apis/UserPermissionsApi.d.ts +12 -0
  32. package/dist/apis/UserPermissionsApi.js +12 -0
  33. package/dist/apis/UsersApi.d.ts +6 -0
  34. package/dist/apis/UsersApi.js +6 -0
  35. package/dist/apis/WorkflowsApi.d.ts +9 -0
  36. package/dist/apis/WorkflowsApi.js +9 -0
  37. package/dist/apis/index.d.ts +1 -0
  38. package/dist/apis/index.js +1 -0
  39. package/dist/esm/apis/ApiKeysApi.d.ts +187 -0
  40. package/dist/esm/apis/ApiKeysApi.js +189 -0
  41. package/dist/esm/apis/AuthApi.d.ts +6 -0
  42. package/dist/esm/apis/AuthApi.js +6 -0
  43. package/dist/esm/apis/ChunkLineagesApi.d.ts +9 -0
  44. package/dist/esm/apis/ChunkLineagesApi.js +9 -0
  45. package/dist/esm/apis/ChunksApi.d.ts +24 -0
  46. package/dist/esm/apis/ChunksApi.js +24 -0
  47. package/dist/esm/apis/DocumentVersionsApi.d.ts +21 -0
  48. package/dist/esm/apis/DocumentVersionsApi.js +21 -0
  49. package/dist/esm/apis/DocumentsApi.d.ts +21 -0
  50. package/dist/esm/apis/DocumentsApi.js +21 -0
  51. package/dist/esm/apis/FoldersApi.d.ts +21 -0
  52. package/dist/esm/apis/FoldersApi.js +21 -0
  53. package/dist/esm/apis/InvitesApi.d.ts +12 -0
  54. package/dist/esm/apis/InvitesApi.js +12 -0
  55. package/dist/esm/apis/PathPartsApi.d.ts +18 -0
  56. package/dist/esm/apis/PathPartsApi.js +18 -0
  57. package/dist/esm/apis/SectionsApi.d.ts +12 -0
  58. package/dist/esm/apis/SectionsApi.js +12 -0
  59. package/dist/esm/apis/TagsApi.d.ts +15 -0
  60. package/dist/esm/apis/TagsApi.js +15 -0
  61. package/dist/esm/apis/TenantsApi.d.ts +24 -0
  62. package/dist/esm/apis/TenantsApi.js +24 -0
  63. package/dist/esm/apis/ThreadMessagesApi.d.ts +9 -0
  64. package/dist/esm/apis/ThreadMessagesApi.js +9 -0
  65. package/dist/esm/apis/ThreadsApi.d.ts +21 -0
  66. package/dist/esm/apis/ThreadsApi.js +21 -0
  67. package/dist/esm/apis/UserPermissionsApi.d.ts +12 -0
  68. package/dist/esm/apis/UserPermissionsApi.js +12 -0
  69. package/dist/esm/apis/UsersApi.d.ts +6 -0
  70. package/dist/esm/apis/UsersApi.js +6 -0
  71. package/dist/esm/apis/WorkflowsApi.d.ts +9 -0
  72. package/dist/esm/apis/WorkflowsApi.js +9 -0
  73. package/dist/esm/apis/index.d.ts +1 -0
  74. package/dist/esm/apis/index.js +1 -0
  75. package/dist/esm/models/ApiKeyResponse.d.ts +65 -0
  76. package/dist/esm/models/ApiKeyResponse.js +56 -0
  77. package/dist/esm/models/CreateApiKeyRequest.d.ts +47 -0
  78. package/dist/esm/models/CreateApiKeyRequest.js +49 -0
  79. package/dist/esm/models/CreateApiKeyResponse.d.ts +71 -0
  80. package/dist/esm/models/CreateApiKeyResponse.js +60 -0
  81. package/dist/esm/models/index.d.ts +3 -0
  82. package/dist/esm/models/index.js +3 -0
  83. package/dist/models/ApiKeyResponse.d.ts +65 -0
  84. package/dist/models/ApiKeyResponse.js +64 -0
  85. package/dist/models/CreateApiKeyRequest.d.ts +47 -0
  86. package/dist/models/CreateApiKeyRequest.js +57 -0
  87. package/dist/models/CreateApiKeyResponse.d.ts +71 -0
  88. package/dist/models/CreateApiKeyResponse.js +68 -0
  89. package/dist/models/index.d.ts +3 -0
  90. package/dist/models/index.js +3 -0
  91. package/docs/ApiKeyResponse.md +41 -0
  92. package/docs/ApiKeysApi.md +293 -0
  93. package/docs/AuthApi.md +8 -2
  94. package/docs/ChunkLineagesApi.md +12 -3
  95. package/docs/ChunksApi.md +32 -8
  96. package/docs/CreateApiKeyRequest.md +35 -0
  97. package/docs/CreateApiKeyResponse.md +43 -0
  98. package/docs/DocumentVersionsApi.md +28 -7
  99. package/docs/DocumentsApi.md +28 -7
  100. package/docs/FoldersApi.md +28 -7
  101. package/docs/InvitesApi.md +16 -4
  102. package/docs/PathPartsApi.md +24 -6
  103. package/docs/SectionsApi.md +16 -4
  104. package/docs/TagsApi.md +20 -5
  105. package/docs/TenantsApi.md +32 -8
  106. package/docs/ThreadMessagesApi.md +12 -3
  107. package/docs/ThreadsApi.md +28 -7
  108. package/docs/UserPermissionsApi.md +16 -4
  109. package/docs/UsersApi.md +8 -2
  110. package/docs/WorkflowsApi.md +12 -3
  111. package/package.json +1 -1
  112. package/src/apis/ApiKeysApi.ts +350 -0
  113. package/src/apis/AuthApi.ts +14 -0
  114. package/src/apis/ChunkLineagesApi.ts +21 -0
  115. package/src/apis/ChunksApi.ts +56 -0
  116. package/src/apis/DocumentVersionsApi.ts +49 -0
  117. package/src/apis/DocumentsApi.ts +49 -0
  118. package/src/apis/FoldersApi.ts +49 -0
  119. package/src/apis/InvitesApi.ts +28 -0
  120. package/src/apis/PathPartsApi.ts +42 -0
  121. package/src/apis/SectionsApi.ts +28 -0
  122. package/src/apis/TagsApi.ts +35 -0
  123. package/src/apis/TenantsApi.ts +56 -0
  124. package/src/apis/ThreadMessagesApi.ts +21 -0
  125. package/src/apis/ThreadsApi.ts +49 -0
  126. package/src/apis/UserPermissionsApi.ts +28 -0
  127. package/src/apis/UsersApi.ts +14 -0
  128. package/src/apis/WorkflowsApi.ts +21 -0
  129. package/src/apis/index.ts +1 -0
  130. package/src/models/ApiKeyResponse.ts +110 -0
  131. package/src/models/CreateApiKeyRequest.ts +87 -0
  132. package/src/models/CreateApiKeyResponse.ts +119 -0
  133. package/src/models/index.ts +3 -0
@@ -36,12 +36,14 @@ import {
36
36
 
37
37
  export interface CreateUserPermissionRequest {
38
38
  createPermissionRequest: CreatePermissionRequest;
39
+ authorization?: string | null;
39
40
  ksUat?: string | null;
40
41
  }
41
42
 
42
43
  export interface DeleteUserPermissionRequest {
43
44
  permissionId: string;
44
45
  tenantId: string;
46
+ authorization?: string | null;
45
47
  ksUat?: string | null;
46
48
  }
47
49
 
@@ -50,6 +52,7 @@ export interface ListUserPermissionsRequest {
50
52
  userId: string;
51
53
  limit?: number;
52
54
  offset?: number;
55
+ authorization?: string | null;
53
56
  ksUat?: string | null;
54
57
  }
55
58
 
@@ -57,6 +60,7 @@ export interface UpdateUserPermissionRequest {
57
60
  permissionId: string;
58
61
  tenantId: string;
59
62
  updatePermissionRequest: UpdatePermissionRequest;
63
+ authorization?: string | null;
60
64
  ksUat?: string | null;
61
65
  }
62
66
 
@@ -70,6 +74,7 @@ export interface UserPermissionsApiInterface {
70
74
  /**
71
75
  * Creates request options for createUserPermission without sending the request
72
76
  * @param {CreatePermissionRequest} createPermissionRequest
77
+ * @param {string} [authorization]
73
78
  * @param {string} [ksUat]
74
79
  * @throws {RequiredError}
75
80
  * @memberof UserPermissionsApiInterface
@@ -80,6 +85,7 @@ export interface UserPermissionsApiInterface {
80
85
  * Create a path permission for a user in a tenant (admin/owner only).
81
86
  * @summary Create User Permission Handler
82
87
  * @param {CreatePermissionRequest} createPermissionRequest
88
+ * @param {string} [authorization]
83
89
  * @param {string} [ksUat]
84
90
  * @param {*} [options] Override http request option.
85
91
  * @throws {RequiredError}
@@ -97,6 +103,7 @@ export interface UserPermissionsApiInterface {
97
103
  * Creates request options for deleteUserPermission without sending the request
98
104
  * @param {string} permissionId
99
105
  * @param {string} tenantId Tenant ID the permission belongs to
106
+ * @param {string} [authorization]
100
107
  * @param {string} [ksUat]
101
108
  * @throws {RequiredError}
102
109
  * @memberof UserPermissionsApiInterface
@@ -108,6 +115,7 @@ export interface UserPermissionsApiInterface {
108
115
  * @summary Delete User Permission Handler
109
116
  * @param {string} permissionId
110
117
  * @param {string} tenantId Tenant ID the permission belongs to
118
+ * @param {string} [authorization]
111
119
  * @param {string} [ksUat]
112
120
  * @param {*} [options] Override http request option.
113
121
  * @throws {RequiredError}
@@ -127,6 +135,7 @@ export interface UserPermissionsApiInterface {
127
135
  * @param {string} userId User ID to list permissions for
128
136
  * @param {number} [limit] Number of items per page
129
137
  * @param {number} [offset] Number of items to skip
138
+ * @param {string} [authorization]
130
139
  * @param {string} [ksUat]
131
140
  * @throws {RequiredError}
132
141
  * @memberof UserPermissionsApiInterface
@@ -140,6 +149,7 @@ export interface UserPermissionsApiInterface {
140
149
  * @param {string} userId User ID to list permissions for
141
150
  * @param {number} [limit] Number of items per page
142
151
  * @param {number} [offset] Number of items to skip
152
+ * @param {string} [authorization]
143
153
  * @param {string} [ksUat]
144
154
  * @param {*} [options] Override http request option.
145
155
  * @throws {RequiredError}
@@ -158,6 +168,7 @@ export interface UserPermissionsApiInterface {
158
168
  * @param {string} permissionId
159
169
  * @param {string} tenantId Tenant ID the permission belongs to
160
170
  * @param {UpdatePermissionRequest} updatePermissionRequest
171
+ * @param {string} [authorization]
161
172
  * @param {string} [ksUat]
162
173
  * @throws {RequiredError}
163
174
  * @memberof UserPermissionsApiInterface
@@ -170,6 +181,7 @@ export interface UserPermissionsApiInterface {
170
181
  * @param {string} permissionId
171
182
  * @param {string} tenantId Tenant ID the permission belongs to
172
183
  * @param {UpdatePermissionRequest} updatePermissionRequest
184
+ * @param {string} [authorization]
173
185
  * @param {string} [ksUat]
174
186
  * @param {*} [options] Override http request option.
175
187
  * @throws {RequiredError}
@@ -207,6 +219,10 @@ export class UserPermissionsApi extends runtime.BaseAPI implements UserPermissio
207
219
 
208
220
  headerParameters['Content-Type'] = 'application/json';
209
221
 
222
+ if (requestParameters['authorization'] != null) {
223
+ headerParameters['authorization'] = String(requestParameters['authorization']);
224
+ }
225
+
210
226
 
211
227
  let urlPath = `/v1/user-permissions`;
212
228
 
@@ -265,6 +281,10 @@ export class UserPermissionsApi extends runtime.BaseAPI implements UserPermissio
265
281
 
266
282
  const headerParameters: runtime.HTTPHeaders = {};
267
283
 
284
+ if (requestParameters['authorization'] != null) {
285
+ headerParameters['authorization'] = String(requestParameters['authorization']);
286
+ }
287
+
268
288
 
269
289
  let urlPath = `/v1/user-permissions/{permission_id}`;
270
290
  urlPath = urlPath.replace(`{${"permission_id"}}`, encodeURIComponent(String(requestParameters['permissionId'])));
@@ -334,6 +354,10 @@ export class UserPermissionsApi extends runtime.BaseAPI implements UserPermissio
334
354
 
335
355
  const headerParameters: runtime.HTTPHeaders = {};
336
356
 
357
+ if (requestParameters['authorization'] != null) {
358
+ headerParameters['authorization'] = String(requestParameters['authorization']);
359
+ }
360
+
337
361
 
338
362
  let urlPath = `/v1/user-permissions`;
339
363
 
@@ -400,6 +424,10 @@ export class UserPermissionsApi extends runtime.BaseAPI implements UserPermissio
400
424
 
401
425
  headerParameters['Content-Type'] = 'application/json';
402
426
 
427
+ if (requestParameters['authorization'] != null) {
428
+ headerParameters['authorization'] = String(requestParameters['authorization']);
429
+ }
430
+
403
431
 
404
432
  let urlPath = `/v1/user-permissions/{permission_id}`;
405
433
  urlPath = urlPath.replace(`{${"permission_id"}}`, encodeURIComponent(String(requestParameters['permissionId'])));
@@ -29,11 +29,13 @@ import {
29
29
  } from '../models/index';
30
30
 
31
31
  export interface GetMeRequest {
32
+ authorization?: string | null;
32
33
  ksUat?: string | null;
33
34
  }
34
35
 
35
36
  export interface UpdateMeRequest {
36
37
  updateUserRequest: UpdateUserRequest;
38
+ authorization?: string | null;
37
39
  ksUat?: string | null;
38
40
  }
39
41
 
@@ -46,6 +48,7 @@ export interface UpdateMeRequest {
46
48
  export interface UsersApiInterface {
47
49
  /**
48
50
  * Creates request options for getMe without sending the request
51
+ * @param {string} [authorization]
49
52
  * @param {string} [ksUat]
50
53
  * @throws {RequiredError}
51
54
  * @memberof UsersApiInterface
@@ -55,6 +58,7 @@ export interface UsersApiInterface {
55
58
  /**
56
59
  * Get current user information including current tenant context. Returns the authenticated user\'s profile along with their current tenant ID (from the UAT token) and default tenant ID (from user record).
57
60
  * @summary Get Me Handler
61
+ * @param {string} [authorization]
58
62
  * @param {string} [ksUat]
59
63
  * @param {*} [options] Override http request option.
60
64
  * @throws {RequiredError}
@@ -71,6 +75,7 @@ export interface UsersApiInterface {
71
75
  /**
72
76
  * Creates request options for updateMe without sending the request
73
77
  * @param {UpdateUserRequest} updateUserRequest
78
+ * @param {string} [authorization]
74
79
  * @param {string} [ksUat]
75
80
  * @throws {RequiredError}
76
81
  * @memberof UsersApiInterface
@@ -81,6 +86,7 @@ export interface UsersApiInterface {
81
86
  * Update the user\'s default tenant. The user must belong to the specified tenant.
82
87
  * @summary Update Me Handler
83
88
  * @param {UpdateUserRequest} updateUserRequest
89
+ * @param {string} [authorization]
84
90
  * @param {string} [ksUat]
85
91
  * @param {*} [options] Override http request option.
86
92
  * @throws {RequiredError}
@@ -109,6 +115,10 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
109
115
 
110
116
  const headerParameters: runtime.HTTPHeaders = {};
111
117
 
118
+ if (requestParameters['authorization'] != null) {
119
+ headerParameters['authorization'] = String(requestParameters['authorization']);
120
+ }
121
+
112
122
 
113
123
  let urlPath = `/v1/users/me`;
114
124
 
@@ -157,6 +167,10 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
157
167
 
158
168
  headerParameters['Content-Type'] = 'application/json';
159
169
 
170
+ if (requestParameters['authorization'] != null) {
171
+ headerParameters['authorization'] = String(requestParameters['authorization']);
172
+ }
173
+
160
174
 
161
175
  let urlPath = `/v1/users`;
162
176
 
@@ -36,18 +36,21 @@ import {
36
36
 
37
37
  export interface GetWorkflowRequest {
38
38
  workflowId: string;
39
+ authorization?: string | null;
39
40
  ksUat?: string | null;
40
41
  }
41
42
 
42
43
  export interface ListWorkflowsRequest {
43
44
  limit?: number;
44
45
  offset?: number;
46
+ authorization?: string | null;
45
47
  ksUat?: string | null;
46
48
  }
47
49
 
48
50
  export interface WorkflowActionRequest {
49
51
  workflowId: string;
50
52
  action: WorkflowAction;
53
+ authorization?: string | null;
51
54
  ksUat?: string | null;
52
55
  }
53
56
 
@@ -61,6 +64,7 @@ export interface WorkflowsApiInterface {
61
64
  /**
62
65
  * Creates request options for getWorkflow without sending the request
63
66
  * @param {string} workflowId
67
+ * @param {string} [authorization]
64
68
  * @param {string} [ksUat]
65
69
  * @throws {RequiredError}
66
70
  * @memberof WorkflowsApiInterface
@@ -71,6 +75,7 @@ export interface WorkflowsApiInterface {
71
75
  * Get single workflow detail with live Temporal status.
72
76
  * @summary Get Workflow Handler
73
77
  * @param {string} workflowId
78
+ * @param {string} [authorization]
74
79
  * @param {string} [ksUat]
75
80
  * @param {*} [options] Override http request option.
76
81
  * @throws {RequiredError}
@@ -88,6 +93,7 @@ export interface WorkflowsApiInterface {
88
93
  * Creates request options for listWorkflows without sending the request
89
94
  * @param {number} [limit] Number of items per page
90
95
  * @param {number} [offset] Number of items to skip
96
+ * @param {string} [authorization]
91
97
  * @param {string} [ksUat]
92
98
  * @throws {RequiredError}
93
99
  * @memberof WorkflowsApiInterface
@@ -99,6 +105,7 @@ export interface WorkflowsApiInterface {
99
105
  * @summary List Workflows Handler
100
106
  * @param {number} [limit] Number of items per page
101
107
  * @param {number} [offset] Number of items to skip
108
+ * @param {string} [authorization]
102
109
  * @param {string} [ksUat]
103
110
  * @param {*} [options] Override http request option.
104
111
  * @throws {RequiredError}
@@ -116,6 +123,7 @@ export interface WorkflowsApiInterface {
116
123
  * Creates request options for workflowAction without sending the request
117
124
  * @param {string} workflowId
118
125
  * @param {WorkflowAction} action Action to perform
126
+ * @param {string} [authorization]
119
127
  * @param {string} [ksUat]
120
128
  * @throws {RequiredError}
121
129
  * @memberof WorkflowsApiInterface
@@ -127,6 +135,7 @@ export interface WorkflowsApiInterface {
127
135
  * @summary Workflow Action Handler
128
136
  * @param {string} workflowId
129
137
  * @param {WorkflowAction} action Action to perform
138
+ * @param {string} [authorization]
130
139
  * @param {string} [ksUat]
131
140
  * @param {*} [options] Override http request option.
132
141
  * @throws {RequiredError}
@@ -162,6 +171,10 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
162
171
 
163
172
  const headerParameters: runtime.HTTPHeaders = {};
164
173
 
174
+ if (requestParameters['authorization'] != null) {
175
+ headerParameters['authorization'] = String(requestParameters['authorization']);
176
+ }
177
+
165
178
 
166
179
  let urlPath = `/v1/workflows/{workflow_id}`;
167
180
  urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
@@ -210,6 +223,10 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
210
223
 
211
224
  const headerParameters: runtime.HTTPHeaders = {};
212
225
 
226
+ if (requestParameters['authorization'] != null) {
227
+ headerParameters['authorization'] = String(requestParameters['authorization']);
228
+ }
229
+
213
230
 
214
231
  let urlPath = `/v1/workflows`;
215
232
 
@@ -267,6 +284,10 @@ export class WorkflowsApi extends runtime.BaseAPI implements WorkflowsApiInterfa
267
284
 
268
285
  const headerParameters: runtime.HTTPHeaders = {};
269
286
 
287
+ if (requestParameters['authorization'] != null) {
288
+ headerParameters['authorization'] = String(requestParameters['authorization']);
289
+ }
290
+
270
291
 
271
292
  let urlPath = `/v1/workflows/{workflow_id}`;
272
293
  urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
package/src/apis/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export * from './ApiKeysApi';
3
4
  export * from './AuthApi';
4
5
  export * from './ChunkLineagesApi';
5
6
  export * from './ChunksApi';
@@ -0,0 +1,110 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * API key metadata (without the secret key).
18
+ * @export
19
+ * @interface ApiKeyResponse
20
+ */
21
+ export interface ApiKeyResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ApiKeyResponse
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ApiKeyResponse
32
+ */
33
+ name: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ApiKeyResponse
38
+ */
39
+ keySuffix: string;
40
+ /**
41
+ *
42
+ * @type {Date}
43
+ * @memberof ApiKeyResponse
44
+ */
45
+ createdAt: Date;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the ApiKeyResponse interface.
50
+ */
51
+ export function instanceOfApiKeyResponse(value: object): value is ApiKeyResponse {
52
+ if (!('id' in value) || value['id'] === undefined) return false;
53
+ if (!('name' in value) || value['name'] === undefined) return false;
54
+ if (!('keySuffix' in value) || value['keySuffix'] === undefined) return false;
55
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function ApiKeyResponseFromJSON(json: any): ApiKeyResponse {
60
+ return ApiKeyResponseFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function ApiKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyResponse {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'id': json['id'],
70
+ 'name': json['name'],
71
+ 'keySuffix': json['key_suffix'],
72
+ 'createdAt': (new Date(json['created_at'])),
73
+ };
74
+ }
75
+
76
+ export function ApiKeyResponseToJSON(json: any): ApiKeyResponse {
77
+ return ApiKeyResponseToJSONTyped(json, false);
78
+ }
79
+
80
+ export function ApiKeyResponseToJSONTyped(value?: ApiKeyResponse | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'id': value['id'],
88
+ 'name': value['name'],
89
+ 'key_suffix': value['keySuffix'],
90
+ 'created_at': value['createdAt'].toISOString(),
91
+ };
92
+ }
93
+
94
+ export const ApiKeyResponsePropertyValidationAttributesMap: {
95
+ [property: string]: {
96
+ maxLength?: number,
97
+ minLength?: number,
98
+ pattern?: string,
99
+ maximum?: number,
100
+ exclusiveMaximum?: boolean,
101
+ minimum?: number,
102
+ exclusiveMinimum?: boolean,
103
+ multipleOf?: number,
104
+ maxItems?: number,
105
+ minItems?: number,
106
+ uniqueItems?: boolean
107
+ }
108
+ } = {
109
+ }
110
+
@@ -0,0 +1,87 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Request to create a new API key.
18
+ * @export
19
+ * @interface CreateApiKeyRequest
20
+ */
21
+ export interface CreateApiKeyRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof CreateApiKeyRequest
26
+ */
27
+ name: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the CreateApiKeyRequest interface.
32
+ */
33
+ export function instanceOfCreateApiKeyRequest(value: object): value is CreateApiKeyRequest {
34
+ if (!('name' in value) || value['name'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function CreateApiKeyRequestFromJSON(json: any): CreateApiKeyRequest {
39
+ return CreateApiKeyRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function CreateApiKeyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateApiKeyRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'name': json['name'],
49
+ };
50
+ }
51
+
52
+ export function CreateApiKeyRequestToJSON(json: any): CreateApiKeyRequest {
53
+ return CreateApiKeyRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function CreateApiKeyRequestToJSONTyped(value?: CreateApiKeyRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'name': value['name'],
64
+ };
65
+ }
66
+
67
+ export const CreateApiKeyRequestPropertyValidationAttributesMap: {
68
+ [property: string]: {
69
+ maxLength?: number,
70
+ minLength?: number,
71
+ pattern?: string,
72
+ maximum?: number,
73
+ exclusiveMaximum?: boolean,
74
+ minimum?: number,
75
+ exclusiveMinimum?: boolean,
76
+ multipleOf?: number,
77
+ maxItems?: number,
78
+ minItems?: number,
79
+ uniqueItems?: boolean
80
+ }
81
+ } = {
82
+ name: {
83
+ maxLength: 100,
84
+ minLength: 1,
85
+ },
86
+ }
87
+
@@ -0,0 +1,119 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * Response after creating an API key. Contains the full key (shown once).
18
+ * @export
19
+ * @interface CreateApiKeyResponse
20
+ */
21
+ export interface CreateApiKeyResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof CreateApiKeyResponse
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof CreateApiKeyResponse
32
+ */
33
+ name: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof CreateApiKeyResponse
38
+ */
39
+ key: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof CreateApiKeyResponse
44
+ */
45
+ keySuffix: string;
46
+ /**
47
+ *
48
+ * @type {Date}
49
+ * @memberof CreateApiKeyResponse
50
+ */
51
+ createdAt: Date;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the CreateApiKeyResponse interface.
56
+ */
57
+ export function instanceOfCreateApiKeyResponse(value: object): value is CreateApiKeyResponse {
58
+ if (!('id' in value) || value['id'] === undefined) return false;
59
+ if (!('name' in value) || value['name'] === undefined) return false;
60
+ if (!('key' in value) || value['key'] === undefined) return false;
61
+ if (!('keySuffix' in value) || value['keySuffix'] === undefined) return false;
62
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function CreateApiKeyResponseFromJSON(json: any): CreateApiKeyResponse {
67
+ return CreateApiKeyResponseFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function CreateApiKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateApiKeyResponse {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'id': json['id'],
77
+ 'name': json['name'],
78
+ 'key': json['key'],
79
+ 'keySuffix': json['key_suffix'],
80
+ 'createdAt': (new Date(json['created_at'])),
81
+ };
82
+ }
83
+
84
+ export function CreateApiKeyResponseToJSON(json: any): CreateApiKeyResponse {
85
+ return CreateApiKeyResponseToJSONTyped(json, false);
86
+ }
87
+
88
+ export function CreateApiKeyResponseToJSONTyped(value?: CreateApiKeyResponse | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'id': value['id'],
96
+ 'name': value['name'],
97
+ 'key': value['key'],
98
+ 'key_suffix': value['keySuffix'],
99
+ 'created_at': value['createdAt'].toISOString(),
100
+ };
101
+ }
102
+
103
+ export const CreateApiKeyResponsePropertyValidationAttributesMap: {
104
+ [property: string]: {
105
+ maxLength?: number,
106
+ minLength?: number,
107
+ pattern?: string,
108
+ maximum?: number,
109
+ exclusiveMaximum?: boolean,
110
+ minimum?: number,
111
+ exclusiveMinimum?: boolean,
112
+ multipleOf?: number,
113
+ maxItems?: number,
114
+ minItems?: number,
115
+ uniqueItems?: boolean
116
+ }
117
+ } = {
118
+ }
119
+
@@ -1,6 +1,7 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export * from './AcceptInviteResponse';
4
+ export * from './ApiKeyResponse';
4
5
  export * from './Args';
5
6
  export * from './BulkTagRequest';
6
7
  export * from './ChunkBulkResponse';
@@ -13,6 +14,8 @@ export * from './ChunkSearchRequest';
13
14
  export * from './ChunkType';
14
15
  export * from './Citation';
15
16
  export * from './ClearVersionContentsResponse';
17
+ export * from './CreateApiKeyRequest';
18
+ export * from './CreateApiKeyResponse';
16
19
  export * from './CreateChunkLineageRequest';
17
20
  export * from './CreateChunkRequest';
18
21
  export * from './CreateDocumentRequest';