@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
@@ -12,8 +12,9 @@
12
12
  /**
13
13
  * One ASR segment's span inside a media chunk (media chunks only).
14
14
  *
15
- * Field names are deliberately compact — a media document stores hundreds
16
- * of chunks x up to ~15 spans each in ``chunk_metadata`` JSONB.
15
+ * Field names are deliberately compact — a media document stores hundreds of
16
+ * chunks x tens of spans each in ``chunk_metadata`` JSONB. Measured worst
17
+ * case is a 4-hour Mandarin recording: 175 chunks x ~33 spans, ~190 KB total.
17
18
  * @export
18
19
  * @interface SegmentSpan
19
20
  */
@@ -36,6 +37,12 @@ export interface SegmentSpan {
36
37
  * @memberof SegmentSpan
37
38
  */
38
39
  c: number;
40
+ /**
41
+ * Speaker label for this segment, 0-indexed within the recording. It identifies turns, not people — there is no voiceprint enrollment, so label 0 in one meeting is unrelated to label 0 in another. None when the ASR provider does not diarize.
42
+ * @type {number}
43
+ * @memberof SegmentSpan
44
+ */
45
+ k?: number | null;
39
46
  }
40
47
  export declare const SegmentSpanPropertyValidationAttributesMap: {
41
48
  [property: string]: {
@@ -43,6 +43,7 @@ function SegmentSpanFromJSONTyped(json, ignoreDiscriminator) {
43
43
  's': json['s'],
44
44
  'e': json['e'],
45
45
  'c': json['c'],
46
+ 'k': json['k'] == null ? undefined : json['k'],
46
47
  };
47
48
  }
48
49
  function SegmentSpanToJSON(json) {
@@ -56,5 +57,6 @@ function SegmentSpanToJSONTyped(value, ignoreDiscriminator = false) {
56
57
  's': value['s'],
57
58
  'e': value['e'],
58
59
  'c': value['c'],
60
+ 'k': value['k'],
59
61
  };
60
62
  }
@@ -1,5 +1,7 @@
1
1
  export * from './AcceptDisclaimerRequest';
2
2
  export * from './AcceptInviteResponse';
3
+ export * from './AcceptTenantInvitationRequest';
4
+ export * from './AcceptTenantInvitationResponse';
3
5
  export * from './AccessCheckResponse';
4
6
  export * from './ActivateSkillVersionRequest';
5
7
  export * from './AddMemberRequest';
@@ -127,6 +129,8 @@ export * from './DocxParagraphAnchorInput';
127
129
  export * from './DocxParagraphAnchorOutput';
128
130
  export * from './DownloadArtifact';
129
131
  export * from './EditMemoryChunkRequest';
132
+ export * from './EmailMetadata';
133
+ export * from './EmailParty';
130
134
  export * from './EmailSentResponse';
131
135
  export * from './EmailVerificationRequest';
132
136
  export * from './EnrichedCitation';
@@ -18,6 +18,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./AcceptDisclaimerRequest"), exports);
20
20
  __exportStar(require("./AcceptInviteResponse"), exports);
21
+ __exportStar(require("./AcceptTenantInvitationRequest"), exports);
22
+ __exportStar(require("./AcceptTenantInvitationResponse"), exports);
21
23
  __exportStar(require("./AccessCheckResponse"), exports);
22
24
  __exportStar(require("./ActivateSkillVersionRequest"), exports);
23
25
  __exportStar(require("./AddMemberRequest"), exports);
@@ -145,6 +147,8 @@ __exportStar(require("./DocxParagraphAnchorInput"), exports);
145
147
  __exportStar(require("./DocxParagraphAnchorOutput"), exports);
146
148
  __exportStar(require("./DownloadArtifact"), exports);
147
149
  __exportStar(require("./EditMemoryChunkRequest"), exports);
150
+ __exportStar(require("./EmailMetadata"), exports);
151
+ __exportStar(require("./EmailParty"), exports);
148
152
  __exportStar(require("./EmailSentResponse"), exports);
149
153
  __exportStar(require("./EmailVerificationRequest"), exports);
150
154
  __exportStar(require("./EnrichedCitation"), exports);
@@ -0,0 +1,36 @@
1
+
2
+ # AcceptTenantInvitationRequest
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `password` | string
10
+ `firstName` | string
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { AcceptTenantInvitationRequest } from '@knowledge-stack/ksapi'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "password": null,
20
+ "firstName": null,
21
+ } satisfies AcceptTenantInvitationRequest
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as AcceptTenantInvitationRequest
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,38 @@
1
+
2
+ # AcceptTenantInvitationResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `tenantId` | string
10
+ `tenantName` | string
11
+ `userId` | string
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { AcceptTenantInvitationResponse } from '@knowledge-stack/ksapi'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "tenantId": null,
21
+ "tenantName": null,
22
+ "userId": null,
23
+ } satisfies AcceptTenantInvitationResponse
24
+
25
+ console.log(example)
26
+
27
+ // Convert the instance to a JSON string
28
+ const exampleJSON: string = JSON.stringify(example)
29
+ console.log(exampleJSON)
30
+
31
+ // Parse the JSON string back to an object
32
+ const exampleParsed = JSON.parse(exampleJSON) as AcceptTenantInvitationResponse
33
+ console.log(exampleParsed)
34
+ ```
35
+
36
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
37
+
38
+
@@ -15,6 +15,8 @@ Name | Type
15
15
  `secondaryTaxonomy` | [ImageTaxonomy](ImageTaxonomy.md)
16
16
  `startMs` | number
17
17
  `endMs` | number
18
+ `speakers` | Array<number>
19
+ `languages` | Array<string>
18
20
  `segments` | [Array<SegmentSpan>](SegmentSpan.md)
19
21
  `sheetName` | string
20
22
  `blockType` | string
@@ -41,6 +43,8 @@ const example = {
41
43
  "secondaryTaxonomy": null,
42
44
  "startMs": null,
43
45
  "endMs": null,
46
+ "speakers": null,
47
+ "languages": null,
44
48
  "segments": null,
45
49
  "sheetName": null,
46
50
  "blockType": null,
@@ -12,6 +12,9 @@ Name | Type
12
12
  `filename` | string
13
13
  `sizeBytes` | number
14
14
  `tagIds` | Array<string>
15
+ `workflowRunId` | string
16
+ `workflowDefinitionId` | string
17
+ `idempotencyKey` | string
15
18
 
16
19
  ## Example
17
20
 
@@ -25,6 +28,9 @@ const example = {
25
28
  "filename": null,
26
29
  "sizeBytes": null,
27
30
  "tagIds": null,
31
+ "workflowRunId": null,
32
+ "workflowDefinitionId": null,
33
+ "idempotencyKey": null,
28
34
  } satisfies CreateUploadRequest
29
35
 
30
36
  console.log(example)
@@ -21,6 +21,7 @@ Name | Type
21
21
  `durationMs` | number
22
22
  `language` | string
23
23
  `segmentCount` | number
24
+ `email` | [EmailMetadata](EmailMetadata.md)
24
25
  `totalFormulas` | number
25
26
  `xlsxParseResultS3` | string
26
27
  `xlsxNamedRanges` | Array<{ [key: string]: any; }>
@@ -55,6 +56,7 @@ const example = {
55
56
  "durationMs": null,
56
57
  "language": null,
57
58
  "segmentCount": null,
59
+ "email": null,
58
60
  "totalFormulas": null,
59
61
  "xlsxParseResultS3": null,
60
62
  "xlsxNamedRanges": null,
@@ -24,6 +24,7 @@ Name | Type
24
24
  `durationMs` | number
25
25
  `language` | string
26
26
  `segmentCount` | number
27
+ `email` | [EmailMetadata](EmailMetadata.md)
27
28
  `totalFormulas` | number
28
29
  `xlsxParseResultS3` | string
29
30
  `xlsxNamedRanges` | Array<{ [key: string]: any; }>
@@ -60,6 +61,7 @@ const example = {
60
61
  "durationMs": null,
61
62
  "language": null,
62
63
  "segmentCount": null,
64
+ "email": null,
63
65
  "totalFormulas": null,
64
66
  "xlsxParseResultS3": null,
65
67
  "xlsxNamedRanges": null,
@@ -627,7 +627,7 @@ example().catch(console.error);
627
627
 
628
628
  ## ingestDocument
629
629
 
630
- > IngestDocumentResponse ingestDocument(file, pathPartId, name, tagIds, idempotencyKey, ingestionMode, chunkType, secondaryTaxonomy, pageDpi, workflowRunId, workflowDefinitionId)
630
+ > IngestDocumentResponse ingestDocument(file, pathPartId, name, tagIds, idempotencyKey, emailNestingDepth, ingestionMode, chunkType, secondaryTaxonomy, pageDpi, workflowRunId, workflowDefinitionId)
631
631
 
632
632
  Ingest Document Handler
633
633
 
@@ -663,6 +663,8 @@ async function example() {
663
663
  tagIds: ...,
664
664
  // string | Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409. (optional)
665
665
  idempotencyKey: idempotencyKey_example,
666
+ // number | Internal: set by the email member fan-out when a nested email re-enters this endpoint. Leave at 0 for direct uploads. (optional)
667
+ emailNestingDepth: 56,
666
668
  // IngestionMode (optional)
667
669
  ingestionMode: ...,
668
670
  // ChunkType (optional)
@@ -699,9 +701,10 @@ example().catch(console.error);
699
701
  | **name** | `string` | Document name (defaults to filename) | [Optional] [Defaults to `undefined`] |
700
702
  | **tagIds** | `Array<string>` | Tag IDs applied to the created document. | [Optional] |
701
703
  | **idempotencyKey** | `string` | Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409. | [Optional] [Defaults to `undefined`] |
704
+ | **emailNestingDepth** | `number` | Internal: set by the email member fan-out when a nested email re-enters this endpoint. Leave at 0 for direct uploads. | [Optional] [Defaults to `0`] |
702
705
  | **ingestionMode** | `IngestionMode` | | [Optional] [Defaults to `undefined`] [Enum: high_accuracy, standard, single_chunk, media] |
703
706
  | **chunkType** | `ChunkType` | | [Optional] [Defaults to `undefined`] [Enum: TEXT, TABLE, IMAGE, HTML, UNKNOWN] |
704
- | **secondaryTaxonomy** | `ImageTaxonomy` | | [Optional] [Defaults to `undefined`] [Enum: picture, flowchart] |
707
+ | **secondaryTaxonomy** | `ImageTaxonomy` | | [Optional] [Defaults to `undefined`] [Enum: picture, slide, flowchart] |
705
708
  | **pageDpi** | `number` | DPI for PDF page screenshots (default 72, min 36, max 216). | [Optional] [Defaults to `72`] |
706
709
  | **workflowRunId** | `string` | Workflow run context for assumed agent uploads. | [Optional] [Defaults to `undefined`] |
707
710
  | **workflowDefinitionId** | `string` | Workflow definition context for assumed agent uploads. | [Optional] [Defaults to `undefined`] |
@@ -797,7 +800,7 @@ example().catch(console.error);
797
800
  | **file** | `Blob` | | [Defaults to `undefined`] |
798
801
  | **ingestionMode** | `IngestionMode` | | [Optional] [Defaults to `undefined`] [Enum: high_accuracy, standard, single_chunk, media] |
799
802
  | **chunkType** | `ChunkType` | | [Optional] [Defaults to `undefined`] [Enum: TEXT, TABLE, IMAGE, HTML, UNKNOWN] |
800
- | **secondaryTaxonomy** | `ImageTaxonomy` | | [Optional] [Defaults to `undefined`] [Enum: picture, flowchart] |
803
+ | **secondaryTaxonomy** | `ImageTaxonomy` | | [Optional] [Defaults to `undefined`] [Enum: picture, slide, flowchart] |
801
804
  | **pageDpi** | `number` | DPI for PDF page screenshots (default 72, min 36, max 216). | [Optional] [Defaults to `72`] |
802
805
  | **workflowRunId** | `string` | Workflow run context for assumed agent uploads. | [Optional] [Defaults to `undefined`] |
803
806
  | **workflowDefinitionId** | `string` | Workflow definition context for assumed agent uploads. | [Optional] [Defaults to `undefined`] |
@@ -912,7 +915,7 @@ example().catch(console.error);
912
915
 
913
916
  ## listDocuments
914
917
 
915
- > PaginatedResponseDocumentResponse listDocuments(parentPathPartId, sortOrder, sortDir, ownerId, documentType, withTags, limit, offset, createdAfter, createdBefore, updatedAfter, updatedBefore)
918
+ > PaginatedResponseDocumentResponse listDocuments(parentPathPartId, sortOrder, sortDir, ownerId, documentType, durationMinMs, durationMaxMs, withTags, limit, offset, createdAfter, createdBefore, updatedAfter, updatedBefore)
916
919
 
917
920
  List Documents Handler
918
921
 
@@ -948,6 +951,10 @@ async function example() {
948
951
  ownerId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
949
952
  // DocumentType | Filter to documents of this type (optional)
950
953
  documentType: ...,
954
+ // number | Only media whose active version is at least this long (milliseconds). Non-media documents have no duration and are excluded. (optional)
955
+ durationMinMs: 56,
956
+ // number | Only media whose active version is at most this long. (optional)
957
+ durationMaxMs: 56,
951
958
  // boolean | Include tags in the response (default: false) (optional)
952
959
  withTags: true,
953
960
  // number | Number of items per page (optional)
@@ -986,6 +993,8 @@ example().catch(console.error);
986
993
  | **sortDir** | `SortDirection` | Sort direction; overrides the column\&#39;s natural default | [Optional] [Defaults to `undefined`] [Enum: ASC, DESC] |
987
994
  | **ownerId** | `string` | Filter to documents owned by this user | [Optional] [Defaults to `undefined`] |
988
995
  | **documentType** | `DocumentType` | Filter to documents of this type | [Optional] [Defaults to `undefined`] [Enum: PDF, DOCX, PLAINTEXT, IMAGE, XLSX, CSV, PPTX, JSON, YAML, CODE, AUDIO, VIDEO, EMAIL, UNKNOWN] |
996
+ | **durationMinMs** | `number` | Only media whose active version is at least this long (milliseconds). Non-media documents have no duration and are excluded. | [Optional] [Defaults to `undefined`] |
997
+ | **durationMaxMs** | `number` | Only media whose active version is at most this long. | [Optional] [Defaults to `undefined`] |
989
998
  | **withTags** | `boolean` | Include tags in the response (default: false) | [Optional] [Defaults to `false`] |
990
999
  | **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
991
1000
  | **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
@@ -0,0 +1,57 @@
1
+
2
+ # EmailMetadata
3
+
4
+ Structured headers of an ingested email (EMAIL document type only). Populated by ``document_preparation_activity`` from the same parse that renders the message body, so the stored metadata and the rendered document cannot disagree. Null on a multi-message archive: its messages are ingested as their own documents, and each carries its own block.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `subject` | string
11
+ `sender` | [EmailParty](EmailParty.md)
12
+ `to` | [Array&lt;EmailParty&gt;](EmailParty.md)
13
+ `cc` | [Array&lt;EmailParty&gt;](EmailParty.md)
14
+ `bcc` | [Array&lt;EmailParty&gt;](EmailParty.md)
15
+ `sentAt` | string
16
+ `messageId` | string
17
+ `inReplyTo` | string
18
+ `references` | Array&lt;string&gt;
19
+ `conversationTopic` | string
20
+ `threadRootId` | string
21
+ `rawHeaders` | string
22
+
23
+ ## Example
24
+
25
+ ```typescript
26
+ import type { EmailMetadata } from '@knowledge-stack/ksapi'
27
+
28
+ // TODO: Update the object below with actual values
29
+ const example = {
30
+ "subject": null,
31
+ "sender": null,
32
+ "to": null,
33
+ "cc": null,
34
+ "bcc": null,
35
+ "sentAt": null,
36
+ "messageId": null,
37
+ "inReplyTo": null,
38
+ "references": null,
39
+ "conversationTopic": null,
40
+ "threadRootId": null,
41
+ "rawHeaders": null,
42
+ } satisfies EmailMetadata
43
+
44
+ console.log(example)
45
+
46
+ // Convert the instance to a JSON string
47
+ const exampleJSON: string = JSON.stringify(example)
48
+ console.log(exampleJSON)
49
+
50
+ // Parse the JSON string back to an object
51
+ const exampleParsed = JSON.parse(exampleJSON) as EmailMetadata
52
+ console.log(exampleParsed)
53
+ ```
54
+
55
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
56
+
57
+
@@ -0,0 +1,37 @@
1
+
2
+ # EmailParty
3
+
4
+ One email participant.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `name` | string
11
+ `address` | string
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { EmailParty } from '@knowledge-stack/ksapi'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "name": null,
21
+ "address": null,
22
+ } satisfies EmailParty
23
+
24
+ console.log(example)
25
+
26
+ // Convert the instance to a JSON string
27
+ const exampleJSON: string = JSON.stringify(example)
28
+ console.log(exampleJSON)
29
+
30
+ // Parse the JSON string back to an object
31
+ const exampleParsed = JSON.parse(exampleJSON) as EmailParty
32
+ console.log(exampleParsed)
33
+ ```
34
+
35
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
36
+
37
+
@@ -12,6 +12,7 @@ Name | Type
12
12
  `kind` | string
