@knowledge-stack/ksapi 2.4.3 → 2.6.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 (108) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +7 -2
  3. package/dist/apis/DocumentsApi.d.ts +9 -0
  4. package/dist/apis/DocumentsApi.js +9 -0
  5. package/dist/apis/SystemJobsApi.d.ts +4 -4
  6. package/dist/apis/SystemJobsApi.js +2 -2
  7. package/dist/apis/TenantInvitationsApi.d.ts +67 -0
  8. package/dist/apis/TenantInvitationsApi.js +112 -0
  9. package/dist/apis/TenantsApi.d.ts +4 -4
  10. package/dist/apis/TenantsApi.js +2 -2
  11. package/dist/apis/index.d.ts +1 -0
  12. package/dist/apis/index.js +1 -0
  13. package/dist/esm/apis/DocumentsApi.d.ts +9 -0
  14. package/dist/esm/apis/DocumentsApi.js +9 -0
  15. package/dist/esm/apis/SystemJobsApi.d.ts +4 -4
  16. package/dist/esm/apis/SystemJobsApi.js +2 -2
  17. package/dist/esm/apis/TenantInvitationsApi.d.ts +67 -0
  18. package/dist/esm/apis/TenantInvitationsApi.js +75 -0
  19. package/dist/esm/apis/TenantsApi.d.ts +4 -4
  20. package/dist/esm/apis/TenantsApi.js +2 -2
  21. package/dist/esm/apis/index.d.ts +1 -0
  22. package/dist/esm/apis/index.js +1 -0
  23. package/dist/esm/models/AcceptTenantInvitationRequest.d.ts +53 -0
  24. package/dist/esm/models/AcceptTenantInvitationRequest.js +48 -0
  25. package/dist/esm/models/AcceptTenantInvitationResponse.d.ts +59 -0
  26. package/dist/esm/models/AcceptTenantInvitationResponse.js +52 -0
  27. package/dist/esm/models/ChunkMetadata.d.ts +12 -0
  28. package/dist/esm/models/ChunkMetadata.js +4 -0
  29. package/dist/esm/models/CreateUploadRequest.d.ts +18 -0
  30. package/dist/esm/models/CreateUploadRequest.js +6 -0
  31. package/dist/esm/models/DocumentVersionMetadata.d.ts +7 -0
  32. package/dist/esm/models/DocumentVersionMetadata.js +3 -0
  33. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +7 -0
  34. package/dist/esm/models/DocumentVersionMetadataUpdate.js +3 -0
  35. package/dist/esm/models/EmailMetadata.d.ts +119 -0
  36. package/dist/esm/models/EmailMetadata.js +65 -0
  37. package/dist/esm/models/EmailParty.d.ts +53 -0
  38. package/dist/esm/models/EmailParty.js +46 -0
  39. package/dist/esm/models/EventResponse.d.ts +6 -0
  40. package/dist/esm/models/EventResponse.js +2 -0
  41. package/dist/esm/models/ImageTaxonomy.d.ts +1 -0
  42. package/dist/esm/models/ImageTaxonomy.js +1 -0
  43. package/dist/esm/models/IngestDocumentResponse.d.ts +18 -0
  44. package/dist/esm/models/IngestDocumentResponse.js +6 -0
  45. package/dist/esm/models/SegmentSpan.d.ts +9 -2
  46. package/dist/esm/models/SegmentSpan.js +2 -0
  47. package/dist/esm/models/index.d.ts +4 -0
  48. package/dist/esm/models/index.js +4 -0
  49. package/dist/models/AcceptTenantInvitationRequest.d.ts +53 -0
  50. package/dist/models/AcceptTenantInvitationRequest.js +56 -0
  51. package/dist/models/AcceptTenantInvitationResponse.d.ts +59 -0
  52. package/dist/models/AcceptTenantInvitationResponse.js +60 -0
  53. package/dist/models/ChunkMetadata.d.ts +12 -0
  54. package/dist/models/ChunkMetadata.js +4 -0
  55. package/dist/models/CreateUploadRequest.d.ts +18 -0
  56. package/dist/models/CreateUploadRequest.js +6 -0
  57. package/dist/models/DocumentVersionMetadata.d.ts +7 -0
  58. package/dist/models/DocumentVersionMetadata.js +3 -0
  59. package/dist/models/DocumentVersionMetadataUpdate.d.ts +7 -0
  60. package/dist/models/DocumentVersionMetadataUpdate.js +3 -0
  61. package/dist/models/EmailMetadata.d.ts +119 -0
  62. package/dist/models/EmailMetadata.js +73 -0
  63. package/dist/models/EmailParty.d.ts +53 -0
  64. package/dist/models/EmailParty.js +54 -0
  65. package/dist/models/EventResponse.d.ts +6 -0
  66. package/dist/models/EventResponse.js +2 -0
  67. package/dist/models/ImageTaxonomy.d.ts +1 -0
  68. package/dist/models/ImageTaxonomy.js +1 -0
  69. package/dist/models/IngestDocumentResponse.d.ts +18 -0
  70. package/dist/models/IngestDocumentResponse.js +6 -0
  71. package/dist/models/SegmentSpan.d.ts +9 -2
  72. package/dist/models/SegmentSpan.js +2 -0
  73. package/dist/models/index.d.ts +4 -0
  74. package/dist/models/index.js +4 -0
  75. package/docs/AcceptTenantInvitationRequest.md +36 -0
  76. package/docs/AcceptTenantInvitationResponse.md +38 -0
  77. package/docs/ChunkMetadata.md +4 -0
  78. package/docs/CreateUploadRequest.md +6 -0
  79. package/docs/DocumentVersionMetadata.md +2 -0
  80. package/docs/DocumentVersionMetadataUpdate.md +2 -0
  81. package/docs/DocumentsApi.md +13 -4
  82. package/docs/EmailMetadata.md +57 -0
  83. package/docs/EmailParty.md +37 -0
  84. package/docs/EventResponse.md +2 -0
  85. package/docs/IngestDocumentResponse.md +6 -0
  86. package/docs/SegmentSpan.md +3 -1
  87. package/docs/SystemJobsApi.md +1 -1
  88. package/docs/TenantInvitationsApi.md +85 -0
  89. package/docs/TenantsApi.md +1 -1
  90. package/package.json +1 -1
  91. package/src/apis/DocumentsApi.ts +21 -0
  92. package/src/apis/SystemJobsApi.ts +4 -4
  93. package/src/apis/TenantInvitationsApi.ts +136 -0
  94. package/src/apis/TenantsApi.ts +4 -4
  95. package/src/apis/index.ts +1 -0
  96. package/src/models/AcceptTenantInvitationRequest.ts +93 -0
  97. package/src/models/AcceptTenantInvitationResponse.ts +101 -0
  98. package/src/models/ChunkMetadata.ts +16 -0
  99. package/src/models/CreateUploadRequest.ts +24 -0
  100. package/src/models/DocumentVersionMetadata.ts +15 -0
  101. package/src/models/DocumentVersionMetadataUpdate.ts +15 -0
  102. package/src/models/EmailMetadata.ts +183 -0
  103. package/src/models/EmailParty.ts +91 -0
  104. package/src/models/EventResponse.ts +8 -0
  105. package/src/models/ImageTaxonomy.ts +1 -0
  106. package/src/models/IngestDocumentResponse.ts +24 -0
  107. package/src/models/SegmentSpan.ts +11 -2
  108. package/src/models/index.ts +4 -0
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
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 { AcceptTenantInvitationRequest, AcceptTenantInvitationResponse } from '../models/index';
14
+ export interface AcceptTenantInvitationOperationRequest {
15
+ invitationId: string;
16
+ acceptTenantInvitationRequest: AcceptTenantInvitationRequest;
17
+ }
18
+ /**
19
+ * TenantInvitationsApi - interface
20
+ *
21
+ * @export
22
+ * @interface TenantInvitationsApiInterface
23
+ */
24
+ export interface TenantInvitationsApiInterface {
25
+ /**
26
+ * Creates request options for acceptTenantInvitation without sending the request
27
+ * @param {string} invitationId
28
+ * @param {AcceptTenantInvitationRequest} acceptTenantInvitationRequest
29
+ * @throws {RequiredError}
30
+ * @memberof TenantInvitationsApiInterface
31
+ */
32
+ acceptTenantInvitationRequestOpts(requestParameters: AcceptTenantInvitationOperationRequest): Promise<runtime.RequestOpts>;
33
+ /**
34
+ * Accept an invitation, creating the customer tenant and its OWNER. New owner: supply ``password`` — the account is created and signed in. Existing owner: accept while signed in as ``owner_email`` (no password).
35
+ * @summary Accept Tenant Invitation Handler
36
+ * @param {string} invitationId
37
+ * @param {AcceptTenantInvitationRequest} acceptTenantInvitationRequest
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ * @memberof TenantInvitationsApiInterface
41
+ */
42
+ acceptTenantInvitationRaw(requestParameters: AcceptTenantInvitationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AcceptTenantInvitationResponse>>;
43
+ /**
44
+ * Accept an invitation, creating the customer tenant and its OWNER. New owner: supply ``password`` — the account is created and signed in. Existing owner: accept while signed in as ``owner_email`` (no password).
45
+ * Accept Tenant Invitation Handler
46
+ */
47
+ acceptTenantInvitation(requestParameters: AcceptTenantInvitationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AcceptTenantInvitationResponse>;
48
+ }
49
+ /**
50
+ *
51
+ */
52
+ export declare class TenantInvitationsApi extends runtime.BaseAPI implements TenantInvitationsApiInterface {
53
+ /**
54
+ * Creates request options for acceptTenantInvitation without sending the request
55
+ */
56
+ acceptTenantInvitationRequestOpts(requestParameters: AcceptTenantInvitationOperationRequest): Promise<runtime.RequestOpts>;
57
+ /**
58
+ * Accept an invitation, creating the customer tenant and its OWNER. New owner: supply ``password`` — the account is created and signed in. Existing owner: accept while signed in as ``owner_email`` (no password).
59
+ * Accept Tenant Invitation Handler
60
+ */
61
+ acceptTenantInvitationRaw(requestParameters: AcceptTenantInvitationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AcceptTenantInvitationResponse>>;
62
+ /**
63
+ * Accept an invitation, creating the customer tenant and its OWNER. New owner: supply ``password`` — the account is created and signed in. Existing owner: accept while signed in as ``owner_email`` (no password).
64
+ * Accept Tenant Invitation Handler
65
+ */
66
+ acceptTenantInvitation(requestParameters: AcceptTenantInvitationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AcceptTenantInvitationResponse>;
67
+ }
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { AcceptTenantInvitationRequestToJSON, AcceptTenantInvitationResponseFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class TenantInvitationsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for acceptTenantInvitation without sending the request
31
+ */
32
+ acceptTenantInvitationRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['invitationId'] == null) {
35
+ throw new runtime.RequiredError('invitationId', 'Required parameter "invitationId" was null or undefined when calling acceptTenantInvitation().');
36
+ }
37
+ if (requestParameters['acceptTenantInvitationRequest'] == null) {
38
+ throw new runtime.RequiredError('acceptTenantInvitationRequest', 'Required parameter "acceptTenantInvitationRequest" was null or undefined when calling acceptTenantInvitation().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ headerParameters['Content-Type'] = 'application/json';
43
+ let urlPath = `/v1/tenant-invitations/{invitation_id}/accept`;
44
+ urlPath = urlPath.replace(`{${"invitation_id"}}`, encodeURIComponent(String(requestParameters['invitationId'])));
45
+ return {
46
+ path: urlPath,
47
+ method: 'POST',
48
+ headers: headerParameters,
49
+ query: queryParameters,
50
+ body: AcceptTenantInvitationRequestToJSON(requestParameters['acceptTenantInvitationRequest']),
51
+ };
52
+ });
53
+ }
54
+ /**
55
+ * Accept an invitation, creating the customer tenant and its OWNER. New owner: supply ``password`` — the account is created and signed in. Existing owner: accept while signed in as ``owner_email`` (no password).
56
+ * Accept Tenant Invitation Handler
57
+ */
58
+ acceptTenantInvitationRaw(requestParameters, initOverrides) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const requestOptions = yield this.acceptTenantInvitationRequestOpts(requestParameters);
61
+ const response = yield this.request(requestOptions, initOverrides);
62
+ return new runtime.JSONApiResponse(response, (jsonValue) => AcceptTenantInvitationResponseFromJSON(jsonValue));
63
+ });
64
+ }
65
+ /**
66
+ * Accept an invitation, creating the customer tenant and its OWNER. New owner: supply ``password`` — the account is created and signed in. Existing owner: accept while signed in as ``owner_email`` (no password).
67
+ * Accept Tenant Invitation Handler
68
+ */
69
+ acceptTenantInvitation(requestParameters, initOverrides) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ const response = yield this.acceptTenantInvitationRaw(requestParameters, initOverrides);
72
+ return yield response.value();
73
+ });
74
+ }
75
+ }
@@ -125,7 +125,7 @@ export interface TenantsApiInterface {
125
125
  */
126
126
  deleteTenantRequestOpts(requestParameters: DeleteTenantRequest): Promise<runtime.RequestOpts>;
127
127
  /**
128
- * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
128
+ * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys, S3 bucket, and Qdrant vectors after the DB transaction commits.
129
129
  * @summary Delete Tenant
130
130
  * @param {string} tenantId
131
131
  * @param {*} [options] Override http request option.
@@ -134,7 +134,7 @@ export interface TenantsApiInterface {
134
134
  */
135
135
  deleteTenantRaw(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
136
136
  /**
137
- * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
137
+ * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys, S3 bucket, and Qdrant vectors after the DB transaction commits.
138
138
  * Delete Tenant
139
139
  */
140
140
  deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -395,12 +395,12 @@ export declare class TenantsApi extends runtime.BaseAPI implements TenantsApiInt
395
395
  */
396
396
  deleteTenantRequestOpts(requestParameters: DeleteTenantRequest): Promise<runtime.RequestOpts>;
397
397
  /**
398
- * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
398
+ * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys, S3 bucket, and Qdrant vectors after the DB transaction commits.
399
399
  * Delete Tenant
400
400
  */
401
401
  deleteTenantRaw(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
402
402
  /**
403
- * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
403
+ * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys, S3 bucket, and Qdrant vectors after the DB transaction commits.
404
404
  * Delete Tenant
405
405
  */
406
406
  deleteTenant(requestParameters: DeleteTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -158,7 +158,7 @@ export class TenantsApi extends runtime.BaseAPI {
158
158
  });
159
159
  }
160
160
  /**
161
- * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
161
+ * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys, S3 bucket, and Qdrant vectors after the DB transaction commits.
162
162
  * Delete Tenant
163
163
  */
164
164
  deleteTenantRaw(requestParameters, initOverrides) {
@@ -169,7 +169,7 @@ export class TenantsApi extends runtime.BaseAPI {
169
169
  });
170
170
  }
171
171
  /**
172
- * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys and S3 bucket after the DB transaction commits.
172
+ * Delete a tenant. Requires OWNER role in the tenant. Refused (409) while a provider-billed subscription is live — deleting the tenant would not stop Stripe/Ping++ from charging for it; the OWNER must downgrade to free (or let the prepay period expire) first. Deletes the tenant\'s LiteLLM team/keys, S3 bucket, and Qdrant vectors after the DB transaction commits.
173
173
  * Delete Tenant
174
174
  */
175
175
  deleteTenant(requestParameters, initOverrides) {
@@ -30,6 +30,7 @@ export * from './SubscriptionsApi';
30
30
  export * from './SystemJobsApi';
31
31
  export * from './TagsApi';
32
32
  export * from './TenantGroupsApi';
33
+ export * from './TenantInvitationsApi';
33
34
  export * from './TenantsApi';
34
35
  export * from './ThreadMessagesApi';
35
36
  export * from './ThreadsApi';
@@ -32,6 +32,7 @@ export * from './SubscriptionsApi';
32
32
  export * from './SystemJobsApi';
33
33
  export * from './TagsApi';
34
34
  export * from './TenantGroupsApi';
35
+ export * from './TenantInvitationsApi';
35
36
  export * from './TenantsApi';
36
37
  export * from './ThreadMessagesApi';
37
38
  export * from './ThreadsApi';
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
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
+ *
14
+ * @export
15
+ * @interface AcceptTenantInvitationRequest
16
+ */
17
+ export interface AcceptTenantInvitationRequest {
18
+ /**
19
+ * Required only when the owner has no existing KS account.
20
+ * @type {string}
21
+ * @memberof AcceptTenantInvitationRequest
22
+ */
23
+ password?: string | null;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AcceptTenantInvitationRequest
28
+ */
29
+ firstName?: string | null;
30
+ }
31
+ export declare const AcceptTenantInvitationRequestPropertyValidationAttributesMap: {
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 AcceptTenantInvitationRequest interface.
48
+ */
49
+ export declare function instanceOfAcceptTenantInvitationRequest(value: object): value is AcceptTenantInvitationRequest;
50
+ export declare function AcceptTenantInvitationRequestFromJSON(json: any): AcceptTenantInvitationRequest;
51
+ export declare function AcceptTenantInvitationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AcceptTenantInvitationRequest;
52
+ export declare function AcceptTenantInvitationRequestToJSON(json: any): AcceptTenantInvitationRequest;
53
+ export declare function AcceptTenantInvitationRequestToJSONTyped(value?: AcceptTenantInvitationRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
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 AcceptTenantInvitationRequestPropertyValidationAttributesMap = {
15
+ password: {
16
+ minLength: 8,
17
+ },
18
+ };
19
+ /**
20
+ * Check if a given object implements the AcceptTenantInvitationRequest interface.
21
+ */
22
+ export function instanceOfAcceptTenantInvitationRequest(value) {
23
+ return true;
24
+ }
25
+ export function AcceptTenantInvitationRequestFromJSON(json) {
26
+ return AcceptTenantInvitationRequestFromJSONTyped(json, false);
27
+ }
28
+ export function AcceptTenantInvitationRequestFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'password': json['password'] == null ? undefined : json['password'],
34
+ 'firstName': json['first_name'] == null ? undefined : json['first_name'],
35
+ };
36
+ }
37
+ export function AcceptTenantInvitationRequestToJSON(json) {
38
+ return AcceptTenantInvitationRequestToJSONTyped(json, false);
39
+ }
40
+ export function AcceptTenantInvitationRequestToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'password': value['password'],
46
+ 'first_name': value['firstName'],
47
+ };
48
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
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
+ *
14
+ * @export
15
+ * @interface AcceptTenantInvitationResponse
16
+ */
17
+ export interface AcceptTenantInvitationResponse {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AcceptTenantInvitationResponse
22
+ */
23
+ tenantId: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AcceptTenantInvitationResponse
28
+ */
29
+ tenantName: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof AcceptTenantInvitationResponse
34
+ */
35
+ userId: string;
36
+ }
37
+ export declare const AcceptTenantInvitationResponsePropertyValidationAttributesMap: {
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 AcceptTenantInvitationResponse interface.
54
+ */
55
+ export declare function instanceOfAcceptTenantInvitationResponse(value: object): value is AcceptTenantInvitationResponse;
56
+ export declare function AcceptTenantInvitationResponseFromJSON(json: any): AcceptTenantInvitationResponse;
57
+ export declare function AcceptTenantInvitationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AcceptTenantInvitationResponse;
58
+ export declare function AcceptTenantInvitationResponseToJSON(json: any): AcceptTenantInvitationResponse;
59
+ export declare function AcceptTenantInvitationResponseToJSONTyped(value?: AcceptTenantInvitationResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
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 AcceptTenantInvitationResponsePropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the AcceptTenantInvitationResponse interface.
17
+ */
18
+ export function instanceOfAcceptTenantInvitationResponse(value) {
19
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
20
+ return false;
21
+ if (!('tenantName' in value) || value['tenantName'] === undefined)
22
+ return false;
23
+ if (!('userId' in value) || value['userId'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ export function AcceptTenantInvitationResponseFromJSON(json) {
28
+ return AcceptTenantInvitationResponseFromJSONTyped(json, false);
29
+ }
30
+ export function AcceptTenantInvitationResponseFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'tenantId': json['tenant_id'],
36
+ 'tenantName': json['tenant_name'],
37
+ 'userId': json['user_id'],
38
+ };
39
+ }
40
+ export function AcceptTenantInvitationResponseToJSON(json) {
41
+ return AcceptTenantInvitationResponseToJSONTyped(json, false);
42
+ }
43
+ export function AcceptTenantInvitationResponseToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'tenant_id': value['tenantId'],
49
+ 'tenant_name': value['tenantName'],
50
+ 'user_id': value['userId'],
51
+ };
52
+ }
@@ -66,6 +66,18 @@ export interface ChunkMetadata {
66
66
  * @memberof ChunkMetadata
67
67
  */
68
68
  endMs?: number | null;
69
+ /**
70
+ * Every speaker label appearing in this chunk's segments, sorted. Lets a citation say which turn it came from. None when the provider does not diarize.
71
+ * @type {Array<number>}
72
+ * @memberof ChunkMetadata
73
+ */
74
+ speakers?: Array<number> | null;
75
+ /**
76
+ * Every language the ASR recognised across this chunk's segments, sorted. A meeting routinely code-switches, so a chunk can hold more than one; the document-level language is only the majority label and misreports a bilingual recording. None for non-media chunks and for media ingested before this field existed.
77
+ * @type {Array<string>}
78
+ * @memberof ChunkMetadata
79
+ */
80
+ languages?: Array<string> | null;
69
81
  /**
70
82
  * Per-ASR-segment spans inside this media chunk, in order, each carrying its char offset in the chunk content. Lets citation resolution narrow a chunk-level timeframe to the enclosing segment. None for non-media chunks and media ingested before this field existed.
71
83
  * @type {Array<SegmentSpan>}
@@ -37,6 +37,8 @@ export function ChunkMetadataFromJSONTyped(json, ignoreDiscriminator) {
37
37
  'secondaryTaxonomy': json['secondary_taxonomy'] == null ? undefined : ImageTaxonomyFromJSON(json['secondary_taxonomy']),
38
38
  'startMs': json['start_ms'] == null ? undefined : json['start_ms'],
39
39
  'endMs': json['end_ms'] == null ? undefined : json['end_ms'],
40
+ 'speakers': json['speakers'] == null ? undefined : json['speakers'],
41
+ 'languages': json['languages'] == null ? undefined : json['languages'],
40
42
  'segments': json['segments'] == null ? undefined : (json['segments'].map(SegmentSpanFromJSON)),
41
43
  'sheetName': json['sheet_name'] == null ? undefined : json['sheet_name'],
42
44
  'blockType': json['block_type'] == null ? undefined : json['block_type'],
@@ -65,6 +67,8 @@ export function ChunkMetadataToJSONTyped(value, ignoreDiscriminator = false) {
65
67
  'secondary_taxonomy': ImageTaxonomyToJSON(value['secondaryTaxonomy']),
66
68
  'start_ms': value['startMs'],
67
69
  'end_ms': value['endMs'],
70
+ 'speakers': value['speakers'],
71
+ 'languages': value['languages'],
68
72
  'segments': value['segments'] == null ? undefined : (value['segments'].map(SegmentSpanToJSON)),
69
73
  'sheet_name': value['sheetName'],
70
74
  'block_type': value['blockType'],
@@ -45,6 +45,24 @@ export interface CreateUploadRequest {
45
45
  * @memberof CreateUploadRequest
46
46
  */
47
47
  tagIds?: Array<string>;
48
+ /**
49
+ * Workflow run this upload belongs to; attributes the resulting document to the run in the audit log. Must be sent together with workflow_definition_id, and only by an assumed identity.
50
+ * @type {string}
51
+ * @memberof CreateUploadRequest
52
+ */
53
+ workflowRunId?: string | null;
54
+ /**
55
+ * Workflow definition for workflow_run_id.
56
+ * @type {string}
57
+ * @memberof CreateUploadRequest
58
+ */
59
+ workflowDefinitionId?: string | null;
60
+ /**
61
+ * Replay key for callers that retry (e.g. the ZIP fan-out); completing twice with the same key replays the existing document instead of creating a duplicate.
62
+ * @type {string}
63
+ * @memberof CreateUploadRequest
64
+ */
65
+ idempotencyKey?: string | null;
48
66
  }
49
67
  export declare const CreateUploadRequestPropertyValidationAttributesMap: {
50
68
  [property: string]: {
@@ -39,6 +39,9 @@ export function CreateUploadRequestFromJSONTyped(json, ignoreDiscriminator) {
39
39
  'filename': json['filename'],
40
40
  'sizeBytes': json['size_bytes'],
41
41
  'tagIds': json['tag_ids'] == null ? undefined : json['tag_ids'],
42
+ 'workflowRunId': json['workflow_run_id'] == null ? undefined : json['workflow_run_id'],
43
+ 'workflowDefinitionId': json['workflow_definition_id'] == null ? undefined : json['workflow_definition_id'],
44
+ 'idempotencyKey': json['idempotency_key'] == null ? undefined : json['idempotency_key'],
42
45
  };
43
46
  }
44
47
  export function CreateUploadRequestToJSON(json) {
@@ -54,5 +57,8 @@ export function CreateUploadRequestToJSONTyped(value, ignoreDiscriminator = fals
54
57
  'filename': value['filename'],
55
58
  'size_bytes': value['sizeBytes'],
56
59
  'tag_ids': value['tagIds'],
60
+ 'workflow_run_id': value['workflowRunId'],
61
+ 'workflow_definition_id': value['workflowDefinitionId'],
62
+ 'idempotency_key': value['idempotencyKey'],
57
63
  };
58
64
  }
@@ -12,6 +12,7 @@
12
12
  import type { PipelineState } from './PipelineState';
13
13
  import type { XlsxCellAnchorOutputOrDocxParagraphAnchorOutput } from './XlsxCellAnchorOutputOrDocxParagraphAnchorOutput';
14
14
  import type { InformationStatistics } from './InformationStatistics';
15
+ import type { EmailMetadata } from './EmailMetadata';
15
16
  /**
16
17
  * Schema for document_version.system_metadata JSONB field.
17
18
  *
@@ -111,6 +112,12 @@ export interface DocumentVersionMetadata {
111
112
  * @memberof DocumentVersionMetadata
112
113
  */
113
114
  segmentCount?: number | null;
115
+ /**
116
+ * Structured email headers; null for non-email documents
117
+ * @type {EmailMetadata}
118
+ * @memberof DocumentVersionMetadata
119
+ */
120
+ email?: EmailMetadata | null;
114
121
  /**
115
122
  * Total formula cells in the workbook (XLSX only)
116
123
  * @type {number}
@@ -14,6 +14,7 @@
14
14
  import { PipelineStateFromJSON, PipelineStateToJSON, } from './PipelineState';
15
15
  import { XlsxCellAnchorOutputOrDocxParagraphAnchorOutputFromJSON, XlsxCellAnchorOutputOrDocxParagraphAnchorOutputToJSON, } from './XlsxCellAnchorOutputOrDocxParagraphAnchorOutput';
16
16
  import { InformationStatisticsFromJSON, InformationStatisticsToJSON, } from './InformationStatistics';
17
+ import { EmailMetadataFromJSON, EmailMetadataToJSON, } from './EmailMetadata';
17
18
  export const DocumentVersionMetadataPropertyValidationAttributesMap = {};
18
19
  /**
19
20
  * Check if a given object implements the DocumentVersionMetadata interface.
@@ -43,6 +44,7 @@ export function DocumentVersionMetadataFromJSONTyped(json, ignoreDiscriminator)
43
44
  'durationMs': json['duration_ms'] == null ? undefined : json['duration_ms'],
44
45
  'language': json['language'] == null ? undefined : json['language'],
45
46
  'segmentCount': json['segment_count'] == null ? undefined : json['segment_count'],
47
+ 'email': json['email'] == null ? undefined : EmailMetadataFromJSON(json['email']),
46
48
  'totalFormulas': json['total_formulas'] == null ? undefined : json['total_formulas'],
47
49
  'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
48
50
  'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
@@ -79,6 +81,7 @@ export function DocumentVersionMetadataToJSONTyped(value, ignoreDiscriminator =
79
81
  'duration_ms': value['durationMs'],
80
82
  'language': value['language'],
81
83
  'segment_count': value['segmentCount'],
84
+ 'email': EmailMetadataToJSON(value['email']),
82
85
  'total_formulas': value['totalFormulas'],
83
86
  'xlsx_parse_result_s3': value['xlsxParseResultS3'],
84
87
  'xlsx_named_ranges': value['xlsxNamedRanges'],
@@ -12,6 +12,7 @@
12
12
  import type { PipelineState } from './PipelineState';
13
13
  import type { XlsxCellAnchorInputOrDocxParagraphAnchorInput } from './XlsxCellAnchorInputOrDocxParagraphAnchorInput';
14
14
  import type { InformationStatistics } from './InformationStatistics';
15
+ import type { EmailMetadata } from './EmailMetadata';
15
16
  /**
16
17
  * Partial update schema for document version metadata.
17
18
  *
@@ -123,6 +124,12 @@ export interface DocumentVersionMetadataUpdate {
123
124
  * @memberof DocumentVersionMetadataUpdate
124
125
  */
125
126
  segmentCount?: number | null;
127
+ /**
128
+ *
129
+ * @type {EmailMetadata}
130
+ * @memberof DocumentVersionMetadataUpdate
131
+ */
132
+ email?: EmailMetadata | null;
126
133
  /**
127
134
  *
128
135
  * @type {number}
@@ -14,6 +14,7 @@
14
14
  import { PipelineStateFromJSON, PipelineStateToJSON, } from './PipelineState';
15
15
  import { XlsxCellAnchorInputOrDocxParagraphAnchorInputFromJSON, XlsxCellAnchorInputOrDocxParagraphAnchorInputToJSON, } from './XlsxCellAnchorInputOrDocxParagraphAnchorInput';
16
16
  import { InformationStatisticsFromJSON, InformationStatisticsToJSON, } from './InformationStatistics';
17
+ import { EmailMetadataFromJSON, EmailMetadataToJSON, } from './EmailMetadata';
17
18
  export const DocumentVersionMetadataUpdatePropertyValidationAttributesMap = {};
18
19
  /**
19
20
  * Check if a given object implements the DocumentVersionMetadataUpdate interface.
@@ -46,6 +47,7 @@ export function DocumentVersionMetadataUpdateFromJSONTyped(json, ignoreDiscrimin
46
47
  'durationMs': json['duration_ms'] == null ? undefined : json['duration_ms'],
47
48
  'language': json['language'] == null ? undefined : json['language'],
48
49
  'segmentCount': json['segment_count'] == null ? undefined : json['segment_count'],
50
+ 'email': json['email'] == null ? undefined : EmailMetadataFromJSON(json['email']),
49
51
  'totalFormulas': json['total_formulas'] == null ? undefined : json['total_formulas'],
50
52
  'xlsxParseResultS3': json['xlsx_parse_result_s3'] == null ? undefined : json['xlsx_parse_result_s3'],
51
53
  'xlsxNamedRanges': json['xlsx_named_ranges'] == null ? undefined : json['xlsx_named_ranges'],
@@ -84,6 +86,7 @@ export function DocumentVersionMetadataUpdateToJSONTyped(value, ignoreDiscrimina
84
86
  'duration_ms': value['durationMs'],
85
87
  'language': value['language'],
86
88
  'segment_count': value['segmentCount'],
89
+ 'email': EmailMetadataToJSON(value['email']),
87
90
  'total_formulas': value['totalFormulas'],
88
91
  'xlsx_parse_result_s3': value['xlsxParseResultS3'],
89
92
  'xlsx_named_ranges': value['xlsxNamedRanges'],