@knowledge-stack/ksapi 1.80.1 → 1.82.0

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 (89) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +8 -2
  3. package/dist/apis/UsersApi.d.ts +130 -1
  4. package/dist/apis/UsersApi.js +130 -0
  5. package/dist/apis/WorkflowDefinitionsApi.d.ts +4 -1
  6. package/dist/apis/WorkflowDefinitionsApi.js +2 -0
  7. package/dist/esm/apis/UsersApi.d.ts +130 -1
  8. package/dist/esm/apis/UsersApi.js +131 -1
  9. package/dist/esm/apis/WorkflowDefinitionsApi.d.ts +4 -1
  10. package/dist/esm/apis/WorkflowDefinitionsApi.js +2 -0
  11. package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +8 -1
  12. package/dist/esm/models/CreateWorkflowDefinitionRequest.js +1 -4
  13. package/dist/esm/models/InstructionSnapshot.d.ts +71 -0
  14. package/dist/esm/models/InstructionSnapshot.js +57 -0
  15. package/dist/esm/models/InvokeWorkflowRequest.d.ts +6 -0
  16. package/dist/esm/models/InvokeWorkflowRequest.js +6 -0
  17. package/dist/esm/models/OnboardingCompanyRequest.d.ts +53 -0
  18. package/dist/esm/models/OnboardingCompanyRequest.js +51 -0
  19. package/dist/esm/models/OnboardingProfileRequest.d.ts +59 -0
  20. package/dist/esm/models/OnboardingProfileRequest.js +50 -0
  21. package/dist/esm/models/TenantSettingsResponse.d.ts +6 -0
  22. package/dist/esm/models/TenantSettingsResponse.js +2 -0
  23. package/dist/esm/models/TenantSettingsUpdate.d.ts +6 -0
  24. package/dist/esm/models/TenantSettingsUpdate.js +10 -1
  25. package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +6 -1
  26. package/dist/esm/models/UserResponse.d.ts +12 -0
  27. package/dist/esm/models/UserResponse.js +4 -0
  28. package/dist/esm/models/WorkflowRunResponse.d.ts +17 -0
  29. package/dist/esm/models/WorkflowRunResponse.js +8 -0
  30. package/dist/esm/models/WorkflowRunSnapshot.d.ts +3 -2
  31. package/dist/esm/models/WorkflowRunSnapshot.js +3 -2
  32. package/dist/esm/models/WorkflowRunnerType.d.ts +1 -0
  33. package/dist/esm/models/WorkflowRunnerType.js +2 -1
  34. package/dist/esm/models/index.d.ts +3 -0
  35. package/dist/esm/models/index.js +3 -0
  36. package/dist/models/CreateWorkflowDefinitionRequest.d.ts +8 -1
  37. package/dist/models/CreateWorkflowDefinitionRequest.js +1 -4
  38. package/dist/models/InstructionSnapshot.d.ts +71 -0
  39. package/dist/models/InstructionSnapshot.js +65 -0
  40. package/dist/models/InvokeWorkflowRequest.d.ts +6 -0
  41. package/dist/models/InvokeWorkflowRequest.js +6 -0
  42. package/dist/models/OnboardingCompanyRequest.d.ts +53 -0
  43. package/dist/models/OnboardingCompanyRequest.js +59 -0
  44. package/dist/models/OnboardingProfileRequest.d.ts +59 -0
  45. package/dist/models/OnboardingProfileRequest.js +58 -0
  46. package/dist/models/TenantSettingsResponse.d.ts +6 -0
  47. package/dist/models/TenantSettingsResponse.js +2 -0
  48. package/dist/models/TenantSettingsUpdate.d.ts +6 -0
  49. package/dist/models/TenantSettingsUpdate.js +10 -1
  50. package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +6 -1
  51. package/dist/models/UserResponse.d.ts +12 -0
  52. package/dist/models/UserResponse.js +4 -0
  53. package/dist/models/WorkflowRunResponse.d.ts +17 -0
  54. package/dist/models/WorkflowRunResponse.js +8 -0
  55. package/dist/models/WorkflowRunSnapshot.d.ts +3 -2
  56. package/dist/models/WorkflowRunSnapshot.js +3 -2
  57. package/dist/models/WorkflowRunnerType.d.ts +1 -0
  58. package/dist/models/WorkflowRunnerType.js +2 -1
  59. package/dist/models/index.d.ts +3 -0
  60. package/dist/models/index.js +3 -0
  61. package/docs/CreateWorkflowDefinitionRequest.md +1 -1
  62. package/docs/InstructionSnapshot.md +41 -0
  63. package/docs/InvokeWorkflowRequest.md +2 -0
  64. package/docs/OnboardingCompanyRequest.md +37 -0
  65. package/docs/OnboardingProfileRequest.md +39 -0
  66. package/docs/TenantSettingsResponse.md +2 -0
  67. package/docs/TenantSettingsUpdate.md +2 -0
  68. package/docs/UpdateWorkflowDefinitionRequest.md +1 -1
  69. package/docs/UserResponse.md +4 -0
  70. package/docs/UsersApi.md +222 -0
  71. package/docs/WorkflowDefinitionsApi.md +2 -0
  72. package/docs/WorkflowRunResponse.md +5 -1
  73. package/docs/WorkflowRunSnapshot.md +1 -1
  74. package/package.json +1 -1
  75. package/src/apis/UsersApi.ts +254 -0
  76. package/src/apis/WorkflowDefinitionsApi.ts +4 -1
  77. package/src/models/CreateWorkflowDefinitionRequest.ts +9 -4
  78. package/src/models/InstructionSnapshot.ts +125 -0
  79. package/src/models/InvokeWorkflowRequest.ts +12 -0
  80. package/src/models/OnboardingCompanyRequest.ts +96 -0
  81. package/src/models/OnboardingProfileRequest.ts +101 -0
  82. package/src/models/TenantSettingsResponse.ts +8 -0
  83. package/src/models/TenantSettingsUpdate.ts +14 -0
  84. package/src/models/UpdateWorkflowDefinitionRequest.ts +6 -1
  85. package/src/models/UserResponse.ts +16 -0
  86. package/src/models/WorkflowRunResponse.ts +23 -0
  87. package/src/models/WorkflowRunSnapshot.ts +11 -4
  88. package/src/models/WorkflowRunnerType.ts +2 -1
  89. package/src/models/index.ts +3 -0
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { UpdateUserRequestToJSON, UserResponseFromJSON, } from '../models/index';
24
+ import { OnboardingCompanyRequestToJSON, OnboardingProfileRequestToJSON, UpdateUserRequestToJSON, UserResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -66,6 +66,46 @@ export class UsersApi extends runtime.BaseAPI {
66
66
  return yield response.value();
67
67
  });