13
13
  `ts` | Date
14
14
  `actorUserId` | string
15
+ `actorOnBehalfOf` | string
15
16
  `payload` | { [key: string]: any; }
16
17
  `actor` | [UserInfo](UserInfo.md)
17
18
  `subjectName` | string
@@ -32,6 +33,7 @@ const example = {
32
33
  "kind": null,
33
34
  "ts": null,
34
35
  "actorUserId": null,
36
+ "actorOnBehalfOf": null,
35
37
  "payload": null,
36
38
  "actor": null,
37
39
  "subjectName": null,
@@ -10,6 +10,9 @@ Name | Type
10
10
  `workflowId` | string
11
11
  `documentId` | string
12
12
  `documentVersionId` | string
13
+ `folderId` | string
14
+ `attachmentCount` | number
15
+ `attachmentWorkflowId` | string
13
16
 
14
17
  ## Example
15
18
 
@@ -21,6 +24,9 @@ const example = {
21
24
  "workflowId": null,
22
25
  "documentId": null,
23
26
  "documentVersionId": null,
27
+ "folderId": null,
28
+ "attachmentCount": null,
29
+ "attachmentWorkflowId": null,
24
30
  } satisfies IngestDocumentResponse
25
31
 
26
32
  console.log(example)
@@ -1,7 +1,7 @@
1
1
 
2
2
  # SegmentSpan
3
3
 
4
- One ASR segment\'s span inside a media chunk (media chunks only). Field names are deliberately compact — a media document stores hundreds of chunks x up to ~15 spans each in ``chunk_metadata`` JSONB.
4
+ One ASR segment\'s span inside a media chunk (media chunks only). Field names are deliberately compact — a media document stores hundreds of chunks x tens of spans each in ``chunk_metadata`` JSONB. Measured worst case is a 4-hour Mandarin recording: 175 chunks x ~33 spans, ~190 KB total.
5
5
 
6
6
  ## Properties
7
7
 
@@ -10,6 +10,7 @@ Name | Type
10
10
  `s` | number
11
11
  `e` | number
12
12
  `c` | number
13
+ `k` | number
13
14
 
14
15
  ## Example
15
16
 
@@ -21,6 +22,7 @@ const example = {
21
22
  "s": null,
22
23
  "e": null,
23
24
  "c": null,
25
+ "k": null,
24
26
  } satisfies SegmentSpan
25
27
 
26
28
  console.log(example)
@@ -319,7 +319,7 @@ example().catch(console.error);
319
319
 
320
320
  Get Zip Ingestion Status Handler
321
321
 
322
- Get a ZIP fan-out\&#39;s live status + per-member outcomes. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\&#39;s &#x60;&#x60;results&#x60;&#x60; query (served from retained history), so once Temporal retention expires this 404s.
322
+ Get a fan-out\&#39;s live status + per-member outcomes. Serves both container fan-outs: a ZIP archive\&#39;s members and an email\&#39;s attachments. Both expose the same &#x60;&#x60;results&#x60;&#x60; query, so one endpoint covers them rather than duplicating the tenant check and hydration. Tenant-scoped via the TenantId search attribute (no per-path can_read check — intentionally consistent with the sibling generic Temporal endpoints below; the opaque workflow_id is only handed to the uploader, who had can_write on the target). The per-member results come from the workflow\&#39;s &#x60;&#x60;results&#x60;&#x60; query (served from retained history), so once Temporal retention expires this 404s.
323
323
 
324
324
  ### Example
325
325
 
@@ -0,0 +1,85 @@
1
+ # TenantInvitationsApi
2
+
3
+ All URIs are relative to *http://localhost:8000*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**acceptTenantInvitation**](TenantInvitationsApi.md#accepttenantinvitationoperation) | **POST** /v1/tenant-invitations/{invitation_id}/accept | Accept Tenant Invitation Handler |
8
+
9
+
10
+
11
+ ## acceptTenantInvitation
12
+
13
+ > AcceptTenantInvitationResponse acceptTenantInvitation(invitationId, acceptTenantInvitationRequest)
14
+
15
+ Accept Tenant Invitation Handler
16
+
17
+ Accept an invitation, creating the customer tenant and its OWNER. New owner: supply &#x60;&#x60;password&#x60;&#x60; — the account is created and signed in. Existing owner: accept while signed in as &#x60;&#x60;owner_email&#x60;&#x60; (no password).
18
+
19
+ ### Example
20
+
21
+ ```ts
22
+ import {
23
+ Configuration,
24
+ TenantInvitationsApi,
25
+ } from '@knowledge-stack/ksapi';
26
+ import type { AcceptTenantInvitationOperationRequest } from '@knowledge-stack/ksapi';
27
+
28
+ async function example() {
29
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
30
+ const config = new Configuration({
31
+ // To configure API key authorization: cookieAuth
32
+ apiKey: "YOUR API KEY",
33
+ });
34
+ const api = new TenantInvitationsApi(config);
35
+
36
+ const body = {
37
+ // string
38
+ invitationId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
39
+ // AcceptTenantInvitationRequest
40
+ acceptTenantInvitationRequest: ...,
41
+ } satisfies AcceptTenantInvitationOperationRequest;
42
+
43
+ try {
44
+ const data = await api.acceptTenantInvitation(body);
45
+ console.log(data);
46
+ } catch (error) {
47
+ console.error(error);
48
+ }
49
+ }
50
+
51
+ // Run the test
52
+ example().catch(console.error);
53
+ ```
54
+
55
+ ### Parameters
56
+
57
+
58
+ | Name | Type | Description | Notes |
59
+ |------------- | ------------- | ------------- | -------------|
60
+ | **invitationId** | `string` | | [Defaults to `undefined`] |
61
+ | **acceptTenantInvitationRequest** | [AcceptTenantInvitationRequest](AcceptTenantInvitationRequest.md) | | |
62
+
63
+ ### Return type
64
+
65
+ [**AcceptTenantInvitationResponse**](AcceptTenantInvitationResponse.md)
66
+
67
+ ### Authorization
68
+
69
+ [cookieAuth](../README.md#cookieAuth)
70
+
71
+ ### HTTP request headers
72
+
73
+ - **Content-Type**: `application/json`
74
+ - **Accept**: `application/json`
75
+
76
+
77
+ ### HTTP response details
78
+ | Status code | Description | Response headers |
79
+ |-------------|-------------|------------------|
80
+ | **200** | Successful Response | - |
81
+ | **422** | Validation Error | - |
82
+ | **0** | Error response. | - |
83
+
84
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
85
+
@@ -181,7 +181,7 @@ example().catch(console.error);
181
181
 
182
182
  Delete Tenant
183
183
 
184
- 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\&#39;s LiteLLM team/keys and S3 bucket after the DB transaction commits.
184
+ 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\&#39;s LiteLLM team/keys, S3 bucket, and Qdrant vectors after the DB transaction commits.
185
185
 
186
186
  ### Example
187
187
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "2.4.3",
3
+ "version": "2.6.0",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -122,6 +122,7 @@ export interface IngestDocumentRequest {
122
122
  name?: string | null;
123
123
  tagIds?: Array<string>;
124
124
  idempotencyKey?: string | null;
125
+ emailNestingDepth?: number;
125
126
  ingestionMode?: IngestionMode;
126
127
  chunkType?: ChunkType;
127
128
  secondaryTaxonomy?: ImageTaxonomy;
@@ -154,6 +155,8 @@ export interface ListDocumentsRequest {
154
155
  sortDir?: SortDirection;
155
156
  ownerId?: string | null;
156
157
  documentType?: DocumentType;
158
+ durationMinMs?: number | null;
159
+ durationMaxMs?: number | null;
157
160
  withTags?: boolean;
158
161
  limit?: number;
159
162
  offset?: number;
@@ -383,6 +386,7 @@ export interface DocumentsApiInterface {
383
386
  * @param {string} [name] Document name (defaults to filename)
384
387
  * @param {Array<string>} [tagIds] Tag IDs applied to the created document.
385
388
  * @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
389
+ * @param {number} [emailNestingDepth] Internal: set by the email member fan-out when a nested email re-enters this endpoint. Leave at 0 for direct uploads.
386
390
  * @param {IngestionMode} [ingestionMode]
387
391
  * @param {ChunkType} [chunkType]
388
392
  * @param {ImageTaxonomy} [secondaryTaxonomy]
@@ -402,6 +406,7 @@ export interface DocumentsApiInterface {
402
406
  * @param {string} [name] Document name (defaults to filename)
403
407
  * @param {Array<string>} [tagIds] Tag IDs applied to the created document.
404
408
  * @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
409
+ * @param {number} [emailNestingDepth] Internal: set by the email member fan-out when a nested email re-enters this endpoint. Leave at 0 for direct uploads.
405
410
  * @param {IngestionMode} [ingestionMode]
406
411
  * @param {ChunkType} [chunkType]
407
412
  * @param {ImageTaxonomy} [secondaryTaxonomy]
@@ -495,6 +500,8 @@ export interface DocumentsApiInterface {
495
500
  * @param {SortDirection} [sortDir] Sort direction; overrides the column\&#39;s natural default
496
501
  * @param {string} [ownerId] Filter to documents owned by this user
497
502
  * @param {DocumentType} [documentType] Filter to documents of this type
503
+ * @param {number} [durationMinMs] Only media whose active version is at least this long (milliseconds). Non-media documents have no duration and are excluded.
504
+ * @param {number} [durationMaxMs] Only media whose active version is at most this long.
498
505
  * @param {boolean} [withTags] Include tags in the response (default: false)
499
506
  * @param {number} [limit] Number of items per page
500
507
  * @param {number} [offset] Number of items to skip
@@ -515,6 +522,8 @@ export interface DocumentsApiInterface {
515
522
  * @param {SortDirection} [sortDir] Sort direction; overrides the column\&#39;s natural default
516
523
  * @param {string} [ownerId] Filter to documents owned by this user
517
524
  * @param {DocumentType} [documentType] Filter to documents of this type
525
+ * @param {number} [durationMinMs] Only media whose active version is at least this long (milliseconds). Non-media documents have no duration and are excluded.
526
+ * @param {number} [durationMaxMs] Only media whose active version is at most this long.
518
527
  * @param {boolean} [withTags] Include tags in the response (default: false)
519
528
  * @param {number} [limit] Number of items per page
520
529
  * @param {number} [offset] Number of items to skip
@@ -1117,6 +1126,10 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
1117
1126
  formParams.append('idempotency_key', requestParameters['idempotencyKey'] as any);
1118
1127
  }
1119
1128
 
1129
+ if (requestParameters['emailNestingDepth'] != null) {
1130
+ formParams.append('email_nesting_depth', requestParameters['emailNestingDepth'] as any);
1131
+ }
1132
+
1120
1133
  if (requestParameters['ingestionMode'] != null) {
1121
1134
  formParams.append('ingestion_mode', requestParameters['ingestionMode'] as any);
1122
1135
  }
@@ -1400,6 +1413,14 @@ export class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterfa
1400
1413
  queryParameters['document_type'] = requestParameters['documentType'];
1401
1414
  }
1402
1415
 
1416
+ if (requestParameters['durationMinMs'] != null) {
1417
+ queryParameters['duration_min_ms'] = requestParameters['durationMinMs'];
1418
+ }
1419
+
1420
+ if (requestParameters['durationMaxMs'] != null) {
1421
+ queryParameters['duration_max_ms'] = requestParameters['durationMaxMs'];
1422
+ }
1423
+
1403
1424
  if (requestParameters['withTags'] != null) {
1404
1425
  queryParameters['with_tags'] = requestParameters['withTags'];
1405
1426
  }