@knowledge-stack/ksapi 1.84.0 → 1.85.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.
- package/.openapi-generator/FILES +4 -0
- package/README.md +6 -2
- package/dist/apis/DocumentCheckoutApi.d.ts +158 -0
- package/dist/apis/DocumentCheckoutApi.js +197 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/DocumentCheckoutApi.d.ts +158 -0
- package/dist/esm/apis/DocumentCheckoutApi.js +160 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/DocumentCheckoutResponse.d.ts +65 -0
- package/dist/esm/models/DocumentCheckoutResponse.js +56 -0
- package/dist/esm/models/DocumentResponse.d.ts +7 -0
- package/dist/esm/models/DocumentResponse.js +3 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/DocumentCheckoutResponse.d.ts +65 -0
- package/dist/models/DocumentCheckoutResponse.js +64 -0
- package/dist/models/DocumentResponse.d.ts +7 -0
- package/dist/models/DocumentResponse.js +3 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/DocumentCheckoutApi.md +233 -0
- package/docs/DocumentCheckoutResponse.md +41 -0
- package/docs/DocumentResponse.md +2 -0
- package/docs/FolderResponseOrDocumentResponse.md +2 -0
- package/package.json +1 -1
- package/src/apis/DocumentCheckoutApi.ts +296 -0
- package/src/apis/index.ts +1 -0
- package/src/models/DocumentCheckoutResponse.ts +110 -0
- package/src/models/DocumentResponse.ts +15 -0
- package/src/models/index.ts +1 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Active checkout state on a document.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DocumentCheckoutResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface DocumentCheckoutResponse {
|
|
22
|
+
/**
|
|
23
|
+
* Tenant ID
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof DocumentCheckoutResponse
|
|
26
|
+
*/
|
|
27
|
+
tenantId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Document's PathPart ID
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof DocumentCheckoutResponse
|
|
32
|
+
*/
|
|
33
|
+
pathPartId: string;
|
|
34
|
+
/**
|
|
35
|
+
* User who holds the checkout
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof DocumentCheckoutResponse
|
|
38
|
+
*/
|
|
39
|
+
userId: string;
|
|
40
|
+
/**
|
|
41
|
+
* When the checkout was acquired
|
|
42
|
+
* @type {Date}
|
|
43
|
+
* @memberof DocumentCheckoutResponse
|
|
44
|
+
*/
|
|
45
|
+
acquiredAt: Date;
|
|
46
|
+
}
|
|
47
|
+
export const DocumentCheckoutResponsePropertyValidationAttributesMap: {
|
|
48
|
+
[property: string]: {
|
|
49
|
+
maxLength?: number,
|
|
50
|
+
minLength?: number,
|
|
51
|
+
pattern?: string,
|
|
52
|
+
maximum?: number,
|
|
53
|
+
exclusiveMaximum?: boolean,
|
|
54
|
+
minimum?: number,
|
|
55
|
+
exclusiveMinimum?: boolean,
|
|
56
|
+
multipleOf?: number,
|
|
57
|
+
maxItems?: number,
|
|
58
|
+
minItems?: number,
|
|
59
|
+
uniqueItems?: boolean
|
|
60
|
+
}
|
|
61
|
+
} = {
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Check if a given object implements the DocumentCheckoutResponse interface.
|
|
67
|
+
*/
|
|
68
|
+
export function instanceOfDocumentCheckoutResponse(value: object): value is DocumentCheckoutResponse {
|
|
69
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
|
|
70
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
|
|
71
|
+
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
72
|
+
if (!('acquiredAt' in value) || value['acquiredAt'] === undefined) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function DocumentCheckoutResponseFromJSON(json: any): DocumentCheckoutResponse {
|
|
77
|
+
return DocumentCheckoutResponseFromJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function DocumentCheckoutResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DocumentCheckoutResponse {
|
|
81
|
+
if (json == null) {
|
|
82
|
+
return json;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'tenantId': json['tenant_id'],
|
|
87
|
+
'pathPartId': json['path_part_id'],
|
|
88
|
+
'userId': json['user_id'],
|
|
89
|
+
'acquiredAt': (new Date(json['acquired_at'])),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function DocumentCheckoutResponseToJSON(json: any): DocumentCheckoutResponse {
|
|
94
|
+
return DocumentCheckoutResponseToJSONTyped(json, false);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function DocumentCheckoutResponseToJSONTyped(value?: DocumentCheckoutResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
98
|
+
if (value == null) {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
|
|
104
|
+
'tenant_id': value['tenantId'],
|
|
105
|
+
'path_part_id': value['pathPartId'],
|
|
106
|
+
'user_id': value['userId'],
|
|
107
|
+
'acquired_at': value['acquiredAt'].toISOString(),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
@@ -34,6 +34,13 @@ import {
|
|
|
34
34
|
DocumentTypeToJSON,
|
|
35
35
|
DocumentTypeToJSONTyped,
|
|
36
36
|
} from './DocumentType';
|
|
37
|
+
import type { DocumentCheckoutResponse } from './DocumentCheckoutResponse';
|
|
38
|
+
import {
|
|
39
|
+
DocumentCheckoutResponseFromJSON,
|
|
40
|
+
DocumentCheckoutResponseFromJSONTyped,
|
|
41
|
+
DocumentCheckoutResponseToJSON,
|
|
42
|
+
DocumentCheckoutResponseToJSONTyped,
|
|
43
|
+
} from './DocumentCheckoutResponse';
|
|
37
44
|
import type { DocumentVersionResponse } from './DocumentVersionResponse';
|
|
38
45
|
import {
|
|
39
46
|
DocumentVersionResponseFromJSON,
|
|
@@ -156,6 +163,12 @@ export interface DocumentResponse {
|
|
|
156
163
|
* @memberof DocumentResponse
|
|
157
164
|
*/
|
|
158
165
|
canWrite?: boolean | null;
|
|
166
|
+
/**
|
|
167
|
+
* Active write-lock state. Null when no checkout is held. Populated on detail endpoints (GET /v1/documents/{id}). Any tenant member with read access may observe this state.
|
|
168
|
+
* @type {DocumentCheckoutResponse}
|
|
169
|
+
* @memberof DocumentResponse
|
|
170
|
+
*/
|
|
171
|
+
checkout?: DocumentCheckoutResponse | null;
|
|
159
172
|
}
|
|
160
173
|
|
|
161
174
|
|
|
@@ -236,6 +249,7 @@ export function DocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
236
249
|
'updatedAt': (new Date(json['updated_at'])),
|
|
237
250
|
'tags': json['tags'] == null ? undefined : ((json['tags'] as Array<any>).map(TagResponseFromJSON)),
|
|
238
251
|
'canWrite': json['can_write'] == null ? undefined : json['can_write'],
|
|
252
|
+
'checkout': json['checkout'] == null ? undefined : DocumentCheckoutResponseFromJSON(json['checkout']),
|
|
239
253
|
};
|
|
240
254
|
}
|
|
241
255
|
|
|
@@ -268,6 +282,7 @@ export function DocumentResponseToJSONTyped(value?: DocumentResponse | null, ign
|
|
|
268
282
|
'updated_at': value['updatedAt'].toISOString(),
|
|
269
283
|
'tags': value['tags'] == null ? undefined : ((value['tags'] as Array<any>).map(TagResponseToJSON)),
|
|
270
284
|
'can_write': value['canWrite'],
|
|
285
|
+
'checkout': DocumentCheckoutResponseToJSON(value['checkout']),
|
|
271
286
|
};
|
|
272
287
|
}
|
|
273
288
|
|
package/src/models/index.ts
CHANGED
|
@@ -43,6 +43,7 @@ export * from './CreateThreadRequest';
|
|
|
43
43
|
export * from './CreateWorkflowDefinitionRequest';
|
|
44
44
|
export * from './DirectorySyncResponse';
|
|
45
45
|
export * from './DissolveSectionResponse';
|
|
46
|
+
export * from './DocumentCheckoutResponse';
|
|
46
47
|
export * from './DocumentOrigin';
|
|
47
48
|
export * from './DocumentResponse';
|
|
48
49
|
export * from './DocumentType';
|