68
68
  }
69
+ /**
70
+ * Creates request options for skipOnboarding without sending the request
71
+ */
72
+ skipOnboardingRequestOpts(requestParameters) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const queryParameters = {};
75
+ const headerParameters = {};
76
+ if (requestParameters['authorization'] != null) {
77
+ headerParameters['authorization'] = String(requestParameters['authorization']);
78
+ }
79
+ let urlPath = `/v1/users/me/onboarding/skip`;
80
+ return {
81
+ path: urlPath,
82
+ method: 'POST',
83
+ headers: headerParameters,
84
+ query: queryParameters,
85
+ };
86
+ });
87
+ }
88
+ /**
89
+ * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
90
+ * Skip Onboarding Handler
91
+ */
92
+ skipOnboardingRaw(requestParameters, initOverrides) {
93
+ return __awaiter(this, void 0, void 0, function* () {
94
+ const requestOptions = yield this.skipOnboardingRequestOpts(requestParameters);
95
+ const response = yield this.request(requestOptions, initOverrides);
96
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
97
+ });
98
+ }
99
+ /**
100
+ * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
101
+ * Skip Onboarding Handler
102
+ */
103
+ skipOnboarding() {
104
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
105
+ const response = yield this.skipOnboardingRaw(requestParameters, initOverrides);
106
+ return yield response.value();
107
+ });
108
+ }
69
109
  /**
70
110
  * Creates request options for updateMe without sending the request
71
111
  */
@@ -111,4 +151,94 @@ export class UsersApi extends runtime.BaseAPI {
111
151
  return yield response.value();
112
152
  });
