@knowledge-stack/ksapi 1.83.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 +22 -0
- package/README.md +21 -2
- package/dist/apis/DocumentCheckoutApi.d.ts +158 -0
- package/dist/apis/DocumentCheckoutApi.js +197 -0
- package/dist/apis/PathPartsApi.d.ts +110 -1
- package/dist/apis/PathPartsApi.js +111 -0
- package/dist/apis/WorkflowMemoryApi.d.ts +249 -0
- package/dist/apis/WorkflowMemoryApi.js +299 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/DocumentCheckoutApi.d.ts +158 -0
- package/dist/esm/apis/DocumentCheckoutApi.js +160 -0
- package/dist/esm/apis/PathPartsApi.d.ts +110 -1
- package/dist/esm/apis/PathPartsApi.js +112 -1
- package/dist/esm/apis/WorkflowMemoryApi.d.ts +249 -0
- package/dist/esm/apis/WorkflowMemoryApi.js +262 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/AppendEventRequest.d.ts +62 -0
- package/dist/esm/models/AppendEventRequest.js +51 -0
- package/dist/esm/models/AppendMemoryChunkRequest.d.ts +54 -0
- package/dist/esm/models/AppendMemoryChunkRequest.js +52 -0
- package/dist/esm/models/ChunkBulkResponse.d.ts +4 -4
- package/dist/esm/models/ChunkContentItem.d.ts +2 -2
- package/dist/esm/models/ChunkResponse.d.ts +4 -4
- package/dist/esm/models/CreateThreadMessageRequest.d.ts +2 -2
- package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +1 -1
- 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/DocumentVersionMetadata.d.ts +4 -4
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +2 -2
- package/dist/esm/models/EditMemoryChunkRequest.d.ts +47 -0
- package/dist/esm/models/EditMemoryChunkRequest.js +49 -0
- package/dist/esm/models/EventResponse.d.ts +83 -0
- package/dist/esm/models/EventResponse.js +64 -0
- package/dist/esm/models/ListMemoryChunksResponse.d.ts +48 -0
- package/dist/esm/models/ListMemoryChunksResponse.js +45 -0
- package/dist/esm/models/MemoryChunkResponse.d.ts +60 -0
- package/dist/esm/models/MemoryChunkResponse.js +53 -0
- package/dist/esm/models/MemoryKind.d.ts +29 -0
- package/dist/esm/models/MemoryKind.js +47 -0
- package/dist/esm/models/PaginatedResponseEventResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseEventResponse.js +70 -0
- package/dist/esm/models/ScoredChunkResponse.d.ts +4 -4
- package/dist/esm/models/SectionSystemMetadata.d.ts +1 -1
- package/dist/esm/models/TenantSettingsUpdate.d.ts +2 -2
- package/dist/esm/models/ThreadMessageDetailsInput.d.ts +2 -2
- package/dist/esm/models/ThreadMessageDetailsOutput.d.ts +2 -2
- package/dist/esm/models/ThreadMessageResponse.d.ts +2 -2
- package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +2 -2
- package/dist/esm/models/UpdateTenantRequest.d.ts +4 -4
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +1 -1
- package/dist/esm/models/WorkflowDefinitionResponse.d.ts +1 -1
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +1 -1
- package/dist/esm/models/index.d.ts +9 -0
- package/dist/esm/models/index.js +9 -0
- package/dist/models/AppendEventRequest.d.ts +62 -0
- package/dist/models/AppendEventRequest.js +59 -0
- package/dist/models/AppendMemoryChunkRequest.d.ts +54 -0
- package/dist/models/AppendMemoryChunkRequest.js +60 -0
- package/dist/models/ChunkBulkResponse.d.ts +4 -4
- package/dist/models/ChunkContentItem.d.ts +2 -2
- package/dist/models/ChunkResponse.d.ts +4 -4
- package/dist/models/CreateThreadMessageRequest.d.ts +2 -2
- package/dist/models/CreateWorkflowDefinitionRequest.d.ts +1 -1
- 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/DocumentVersionMetadata.d.ts +4 -4
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +2 -2
- package/dist/models/EditMemoryChunkRequest.d.ts +47 -0
- package/dist/models/EditMemoryChunkRequest.js +57 -0
- package/dist/models/EventResponse.d.ts +83 -0
- package/dist/models/EventResponse.js +72 -0
- package/dist/models/ListMemoryChunksResponse.d.ts +48 -0
- package/dist/models/ListMemoryChunksResponse.js +53 -0
- package/dist/models/MemoryChunkResponse.d.ts +60 -0
- package/dist/models/MemoryChunkResponse.js +61 -0
- package/dist/models/MemoryKind.d.ts +29 -0
- package/dist/models/MemoryKind.js +55 -0
- package/dist/models/PaginatedResponseEventResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseEventResponse.js +78 -0
- package/dist/models/ScoredChunkResponse.d.ts +4 -4
- package/dist/models/SectionSystemMetadata.d.ts +1 -1
- package/dist/models/TenantSettingsUpdate.d.ts +2 -2
- package/dist/models/ThreadMessageDetailsInput.d.ts +2 -2
- package/dist/models/ThreadMessageDetailsOutput.d.ts +2 -2
- package/dist/models/ThreadMessageResponse.d.ts +2 -2
- package/dist/models/UpdateChunkMetadataRequest.d.ts +2 -2
- package/dist/models/UpdateTenantRequest.d.ts +4 -4
- package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +1 -1
- package/dist/models/WorkflowDefinitionResponse.d.ts +1 -1
- package/dist/models/WorkflowRunSnapshot.d.ts +1 -1
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/docs/AppendEventRequest.md +37 -0
- package/docs/AppendMemoryChunkRequest.md +36 -0
- package/docs/DocumentCheckoutApi.md +233 -0
- package/docs/DocumentCheckoutResponse.md +41 -0
- package/docs/DocumentResponse.md +2 -0
- package/docs/EditMemoryChunkRequest.md +34 -0
- package/docs/EventResponse.md +45 -0
- package/docs/FolderResponseOrDocumentResponse.md +2 -0
- package/docs/ListMemoryChunksResponse.md +34 -0
- package/docs/MemoryChunkResponse.md +39 -0
- package/docs/MemoryKind.md +33 -0
- package/docs/PaginatedResponseEventResponse.md +40 -0
- package/docs/PathPartsApi.md +171 -0
- package/docs/WorkflowMemoryApi.md +390 -0
- package/package.json +1 -1
- package/src/apis/DocumentCheckoutApi.ts +296 -0
- package/src/apis/PathPartsApi.ts +234 -0
- package/src/apis/WorkflowMemoryApi.ts +522 -0
- package/src/apis/index.ts +2 -0
- package/src/models/AppendEventRequest.ts +102 -0
- package/src/models/AppendMemoryChunkRequest.ts +105 -0
- package/src/models/ChunkBulkResponse.ts +4 -4
- package/src/models/ChunkContentItem.ts +2 -2
- package/src/models/ChunkResponse.ts +4 -4
- package/src/models/CreateThreadMessageRequest.ts +2 -2
- package/src/models/CreateWorkflowDefinitionRequest.ts +1 -1
- package/src/models/DocumentCheckoutResponse.ts +110 -0
- package/src/models/DocumentResponse.ts +15 -0
- package/src/models/DocumentVersionMetadata.ts +4 -4
- package/src/models/DocumentVersionMetadataUpdate.ts +2 -2
- package/src/models/EditMemoryChunkRequest.ts +87 -0
- package/src/models/EventResponse.ts +132 -0
- package/src/models/ListMemoryChunksResponse.ts +91 -0
- package/src/models/MemoryChunkResponse.ts +111 -0
- package/src/models/MemoryKind.ts +57 -0
- package/src/models/PaginatedResponseEventResponse.ts +130 -0
- package/src/models/ScoredChunkResponse.ts +4 -4
- package/src/models/SectionSystemMetadata.ts +1 -1
- package/src/models/TenantSettingsUpdate.ts +2 -2
- package/src/models/ThreadMessageDetailsInput.ts +2 -2
- package/src/models/ThreadMessageDetailsOutput.ts +2 -2
- package/src/models/ThreadMessageResponse.ts +2 -2
- package/src/models/UpdateChunkMetadataRequest.ts +2 -2
- package/src/models/UpdateTenantRequest.ts +4 -4
- package/src/models/UpdateWorkflowDefinitionRequest.ts +1 -1
- package/src/models/WorkflowDefinitionResponse.ts +1 -1
- package/src/models/WorkflowRunSnapshot.ts +1 -1
- package/src/models/index.ts +9 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
49
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
50
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
51
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
52
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
53
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
54
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
+
exports.WorkflowMemoryApi = void 0;
|
|
59
|
+
const runtime = __importStar(require("../runtime"));
|
|
60
|
+
const index_1 = require("../models/index");
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
class WorkflowMemoryApi extends runtime.BaseAPI {
|
|
65
|
+
/**
|
|
66
|
+
* Creates request options for appendWorkflowMemoryChunk without sending the request
|
|
67
|
+
*/
|
|
68
|
+
appendWorkflowMemoryChunkRequestOpts(requestParameters) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
if (requestParameters['definitionId'] == null) {
|
|
71
|
+
throw new runtime.RequiredError('definitionId', 'Required parameter "definitionId" was null or undefined when calling appendWorkflowMemoryChunk().');
|
|
72
|
+
}
|
|
73
|
+
if (requestParameters['appendMemoryChunkRequest'] == null) {
|
|
74
|
+
throw new runtime.RequiredError('appendMemoryChunkRequest', 'Required parameter "appendMemoryChunkRequest" was null or undefined when calling appendWorkflowMemoryChunk().');
|
|
75
|
+
}
|
|
76
|
+
const queryParameters = {};
|
|
77
|
+
const headerParameters = {};
|
|
78
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
79
|
+
if (requestParameters['authorization'] != null) {
|
|
80
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
81
|
+
}
|
|
82
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks`;
|
|
83
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
84
|
+
return {
|
|
85
|
+
path: urlPath,
|
|
86
|
+
method: 'POST',
|
|
87
|
+
headers: headerParameters,
|
|
88
|
+
query: queryParameters,
|
|
89
|
+
body: (0, index_1.AppendMemoryChunkRequestToJSON)(requestParameters['appendMemoryChunkRequest']),
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Append a new memory chunk. Exposed for external agents (e.g. self-hosted runners) that need to capture learnings without touching the DB directly. The new chunk\'s ``chunk_id`` is server-assigned. Each call snapshots a new DocumentVersion, just like edit/forget.
|
|
95
|
+
* Append Workflow Memory Chunk Handler
|
|
96
|
+
*/
|
|
97
|
+
appendWorkflowMemoryChunkRaw(requestParameters, initOverrides) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
const requestOptions = yield this.appendWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
100
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
101
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MemoryChunkResponseFromJSON)(jsonValue));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Append a new memory chunk. Exposed for external agents (e.g. self-hosted runners) that need to capture learnings without touching the DB directly. The new chunk\'s ``chunk_id`` is server-assigned. Each call snapshots a new DocumentVersion, just like edit/forget.
|
|
106
|
+
* Append Workflow Memory Chunk Handler
|
|
107
|
+
*/
|
|
108
|
+
appendWorkflowMemoryChunk(requestParameters, initOverrides) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const response = yield this.appendWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
111
|
+
return yield response.value();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Creates request options for editWorkflowMemoryChunk without sending the request
|
|
116
|
+
*/
|
|
117
|
+
editWorkflowMemoryChunkRequestOpts(requestParameters) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
if (requestParameters['definitionId'] == null) {
|
|
120
|
+
throw new runtime.RequiredError('definitionId', 'Required parameter "definitionId" was null or undefined when calling editWorkflowMemoryChunk().');
|
|
121
|
+
}
|
|
122
|
+
if (requestParameters['chunkId'] == null) {
|
|
123
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling editWorkflowMemoryChunk().');
|
|
124
|
+
}
|
|
125
|
+
if (requestParameters['editMemoryChunkRequest'] == null) {
|
|
126
|
+
throw new runtime.RequiredError('editMemoryChunkRequest', 'Required parameter "editMemoryChunkRequest" was null or undefined when calling editWorkflowMemoryChunk().');
|
|
127
|
+
}
|
|
128
|
+
const queryParameters = {};
|
|
129
|
+
const headerParameters = {};
|
|
130
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
131
|
+
if (requestParameters['authorization'] != null) {
|
|
132
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
133
|
+
}
|
|
134
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id}`;
|
|
135
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
136
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
137
|
+
return {
|
|
138
|
+
path: urlPath,
|
|
139
|
+
method: 'PATCH',
|
|
140
|
+
headers: headerParameters,
|
|
141
|
+
query: queryParameters,
|
|
142
|
+
body: (0, index_1.EditMemoryChunkRequestToJSON)(requestParameters['editMemoryChunkRequest']),
|
|
143
|
+
};
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Edit Workflow Memory Chunk Handler
|
|
148
|
+
*/
|
|
149
|
+
editWorkflowMemoryChunkRaw(requestParameters, initOverrides) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
const requestOptions = yield this.editWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
152
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
153
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MemoryChunkResponseFromJSON)(jsonValue));
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Edit Workflow Memory Chunk Handler
|
|
158
|
+
*/
|
|
159
|
+
editWorkflowMemoryChunk(requestParameters, initOverrides) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
const response = yield this.editWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
162
|
+
return yield response.value();
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Creates request options for forgetWorkflowMemoryChunk without sending the request
|
|
167
|
+
*/
|
|
168
|
+
forgetWorkflowMemoryChunkRequestOpts(requestParameters) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
if (requestParameters['definitionId'] == null) {
|
|
171
|
+
throw new runtime.RequiredError('definitionId', 'Required parameter "definitionId" was null or undefined when calling forgetWorkflowMemoryChunk().');
|
|
172
|
+
}
|
|
173
|
+
if (requestParameters['chunkId'] == null) {
|
|
174
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling forgetWorkflowMemoryChunk().');
|
|
175
|
+
}
|
|
176
|
+
const queryParameters = {};
|
|
177
|
+
const headerParameters = {};
|
|
178
|
+
if (requestParameters['authorization'] != null) {
|
|
179
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
180
|
+
}
|
|
181
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id}`;
|
|
182
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
183
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
184
|
+
return {
|
|
185
|
+
path: urlPath,
|
|
186
|
+
method: 'DELETE',
|
|
187
|
+
headers: headerParameters,
|
|
188
|
+
query: queryParameters,
|
|
189
|
+
};
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Forget Workflow Memory Chunk Handler
|
|
194
|
+
*/
|
|
195
|
+
forgetWorkflowMemoryChunkRaw(requestParameters, initOverrides) {
|
|
196
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
+
const requestOptions = yield this.forgetWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
198
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
199
|
+
return new runtime.VoidApiResponse(response);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Forget Workflow Memory Chunk Handler
|
|
204
|
+
*/
|
|
205
|
+
forgetWorkflowMemoryChunk(requestParameters, initOverrides) {
|
|
206
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
+
yield this.forgetWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Creates request options for getWorkflowMemoryChunk without sending the request
|
|
212
|
+
*/
|
|
213
|
+
getWorkflowMemoryChunkRequestOpts(requestParameters) {
|
|
214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
+
if (requestParameters['definitionId'] == null) {
|
|
216
|
+
throw new runtime.RequiredError('definitionId', 'Required parameter "definitionId" was null or undefined when calling getWorkflowMemoryChunk().');
|
|
217
|
+
}
|
|
218
|
+
if (requestParameters['chunkId'] == null) {
|
|
219
|
+
throw new runtime.RequiredError('chunkId', 'Required parameter "chunkId" was null or undefined when calling getWorkflowMemoryChunk().');
|
|
220
|
+
}
|
|
221
|
+
const queryParameters = {};
|
|
222
|
+
const headerParameters = {};
|
|
223
|
+
if (requestParameters['authorization'] != null) {
|
|
224
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
225
|
+
}
|
|
226
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory/chunks/{chunk_id}`;
|
|
227
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
228
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
229
|
+
return {
|
|
230
|
+
path: urlPath,
|
|
231
|
+
method: 'GET',
|
|
232
|
+
headers: headerParameters,
|
|
233
|
+
query: queryParameters,
|
|
234
|
+
};
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Get Workflow Memory Chunk Handler
|
|
239
|
+
*/
|
|
240
|
+
getWorkflowMemoryChunkRaw(requestParameters, initOverrides) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
const requestOptions = yield this.getWorkflowMemoryChunkRequestOpts(requestParameters);
|
|
243
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
244
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MemoryChunkResponseFromJSON)(jsonValue));
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Get Workflow Memory Chunk Handler
|
|
249
|
+
*/
|
|
250
|
+
getWorkflowMemoryChunk(requestParameters, initOverrides) {
|
|
251
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
+
const response = yield this.getWorkflowMemoryChunkRaw(requestParameters, initOverrides);
|
|
253
|
+
return yield response.value();
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Creates request options for listWorkflowMemoryChunks without sending the request
|
|
258
|
+
*/
|
|
259
|
+
listWorkflowMemoryChunksRequestOpts(requestParameters) {
|
|
260
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
261
|
+
if (requestParameters['definitionId'] == null) {
|
|
262
|
+
throw new runtime.RequiredError('definitionId', 'Required parameter "definitionId" was null or undefined when calling listWorkflowMemoryChunks().');
|
|
263
|
+
}
|
|
264
|
+
const queryParameters = {};
|
|
265
|
+
const headerParameters = {};
|
|
266
|
+
if (requestParameters['authorization'] != null) {
|
|
267
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
268
|
+
}
|
|
269
|
+
let urlPath = `/v1/workflow-definitions/{definition_id}/memory`;
|
|
270
|
+
urlPath = urlPath.replace(`{${"definition_id"}}`, encodeURIComponent(String(requestParameters['definitionId'])));
|
|
271
|
+
return {
|
|
272
|
+
path: urlPath,
|
|
273
|
+
method: 'GET',
|
|
274
|
+
headers: headerParameters,
|
|
275
|
+
query: queryParameters,
|
|
276
|
+
};
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* List Workflow Memory Chunks Handler
|
|
281
|
+
*/
|
|
282
|
+
listWorkflowMemoryChunksRaw(requestParameters, initOverrides) {
|
|
283
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
284
|
+
const requestOptions = yield this.listWorkflowMemoryChunksRequestOpts(requestParameters);
|
|
285
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
286
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListMemoryChunksResponseFromJSON)(jsonValue));
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* List Workflow Memory Chunks Handler
|
|
291
|
+
*/
|
|
292
|
+
listWorkflowMemoryChunks(requestParameters, initOverrides) {
|
|
293
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
294
|
+
const response = yield this.listWorkflowMemoryChunksRaw(requestParameters, initOverrides);
|
|
295
|
+
return yield response.value();
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
exports.WorkflowMemoryApi = WorkflowMemoryApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './AuthApi';
|
|
|
4
4
|
export * from './ChunkLineagesApi';
|
|
5
5
|
export * from './ChunksApi';
|
|
6
6
|
export * from './DefaultApi';
|
|
7
|
+
export * from './DocumentCheckoutApi';
|
|
7
8
|
export * from './DocumentVersionsApi';
|
|
8
9
|
export * from './DocumentsApi';
|
|
9
10
|
export * from './FeaturesApi';
|
|
@@ -22,5 +23,6 @@ export * from './ThreadsApi';
|
|
|
22
23
|
export * from './UserPermissionsApi';
|
|
23
24
|
export * from './UsersApi';
|
|
24
25
|
export * from './WorkflowDefinitionsApi';
|
|
26
|
+
export * from './WorkflowMemoryApi';
|
|
25
27
|
export * from './WorkflowRunsApi';
|
|
26
28
|
export * from './WorkflowsApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./AuthApi"), exports);
|
|
|
22
22
|
__exportStar(require("./ChunkLineagesApi"), exports);
|
|
23
23
|
__exportStar(require("./ChunksApi"), exports);
|
|
24
24
|
__exportStar(require("./DefaultApi"), exports);
|
|
25
|
+
__exportStar(require("./DocumentCheckoutApi"), exports);
|
|
25
26
|
__exportStar(require("./DocumentVersionsApi"), exports);
|
|
26
27
|
__exportStar(require("./DocumentsApi"), exports);
|
|
27
28
|
__exportStar(require("./FeaturesApi"), exports);
|
|
@@ -40,5 +41,6 @@ __exportStar(require("./ThreadsApi"), exports);
|
|
|
40
41
|
__exportStar(require("./UserPermissionsApi"), exports);
|
|
41
42
|
__exportStar(require("./UsersApi"), exports);
|
|
42
43
|
__exportStar(require("./WorkflowDefinitionsApi"), exports);
|
|
44
|
+
__exportStar(require("./WorkflowMemoryApi"), exports);
|
|
43
45
|
__exportStar(require("./WorkflowRunsApi"), exports);
|
|
44
46
|
__exportStar(require("./WorkflowsApi"), exports);
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { DocumentCheckoutResponse } from '../models/index';
|
|
14
|
+
export interface AcquireDocumentCheckoutRequest {
|
|
15
|
+
pathPartId: string;
|
|
16
|
+
authorization?: string | null;
|
|
17
|
+
ksUat?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export interface GetDocumentCheckoutRequest {
|
|
20
|
+
pathPartId: string;
|
|
21
|
+
authorization?: string | null;
|
|
22
|
+
ksUat?: string | null;
|
|
23
|
+
}
|
|
24
|
+
export interface ReleaseDocumentCheckoutRequest {
|
|
25
|
+
pathPartId: string;
|
|
26
|
+
authorization?: string | null;
|
|
27
|
+
ksUat?: string | null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* DocumentCheckoutApi - interface
|
|
31
|
+
*
|
|
32
|
+
* @export
|
|
33
|
+
* @interface DocumentCheckoutApiInterface
|
|
34
|
+
*/
|
|
35
|
+
export interface DocumentCheckoutApiInterface {
|
|
36
|
+
/**
|
|
37
|
+
* Creates request options for acquireDocumentCheckout without sending the request
|
|
38
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
39
|
+
* @param {string} [authorization]
|
|
40
|
+
* @param {string} [ksUat]
|
|
41
|
+
* @throws {RequiredError}
|
|
42
|
+
* @memberof DocumentCheckoutApiInterface
|
|
43
|
+
*/
|
|
44
|
+
acquireDocumentCheckoutRequestOpts(requestParameters: AcquireDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
45
|
+
/**
|
|
46
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
47
|
+
* @summary Acquire Document Checkout Handler
|
|
48
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
49
|
+
* @param {string} [authorization]
|
|
50
|
+
* @param {string} [ksUat]
|
|
51
|
+
* @param {*} [options] Override http request option.
|
|
52
|
+
* @throws {RequiredError}
|
|
53
|
+
* @memberof DocumentCheckoutApiInterface
|
|
54
|
+
*/
|
|
55
|
+
acquireDocumentCheckoutRaw(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
|
|
56
|
+
/**
|
|
57
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
58
|
+
* Acquire Document Checkout Handler
|
|
59
|
+
*/
|
|
60
|
+
acquireDocumentCheckout(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* Creates request options for getDocumentCheckout without sending the request
|
|
63
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
64
|
+
* @param {string} [authorization]
|
|
65
|
+
* @param {string} [ksUat]
|
|
66
|
+
* @throws {RequiredError}
|
|
67
|
+
* @memberof DocumentCheckoutApiInterface
|
|
68
|
+
*/
|
|
69
|
+
getDocumentCheckoutRequestOpts(requestParameters: GetDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
70
|
+
/**
|
|
71
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
72
|
+
* @summary Get Document Checkout Handler
|
|
73
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
74
|
+
* @param {string} [authorization]
|
|
75
|
+
* @param {string} [ksUat]
|
|
76
|
+
* @param {*} [options] Override http request option.
|
|
77
|
+
* @throws {RequiredError}
|
|
78
|
+
* @memberof DocumentCheckoutApiInterface
|
|
79
|
+
*/
|
|
80
|
+
getDocumentCheckoutRaw(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
|
|
81
|
+
/**
|
|
82
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
83
|
+
* Get Document Checkout Handler
|
|
84
|
+
*/
|
|
85
|
+
getDocumentCheckout(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
|
|
86
|
+
/**
|
|
87
|
+
* Creates request options for releaseDocumentCheckout without sending the request
|
|
88
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
89
|
+
* @param {string} [authorization]
|
|
90
|
+
* @param {string} [ksUat]
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
* @memberof DocumentCheckoutApiInterface
|
|
93
|
+
*/
|
|
94
|
+
releaseDocumentCheckoutRequestOpts(requestParameters: ReleaseDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
95
|
+
/**
|
|
96
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
97
|
+
* @summary Release Document Checkout Handler
|
|
98
|
+
* @param {string} pathPartId Document\'s PathPart ID
|
|
99
|
+
* @param {string} [authorization]
|
|
100
|
+
* @param {string} [ksUat]
|
|
101
|
+
* @param {*} [options] Override http request option.
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
* @memberof DocumentCheckoutApiInterface
|
|
104
|
+
*/
|
|
105
|
+
releaseDocumentCheckoutRaw(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
106
|
+
/**
|
|
107
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
108
|
+
* Release Document Checkout Handler
|
|
109
|
+
*/
|
|
110
|
+
releaseDocumentCheckout(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
*/
|
|
115
|
+
export declare class DocumentCheckoutApi extends runtime.BaseAPI implements DocumentCheckoutApiInterface {
|
|
116
|
+
/**
|
|
117
|
+
* Creates request options for acquireDocumentCheckout without sending the request
|
|
118
|
+
*/
|
|
119
|
+
acquireDocumentCheckoutRequestOpts(requestParameters: AcquireDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
120
|
+
/**
|
|
121
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
122
|
+
* Acquire Document Checkout Handler
|
|
123
|
+
*/
|
|
124
|
+
acquireDocumentCheckoutRaw(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
|
|
125
|
+
/**
|
|
126
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
127
|
+
* Acquire Document Checkout Handler
|
|
128
|
+
*/
|
|
129
|
+
acquireDocumentCheckout(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
|
|
130
|
+
/**
|
|
131
|
+
* Creates request options for getDocumentCheckout without sending the request
|
|
132
|
+
*/
|
|
133
|
+
getDocumentCheckoutRequestOpts(requestParameters: GetDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
134
|
+
/**
|
|
135
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
136
|
+
* Get Document Checkout Handler
|
|
137
|
+
*/
|
|
138
|
+
getDocumentCheckoutRaw(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
|
|
139
|
+
/**
|
|
140
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
141
|
+
* Get Document Checkout Handler
|
|
142
|
+
*/
|
|
143
|
+
getDocumentCheckout(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
|
|
144
|
+
/**
|
|
145
|
+
* Creates request options for releaseDocumentCheckout without sending the request
|
|
146
|
+
*/
|
|
147
|
+
releaseDocumentCheckoutRequestOpts(requestParameters: ReleaseDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
148
|
+
/**
|
|
149
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
150
|
+
* Release Document Checkout Handler
|
|
151
|
+
*/
|
|
152
|
+
releaseDocumentCheckoutRaw(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
153
|
+
/**
|
|
154
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
155
|
+
* Release Document Checkout Handler
|
|
156
|
+
*/
|
|
157
|
+
releaseDocumentCheckout(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
158
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
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
|
+
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 { DocumentCheckoutResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class DocumentCheckoutApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for acquireDocumentCheckout without sending the request
|
|
31
|
+
*/
|
|
32
|
+
acquireDocumentCheckoutRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['pathPartId'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling acquireDocumentCheckout().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
if (requestParameters['authorization'] != null) {
|
|
40
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
41
|
+
}
|
|
42
|
+
let urlPath = `/v1/documents/{path_part_id}/checkout`;
|
|
43
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
44
|
+
return {
|
|
45
|
+
path: urlPath,
|
|
46
|
+
method: 'POST',
|
|
47
|
+
headers: headerParameters,
|
|
48
|
+
query: queryParameters,
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
54
|
+
* Acquire Document Checkout Handler
|
|
55
|
+
*/
|
|
56
|
+
acquireDocumentCheckoutRaw(requestParameters, initOverrides) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const requestOptions = yield this.acquireDocumentCheckoutRequestOpts(requestParameters);
|
|
59
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
60
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentCheckoutResponseFromJSON(jsonValue));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
|
|
65
|
+
* Acquire Document Checkout Handler
|
|
66
|
+
*/
|
|
67
|
+
acquireDocumentCheckout(requestParameters, initOverrides) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const response = yield this.acquireDocumentCheckoutRaw(requestParameters, initOverrides);
|
|
70
|
+
return yield response.value();
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Creates request options for getDocumentCheckout without sending the request
|
|
75
|
+
*/
|
|
76
|
+
getDocumentCheckoutRequestOpts(requestParameters) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
if (requestParameters['pathPartId'] == null) {
|
|
79
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling getDocumentCheckout().');
|
|
80
|
+
}
|
|
81
|
+
const queryParameters = {};
|
|
82
|
+
const headerParameters = {};
|
|
83
|
+
if (requestParameters['authorization'] != null) {
|
|
84
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
85
|
+
}
|
|
86
|
+
let urlPath = `/v1/documents/{path_part_id}/checkout`;
|
|
87
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
88
|
+
return {
|
|
89
|
+
path: urlPath,
|
|
90
|
+
method: 'GET',
|
|
91
|
+
headers: headerParameters,
|
|
92
|
+
query: queryParameters,
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
98
|
+
* Get Document Checkout Handler
|
|
99
|
+
*/
|
|
100
|
+
getDocumentCheckoutRaw(requestParameters, initOverrides) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const requestOptions = yield this.getDocumentCheckoutRequestOpts(requestParameters);
|
|
103
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
104
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentCheckoutResponseFromJSON(jsonValue));
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
|
|
109
|
+
* Get Document Checkout Handler
|
|
110
|
+
*/
|
|
111
|
+
getDocumentCheckout(requestParameters, initOverrides) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
const response = yield this.getDocumentCheckoutRaw(requestParameters, initOverrides);
|
|
114
|
+
return yield response.value();
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Creates request options for releaseDocumentCheckout without sending the request
|
|
119
|
+
*/
|
|
120
|
+
releaseDocumentCheckoutRequestOpts(requestParameters) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
if (requestParameters['pathPartId'] == null) {
|
|
123
|
+
throw new runtime.RequiredError('pathPartId', 'Required parameter "pathPartId" was null or undefined when calling releaseDocumentCheckout().');
|
|
124
|
+
}
|
|
125
|
+
const queryParameters = {};
|
|
126
|
+
const headerParameters = {};
|
|
127
|
+
if (requestParameters['authorization'] != null) {
|
|
128
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
129
|
+
}
|
|
130
|
+
let urlPath = `/v1/documents/{path_part_id}/checkout`;
|
|
131
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
132
|
+
return {
|
|
133
|
+
path: urlPath,
|
|
134
|
+
method: 'DELETE',
|
|
135
|
+
headers: headerParameters,
|
|
136
|
+
query: queryParameters,
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
142
|
+
* Release Document Checkout Handler
|
|
143
|
+
*/
|
|
144
|
+
releaseDocumentCheckoutRaw(requestParameters, initOverrides) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
const requestOptions = yield this.releaseDocumentCheckoutRequestOpts(requestParameters);
|
|
147
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
148
|
+
return new runtime.VoidApiResponse(response);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
|
|
153
|
+
* Release Document Checkout Handler
|
|
154
|
+
*/
|
|
155
|
+
releaseDocumentCheckout(requestParameters, initOverrides) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
yield this.releaseDocumentCheckoutRaw(requestParameters, initOverrides);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|