113
153
  }
154
+ /**
155
+ * Creates request options for updateOnboardingCompany without sending the request
156
+ */
157
+ updateOnboardingCompanyRequestOpts(requestParameters) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ if (requestParameters['onboardingCompanyRequest'] == null) {
160
+ throw new runtime.RequiredError('onboardingCompanyRequest', 'Required parameter "onboardingCompanyRequest" was null or undefined when calling updateOnboardingCompany().');
161
+ }
162
+ const queryParameters = {};
163
+ const headerParameters = {};
164
+ headerParameters['Content-Type'] = 'application/json';
165
+ if (requestParameters['authorization'] != null) {
166
+ headerParameters['authorization'] = String(requestParameters['authorization']);
167
+ }
168
+ let urlPath = `/v1/users/me/onboarding/company`;
169
+ return {
170
+ path: urlPath,
171
+ method: 'PATCH',
172
+ headers: headerParameters,
173
+ query: queryParameters,
174
+ body: OnboardingCompanyRequestToJSON(requestParameters['onboardingCompanyRequest']),
175
+ };
176
+ });
177
+ }
178
+ /**
179
+ * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
180
+ * Update Onboarding Company Handler
181
+ */
182
+ updateOnboardingCompanyRaw(requestParameters, initOverrides) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ const requestOptions = yield this.updateOnboardingCompanyRequestOpts(requestParameters);
185
+ const response = yield this.request(requestOptions, initOverrides);
186
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
187
+ });
188
+ }
189
+ /**
190
+ * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
191
+ * Update Onboarding Company Handler
192
+ */
193
+ updateOnboardingCompany(requestParameters, initOverrides) {
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ const response = yield this.updateOnboardingCompanyRaw(requestParameters, initOverrides);
196
+ return yield response.value();
197
+ });
198
+ }
199
+ /**
200
+ * Creates request options for updateOnboardingProfile without sending the request
201
+ */
202
+ updateOnboardingProfileRequestOpts(requestParameters) {
203
+ return __awaiter(this, void 0, void 0, function* () {
204
+ if (requestParameters['onboardingProfileRequest'] == null) {
205
+ throw new runtime.RequiredError('onboardingProfileRequest', 'Required parameter "onboardingProfileRequest" was null or undefined when calling updateOnboardingProfile().');
206
+ }
207
+ const queryParameters = {};
208
+ const headerParameters = {};
209
+ headerParameters['Content-Type'] = 'application/json';
210
+ if (requestParameters['authorization'] != null) {
211
+ headerParameters['authorization'] = String(requestParameters['authorization']);
212
+ }
213
+ let urlPath = `/v1/users/me/onboarding/profile`;
214
+ return {
215
+ path: urlPath,
216
+ method: 'PATCH',
217
+ headers: headerParameters,
218
+ query: queryParameters,
219
+ body: OnboardingProfileRequestToJSON(requestParameters['onboardingProfileRequest']),
220
+ };
221
+ });
222
+ }
223
+ /**
224
+ * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users (name) or a future per-membership profile endpoint (job_title).
225
+ * Update Onboarding Profile Handler
226
+ */
227
+ updateOnboardingProfileRaw(requestParameters, initOverrides) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ const requestOptions = yield this.updateOnboardingProfileRequestOpts(requestParameters);
230
+ const response = yield this.request(requestOptions, initOverrides);
231
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
232
+ });
233
+ }
234
+ /**
235
+ * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users (name) or a future per-membership profile endpoint (job_title).
236
+ * Update Onboarding Profile Handler
237
+ */
238
+ updateOnboardingProfile(requestParameters, initOverrides) {
239
+ return __awaiter(this, void 0, void 0, function* () {
240
+ const response = yield this.updateOnboardingProfileRaw(requestParameters, initOverrides);
241
+ return yield response.value();
242
+ });
243
+ }
114
244
  }
@@ -141,7 +141,7 @@ export interface WorkflowDefinitionsApiInterface {
141
141
  */
142
142
  invokeWorkflowRequestOpts(requestParameters: InvokeWorkflowOperationRequest): Promise<runtime.RequestOpts>;
143
143
  /**
144
- *
144
+ * Trigger a workflow run. All business logic lives in ``WorkflowInvocationService``. This handler only orchestrates the two phases: 1. **Phase 1 (in-session):** validate, build snapshot, persist run row, mint JWT. Wrapped in a single DB session so the run insert and the idempotency-race resolution share a transaction. 2. **Phase 2 (out-of-session):** dispatch HTTP call to the SELF_HOSTED runner. Best-effort — the run is already persisted, so failures here transition the run to ``FAILED`` rather than rejecting the request.
145
145
  * @summary Invoke Workflow Handler
146
146
  * @param {string} definitionId
147
147
  * @param {InvokeWorkflowRequest} invokeWorkflowRequest
@@ -153,6 +153,7 @@ export interface WorkflowDefinitionsApiInterface {
153
153
  */
154
154
  invokeWorkflowRaw(requestParameters: InvokeWorkflowOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
155
155
  /**
156
+ * Trigger a workflow run. All business logic lives in ``WorkflowInvocationService``. This handler only orchestrates the two phases: 1. **Phase 1 (in-session):** validate, build snapshot, persist run row, mint JWT. Wrapped in a single DB session so the run insert and the idempotency-race resolution share a transaction. 2. **Phase 2 (out-of-session):** dispatch HTTP call to the SELF_HOSTED runner. Best-effort — the run is already persisted, so failures here transition the run to ``FAILED`` rather than rejecting the request.
156
157
  * Invoke Workflow Handler
157
158
  */
158
159
  invokeWorkflow(requestParameters: InvokeWorkflowOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -282,10 +283,12 @@ export declare class WorkflowDefinitionsApi extends runtime.BaseAPI implements W
282
283
  */
283
284
  invokeWorkflowRequestOpts(requestParameters: InvokeWorkflowOperationRequest): Promise<runtime.RequestOpts>;
284
285
  /**
286
+ * Trigger a workflow run. All business logic lives in ``WorkflowInvocationService``. This handler only orchestrates the two phases: 1. **Phase 1 (in-session):** validate, build snapshot, persist run row, mint JWT. Wrapped in a single DB session so the run insert and the idempotency-race resolution share a transaction. 2. **Phase 2 (out-of-session):** dispatch HTTP call to the SELF_HOSTED runner. Best-effort — the run is already persisted, so failures here transition the run to ``FAILED`` rather than rejecting the request.
285
287
  * Invoke Workflow Handler
286
288
  */
287
289
  invokeWorkflowRaw(requestParameters: InvokeWorkflowOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkflowRunResponse>>;
288
290
  /**
291
+ * Trigger a workflow run. All business logic lives in ``WorkflowInvocationService``. This handler only orchestrates the two phases: 1. **Phase 1 (in-session):** validate, build snapshot, persist run row, mint JWT. Wrapped in a single DB session so the run insert and the idempotency-race resolution share a transaction. 2. **Phase 2 (out-of-session):** dispatch HTTP call to the SELF_HOSTED runner. Best-effort — the run is already persisted, so failures here transition the run to ``FAILED`` rather than rejecting the request.
289
292
  * Invoke Workflow Handler
290
293
  */
291
294
  invokeWorkflow(requestParameters: InvokeWorkflowOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkflowRunResponse>;
@@ -181,6 +181,7 @@ export class WorkflowDefinitionsApi extends runtime.BaseAPI {
181
181
  });
182
182
  }
183
183
  /**
184
+ * Trigger a workflow run. All business logic lives in ``WorkflowInvocationService``. This handler only orchestrates the two phases: 1. **Phase 1 (in-session):** validate, build snapshot, persist run row, mint JWT. Wrapped in a single DB session so the run insert and the idempotency-race resolution share a transaction. 2. **Phase 2 (out-of-session):** dispatch HTTP call to the SELF_HOSTED runner. Best-effort — the run is already persisted, so failures here transition the run to ``FAILED`` rather than rejecting the request.
184
185
  * Invoke Workflow Handler
185
186
  */
186
187
  invokeWorkflowRaw(requestParameters, initOverrides) {
@@ -191,6 +192,7 @@ export class WorkflowDefinitionsApi extends runtime.BaseAPI {
191
192
  });
192
193
  }
193
194
  /**
195
+ * Trigger a workflow run. All business logic lives in ``WorkflowInvocationService``. This handler only orchestrates the two phases: 1. **Phase 1 (in-session):** validate, build snapshot, persist run row, mint JWT. Wrapped in a single DB session so the run insert and the idempotency-race resolution share a transaction. 2. **Phase 2 (out-of-session):** dispatch HTTP call to the SELF_HOSTED runner. Best-effort — the run is already persisted, so failures here transition the run to ``FAILED`` rather than rejecting the request.
194
196
  * Invoke Workflow Handler
195
197
  */
196
198
  invokeWorkflow(requestParameters, initOverrides) {
@@ -13,6 +13,13 @@ import type { SelfHostedRunnerConfig } from './SelfHostedRunnerConfig';
13
13
  import type { WorkflowRunnerType } from './WorkflowRunnerType';
14
14
  /**
15
15
  * Create a new workflow definition.
16
+ *
17
+ * ``instruction_path_part_ids`` semantics depend on ``runner_type``:
18
+ *
19
+ * - ``KS_INTERNAL``: must be empty (``[]``); the server auto-provisions a
20
+ * single ``instruction.md`` and stores ``[doc.path_part_id]``.
21
+ * - ``SELF_HOSTED``: caller-supplied list of one-or-more document
22
+ * PathPart IDs. Must contain at least one entry.
16
23
  * @export
17
24
  * @interface CreateWorkflowDefinitionRequest
18
25
  */
@@ -58,7 +65,7 @@ export interface CreateWorkflowDefinitionRequest {
58
65
  * @type {Array<string>}
59
66
  * @memberof CreateWorkflowDefinitionRequest
60
67
  */
61
- instructionPathPartIds: Array<string>;
68
+ instructionPathPartIds?: Array<string>;
62
69
  /**
63
70
  *
64
71
  * @type {Array<string>}
@@ -30,7 +30,6 @@ export const CreateWorkflowDefinitionRequestPropertyValidationAttributesMap = {
30
30
  },
31
31
  instructionPathPartIds: {
32
32
  maxItems: 20,
33
- minItems: 1,
34
33
  uniqueItems: false,
35
34
  },
36
35
  outputPathPartIds: {
@@ -49,8 +48,6 @@ export function instanceOfCreateWorkflowDefinitionRequest(value) {
49
48
  return false;
50
49
  if (!('sourcePathPartIds' in value) || value['sourcePathPartIds'] === undefined)
51
50
  return false;
52
- if (!('instructionPathPartIds' in value) || value['instructionPathPartIds'] === undefined)
53
- return false;
54
51
  if (!('outputPathPartIds' in value) || value['outputPathPartIds'] === undefined)
55
52
  return false;
56
53
  return true;
@@ -69,7 +66,7 @@ export function CreateWorkflowDefinitionRequestFromJSONTyped(json, ignoreDiscrim
69
66
  'runnerConfig': json['runner_config'] == null ? undefined : SelfHostedRunnerConfigFromJSON(json['runner_config']),
70
67
  'maxRunDurationSeconds': json['max_run_duration_seconds'] == null ? undefined : json['max_run_duration_seconds'],
71
68
  'sourcePathPartIds': json['source_path_part_ids'],
72
- 'instructionPathPartIds': json['instruction_path_part_ids'],
69
+ 'instructionPathPartIds': json['instruction_path_part_ids'] == null ? undefined : json['instruction_path_part_ids'],
73
70
  'outputPathPartIds': json['output_path_part_ids'],
74
71
  'templatePathPartId': json['template_path_part_id'] == null ? undefined : json['template_path_part_id'],
75
72
  };
@@ -0,0 +1,71 @@
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 type { PartType } from './PartType';
13
+ /**
14
+ * Snapshot of one instruction document, pinned at trigger time.
15
+ *
16
+ * The instruction file is the workflow's **contract**: the agent reads
17
+ * this exact ``document_version_id`` for the duration of the run, even
18
+ * if the document is edited mid-flight or after the run completes.
19
+ * Reproducibility and audit replay depend on this pinning.
20
+ * @export
21
+ * @interface InstructionSnapshot
22
+ */
23
+ export interface InstructionSnapshot {
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof InstructionSnapshot
28
+ */
29
+ pathPartId: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof InstructionSnapshot
34
+ */
35
+ materializedPath: string;
36
+ /**
37
+ *
38
+ * @type {PartType}
39
+ * @memberof InstructionSnapshot
40
+ */
41
+ partType: PartType;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof InstructionSnapshot
46
+ */
47
+ documentVersionId: string;
48
+ }
49
+ export declare const InstructionSnapshotPropertyValidationAttributesMap: {
50
+ [property: string]: {
51
+ maxLength?: number;
52
+ minLength?: number;
53
+ pattern?: string;
54
+ maximum?: number;
55
+ exclusiveMaximum?: boolean;
56
+ minimum?: number;
57
+ exclusiveMinimum?: boolean;
58
+ multipleOf?: number;
59
+ maxItems?: number;
60
+ minItems?: number;
61
+ uniqueItems?: boolean;
62
+ };
63
+ };
64
+ /**
65
+ * Check if a given object implements the InstructionSnapshot interface.
66
+ */
67
+ export declare function instanceOfInstructionSnapshot(value: object): value is InstructionSnapshot;
68
+ export declare function InstructionSnapshotFromJSON(json: any): InstructionSnapshot;
69
+ export declare function InstructionSnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstructionSnapshot;
70
+ export declare function InstructionSnapshotToJSON(json: any): InstructionSnapshot;
71
+ export declare function InstructionSnapshotToJSONTyped(value?: InstructionSnapshot | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
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
+ import { PartTypeFromJSON, PartTypeToJSON, } from './PartType';
15
+ export const InstructionSnapshotPropertyValidationAttributesMap = {};
16
+ /**
17
+ * Check if a given object implements the InstructionSnapshot interface.
18
+ */
19
+ export function instanceOfInstructionSnapshot(value) {
20
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
21
+ return false;
22
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
23
+ return false;
24
+ if (!('partType' in value) || value['partType'] === undefined)
25
+ return false;
26
+ if (!('documentVersionId' in value) || value['documentVersionId'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ export function InstructionSnapshotFromJSON(json) {
31
+ return InstructionSnapshotFromJSONTyped(json, false);
32
+ }
33
+ export function InstructionSnapshotFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'pathPartId': json['path_part_id'],
39
+ 'materializedPath': json['materialized_path'],
40
+ 'partType': PartTypeFromJSON(json['part_type']),
41
+ 'documentVersionId': json['document_version_id'],
42
+ };
43
+ }
44
+ export function InstructionSnapshotToJSON(json) {
45
+ return InstructionSnapshotToJSONTyped(json, false);
46
+ }
47
+ export function InstructionSnapshotToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'path_part_id': value['pathPartId'],
53
+ 'materialized_path': value['materializedPath'],
54
+ 'part_type': PartTypeToJSON(value['partType']),
55
+ 'document_version_id': value['documentVersionId'],
56
+ };
57
+ }
@@ -21,6 +21,12 @@ export interface InvokeWorkflowRequest {
21
21
  * @memberof InvokeWorkflowRequest
22
22
  */
23
23
  idempotencyKey?: string | null;
24
+ /**
25
+ * Path part IDs of input documents to pin to this run. Each path_part must be a DOCUMENT readable by the caller. Active document_version_id is captured at trigger time.
26
+ * @type {Array<string>}
27
+ * @memberof InvokeWorkflowRequest
28
+ */
29
+ inputPathPartIds?: Array<string>;
24
30
  }
25
31
  export declare const InvokeWorkflowRequestPropertyValidationAttributesMap: {
26
32
  [property: string]: {
@@ -15,6 +15,10 @@ export const InvokeWorkflowRequestPropertyValidationAttributesMap = {
15
15
  idempotencyKey: {
16
16
  maxLength: 255,
17
17
  },
18
+ inputPathPartIds: {
19
+ maxItems: 50,
20
+ uniqueItems: false,
21
+ },
18
22
  };
19
23
  /**
20
24
  * Check if a given object implements the InvokeWorkflowRequest interface.
@@ -31,6 +35,7 @@ export function InvokeWorkflowRequestFromJSONTyped(json, ignoreDiscriminator) {
31
35
  }
32
36
  return {
33
37
  'idempotencyKey': json['idempotency_key'] == null ? undefined : json['idempotency_key'],
38
+ 'inputPathPartIds': json['input_path_part_ids'] == null ? undefined : json['input_path_part_ids'],
34
39
  };
35
40
  }
36
41
  export function InvokeWorkflowRequestToJSON(json) {
@@ -42,5 +47,6 @@ export function InvokeWorkflowRequestToJSONTyped(value, ignoreDiscriminator = fa
42
47
  }
43
48
  return {
44
49
  'idempotency_key': value['idempotencyKey'],
50
+ 'input_path_part_ids': value['inputPathPartIds'],
45
51
  };
46
52
  }
@@ -0,0 +1,53 @@
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
+ /**
13
+ * Step 1 of onboarding — tenant-wide company info. OWNER/ADMIN only.
14
+ * @export
15
+ * @interface OnboardingCompanyRequest
16
+ */
17
+ export interface OnboardingCompanyRequest {
18
+ /**
19
+ * Brief company description (≤5000 chars)
20
+ * @type {string}
21
+ * @memberof OnboardingCompanyRequest
22
+ */
23
+ description?: string | null;
24
+ /**
25
+ * Industry / company type (free text)
26
+ * @type {string}
27
+ * @memberof OnboardingCompanyRequest
28
+ */
29
+ industry?: string | null;
30
+ }
31
+ export declare const OnboardingCompanyRequestPropertyValidationAttributesMap: {
32
+ [property: string]: {
33
+ maxLength?: number;
34
+ minLength?: number;
35
+ pattern?: string;
36
+ maximum?: number;
37
+ exclusiveMaximum?: boolean;
38
+ minimum?: number;
39
+ exclusiveMinimum?: boolean;
40
+ multipleOf?: number;
41
+ maxItems?: number;
42
+ minItems?: number;
43
+ uniqueItems?: boolean;
44
+ };
45
+ };
46
+ /**
47
+ * Check if a given object implements the OnboardingCompanyRequest interface.
48
+ */
49
+ export declare function instanceOfOnboardingCompanyRequest(value: object): value is OnboardingCompanyRequest;
50
+ export declare function OnboardingCompanyRequestFromJSON(json: any): OnboardingCompanyRequest;
51
+ export declare function OnboardingCompanyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingCompanyRequest;
52
+ export declare function OnboardingCompanyRequestToJSON(json: any): OnboardingCompanyRequest;
53
+ export declare function OnboardingCompanyRequestToJSONTyped(value?: OnboardingCompanyRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
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
+ export const OnboardingCompanyRequestPropertyValidationAttributesMap = {
15
+ description: {
16
+ maxLength: 5000,
17
+ },
18
+ industry: {
19
+ maxLength: 120,
20
+ },
21
+ };
22
+ /**
23
+ * Check if a given object implements the OnboardingCompanyRequest interface.
24
+ */
25
+ export function instanceOfOnboardingCompanyRequest(value) {
26
+ return true;
27
+ }
28
+ export function OnboardingCompanyRequestFromJSON(json) {
29
+ return OnboardingCompanyRequestFromJSONTyped(json, false);
30
+ }
31
+ export function OnboardingCompanyRequestFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'description': json['description'] == null ? undefined : json['description'],
37
+ 'industry': json['industry'] == null ? undefined : json['industry'],
38
+ };
39
+ }
40
+ export function OnboardingCompanyRequestToJSON(json) {
41
+ return OnboardingCompanyRequestToJSONTyped(json, false);
42
+ }
43
+ export function OnboardingCompanyRequestToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'description': value['description'],
49
+ 'industry': value['industry'],
50
+ };
51
+ }
@@ -0,0 +1,59 @@
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
+ /**
13
+ * Step 2 of onboarding — per-user info for the current tenant.
14
+ * @export
15
+ * @interface OnboardingProfileRequest
16
+ */
17
+ export interface OnboardingProfileRequest {
18
+ /**
19
+ * User's first name
20
+ * @type {string}
21
+ * @memberof OnboardingProfileRequest
22
+ */
23
+ firstName?: string | null;
24
+ /**
25
+ * User's last name
26
+ * @type {string}
27
+ * @memberof OnboardingProfileRequest
28
+ */
29
+ lastName?: string | null;
30
+ /**
31
+ * What the user does at this tenant
32
+ * @type {string}
33
+ * @memberof OnboardingProfileRequest
34
+ */
35
+ jobTitle?: string | null;
36
+ }
37
+ export declare const OnboardingProfileRequestPropertyValidationAttributesMap: {
38
+ [property: string]: {
39
+ maxLength?: number;
40
+ minLength?: number;
41
+ pattern?: string;
42
+ maximum?: number;
43
+ exclusiveMaximum?: boolean;
44
+ minimum?: number;
45
+ exclusiveMinimum?: boolean;
46
+ multipleOf?: number;
47
+ maxItems?: number;
48
+ minItems?: number;
49
+ uniqueItems?: boolean;
50
+ };
51
+ };
52
+ /**
53
+ * Check if a given object implements the OnboardingProfileRequest interface.
54
+ */
55
+ export declare function instanceOfOnboardingProfileRequest(value: object): value is OnboardingProfileRequest;
56
+ export declare function OnboardingProfileRequestFromJSON(json: any): OnboardingProfileRequest;
57
+ export declare function OnboardingProfileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingProfileRequest;
58
+ export declare function OnboardingProfileRequestToJSON(json: any): OnboardingProfileRequest;
59
+ export declare function OnboardingProfileRequestToJSONTyped(value?: OnboardingProfileRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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
+ export const OnboardingProfileRequestPropertyValidationAttributesMap = {
15
+ jobTitle: {
16
+ maxLength: 120,
17
+ },
18
+ };
19
+ /**
20
+ * Check if a given object implements the OnboardingProfileRequest interface.
21
+ */
22
+ export function instanceOfOnboardingProfileRequest(value) {
23
+ return true;
24
+ }
25
+ export function OnboardingProfileRequestFromJSON(json) {
26
+ return OnboardingProfileRequestFromJSONTyped(json, false);
27
+ }
28
+ export function OnboardingProfileRequestFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'firstName': json['first_name'] == null ? undefined : json['first_name'],
34
+ 'lastName': json['last_name'] == null ? undefined : json['last_name'],
35
+ 'jobTitle': json['job_title'] == null ? undefined : json['job_title'],
36
+ };
37
+ }
38
+ export function OnboardingProfileRequestToJSON(json) {
39
+ return OnboardingProfileRequestToJSONTyped(json, false);
40
+ }
41
+ export function OnboardingProfileRequestToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'first_name': value['firstName'],
47
+ 'last_name': value['lastName'],
48
+ 'job_title': value['jobTitle'],
49
+ };
50
+ }
@@ -29,6 +29,12 @@ export interface TenantSettingsResponse {
29
29
  * @memberof TenantSettingsResponse
30
30
  */
31
31
  description: string;
32
+ /**
33
+ * Industry / company type captured during onboarding
34
+ * @type {string}
35
+ * @memberof TenantSettingsResponse
36
+ */
37
+ industry?: string | null;
32
38
  /**
33
39
  * IANA timezone (e.g. 'America/New_York')
34
40
  * @type {string}
@@ -38,6 +38,7 @@ export function TenantSettingsResponseFromJSONTyped(json, ignoreDiscriminator) {
38
38
  return {
39
39
  'language': SupportedLanguageFromJSON(json['language']),
40
40
  'description': json['description'],
41
+ 'industry': json['industry'] == null ? undefined : json['industry'],
41
42
  'timezone': json['timezone'],
42
43
  'inviteLink': InviteLinkSettingsResponseFromJSON(json['invite_link']),
43
44
  };
@@ -52,6 +53,7 @@ export function TenantSettingsResponseToJSONTyped(value, ignoreDiscriminator = f
52
53
  return {
53
54
  'language': SupportedLanguageToJSON(value['language']),
54
55
  'description': value['description'],
56
+ 'industry': value['industry'],
55
57
  'timezone': value['timezone'],
56
58
  'invite_link': InviteLinkSettingsResponseToJSON(value['inviteLink']),
57
59
  };