@fbrc/sdk 0.0.10 → 0.0.12
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 +5 -5
- package/dist/apis/MemoriesApi.d.ts +104 -0
- package/dist/apis/MemoriesApi.js +273 -0
- package/dist/apis/ResourceRootsApi.d.ts +49 -0
- package/dist/apis/ResourceRootsApi.js +127 -0
- package/dist/apis/ResourcesApi.js +2 -2
- package/dist/apis/SubscriptionApi.js +1 -1
- package/dist/apis/SubscriptionsApi.d.ts +30 -0
- package/dist/apis/SubscriptionsApi.js +69 -0
- package/dist/apis/UserProfileApi.js +1 -1
- package/dist/apis/UsersApi.d.ts +29 -0
- package/dist/apis/UsersApi.js +66 -0
- package/dist/apis/WorkspaceApi.d.ts +13 -5
- package/dist/apis/WorkspaceApi.js +12 -5
- package/dist/apis/{DefaultApi.d.ts → WorkspacesApi.d.ts} +23 -15
- package/dist/apis/{DefaultApi.js → WorkspacesApi.js} +29 -22
- package/dist/apis/index.d.ts +5 -5
- package/dist/apis/index.js +5 -5
- package/dist/esm/apis/MemoriesApi.d.ts +104 -0
- package/dist/esm/apis/MemoriesApi.js +269 -0
- package/dist/esm/apis/ResourceRootsApi.d.ts +49 -0
- package/dist/esm/apis/ResourceRootsApi.js +123 -0
- package/dist/esm/apis/ResourcesApi.js +2 -2
- package/dist/esm/apis/SubscriptionApi.js +1 -1
- package/dist/esm/apis/SubscriptionsApi.d.ts +30 -0
- package/dist/esm/apis/SubscriptionsApi.js +65 -0
- package/dist/esm/apis/UserProfileApi.js +1 -1
- package/dist/esm/apis/UsersApi.d.ts +29 -0
- package/dist/esm/apis/UsersApi.js +62 -0
- package/dist/esm/apis/WorkspaceApi.d.ts +13 -5
- package/dist/esm/apis/WorkspaceApi.js +11 -4
- package/dist/esm/apis/{DefaultApi.d.ts → WorkspacesApi.d.ts} +23 -15
- package/dist/esm/apis/{DefaultApi.js → WorkspacesApi.js} +27 -20
- package/dist/esm/apis/index.d.ts +5 -5
- package/dist/esm/apis/index.js +5 -5
- package/dist/esm/models/ChatbotModel.d.ts +6 -7
- package/dist/esm/models/ChatbotModel.js +6 -7
- package/dist/models/ChatbotModel.d.ts +6 -7
- package/dist/models/ChatbotModel.js +6 -7
- package/package.json +1 -1
- package/src/apis/{MemoryApi.ts → MemoriesApi.ts} +1 -1
- package/src/apis/{ResourceRootApi.ts → ResourceRootsApi.ts} +1 -1
- package/src/apis/ResourcesApi.ts +2 -2
- package/src/apis/{SubscriptionApi.ts → SubscriptionsApi.ts} +2 -2
- package/src/apis/{UserProfileApi.ts → UsersApi.ts} +2 -2
- package/src/apis/{WorkspaceApi.ts → WorkspacesApi.ts} +15 -6
- package/src/apis/index.ts +5 -5
- package/src/models/ChatbotModel.ts +6 -7
- package/dist/esm/models/DeleteResourcesRequest.d.ts +0 -38
- package/dist/esm/models/DeleteResourcesRequest.js +0 -45
- package/dist/esm/models/DeleteSpace404Response.d.ts +0 -52
- package/dist/esm/models/DeleteSpace404Response.js +0 -59
- package/dist/esm/models/MarketingCampaignSource.d.ts +0 -69
- package/dist/esm/models/MarketingCampaignSource.js +0 -68
- package/dist/esm/models/UtmSources.d.ts +0 -24
- package/dist/esm/models/UtmSources.js +0 -42
- package/dist/esm/models/V2WorkspaceDeletionConfirmationPostRequest.d.ts +0 -32
- package/dist/esm/models/V2WorkspaceDeletionConfirmationPostRequest.js +0 -43
- package/dist/esm/models/V2WorkspaceGet200Response.d.ts +0 -39
- package/dist/esm/models/V2WorkspaceGet200Response.js +0 -48
- package/dist/esm/models/V2WorkspaceGet200ResponseData.d.ts +0 -33
- package/dist/esm/models/V2WorkspaceGet200ResponseData.js +0 -44
- package/dist/esm/models/V2WorkspacePatchRequest.d.ts +0 -50
- package/dist/esm/models/V2WorkspacePatchRequest.js +0 -47
- package/dist/esm/models/V2WorkspacePostRequest.d.ts +0 -64
- package/dist/esm/models/V2WorkspacePostRequest.js +0 -53
- package/dist/models/DeleteResourcesRequest.d.ts +0 -38
- package/dist/models/DeleteResourcesRequest.js +0 -52
- package/dist/models/DeleteSpace404Response.d.ts +0 -52
- package/dist/models/DeleteSpace404Response.js +0 -67
- package/dist/models/MarketingCampaignSource.d.ts +0 -69
- package/dist/models/MarketingCampaignSource.js +0 -75
- package/dist/models/UtmSources.d.ts +0 -24
- package/dist/models/UtmSources.js +0 -50
- package/dist/models/V2WorkspaceDeletionConfirmationPostRequest.d.ts +0 -32
- package/dist/models/V2WorkspaceDeletionConfirmationPostRequest.js +0 -50
- package/dist/models/V2WorkspaceGet200Response.d.ts +0 -39
- package/dist/models/V2WorkspaceGet200Response.js +0 -55
- package/dist/models/V2WorkspaceGet200ResponseData.d.ts +0 -33
- package/dist/models/V2WorkspaceGet200ResponseData.js +0 -51
- package/dist/models/V2WorkspacePatchRequest.d.ts +0 -50
- package/dist/models/V2WorkspacePatchRequest.js +0 -54
- package/dist/models/V2WorkspacePostRequest.d.ts +0 -64
- package/dist/models/V2WorkspacePostRequest.js +0 -60
- package/dist/models/V2WorkspacesPatchRequest.d.ts +0 -50
- package/dist/models/V2WorkspacesPatchRequest.js +0 -72
- package/dist/models/V2WorkspacesPostRequest.d.ts +0 -64
- package/dist/models/V2WorkspacesPostRequest.js +0 -82
package/.openapi-generator/FILES
CHANGED
|
@@ -4,17 +4,17 @@ src/apis/BookmarksApi.ts
|
|
|
4
4
|
src/apis/CommentsApi.ts
|
|
5
5
|
src/apis/FilesApi.ts
|
|
6
6
|
src/apis/FoldersApi.ts
|
|
7
|
-
src/apis/
|
|
7
|
+
src/apis/MemoriesApi.ts
|
|
8
8
|
src/apis/NotepadsApi.ts
|
|
9
|
-
src/apis/
|
|
9
|
+
src/apis/ResourceRootsApi.ts
|
|
10
10
|
src/apis/ResourcesApi.ts
|
|
11
11
|
src/apis/SearchApi.ts
|
|
12
12
|
src/apis/SpacesApi.ts
|
|
13
|
-
src/apis/
|
|
13
|
+
src/apis/SubscriptionsApi.ts
|
|
14
14
|
src/apis/TagsApi.ts
|
|
15
15
|
src/apis/UploadsApi.ts
|
|
16
|
-
src/apis/
|
|
17
|
-
src/apis/
|
|
16
|
+
src/apis/UsersApi.ts
|
|
17
|
+
src/apis/WorkspacesApi.ts
|
|
18
18
|
src/apis/index.ts
|
|
19
19
|
src/models/AcceptWorkspaceRemovalRequest.ts
|
|
20
20
|
src/models/AssistantChat.ts
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fabric API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.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 { Memory, MemoryJob, MemoryJobSource, SearchMemories200Response, SearchMemoriesOrderParameter, UpdateMemoryRequest } from '../models/index';
|
|
14
|
+
export type CreateMemoryRequest = Omit<MemoryJobSource & {
|
|
15
|
+
workspaceId?: string;
|
|
16
|
+
}, 'workspaceId'>;
|
|
17
|
+
export type DeleteMemoryRequest = Omit<{
|
|
18
|
+
memoryId: string;
|
|
19
|
+
workspaceId?: string;
|
|
20
|
+
}, 'workspaceId'>;
|
|
21
|
+
export type GetMemoryRequest = Omit<{
|
|
22
|
+
memoryId: string;
|
|
23
|
+
workspaceId?: string;
|
|
24
|
+
}, 'workspaceId'>;
|
|
25
|
+
export type GetMemoryJobRequest = Omit<{
|
|
26
|
+
jobId: string;
|
|
27
|
+
workspaceId?: string;
|
|
28
|
+
}, 'workspaceId'>;
|
|
29
|
+
export type SearchMemoriesRequest = Omit<{
|
|
30
|
+
workspaceId?: string;
|
|
31
|
+
query?: string;
|
|
32
|
+
limit?: number;
|
|
33
|
+
offset?: number | null;
|
|
34
|
+
order?: SearchMemoriesOrderParameter;
|
|
35
|
+
}, 'workspaceId'>;
|
|
36
|
+
export type UpdateMemoryOperationRequest = Omit<UpdateMemoryRequest & {
|
|
37
|
+
memoryId: string;
|
|
38
|
+
workspaceId?: string;
|
|
39
|
+
}, 'workspaceId'>;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export declare class MemoriesApi extends runtime.BaseAPI {
|
|
44
|
+
/**
|
|
45
|
+
* Create a memory by analyzing the provided input data. Set `infer` to `false` to skip inference and store the memory verbatim. Memory inference is asynchronous. The response contains a job ID which can be used to track the status of the memory creation.
|
|
46
|
+
* Create memory
|
|
47
|
+
*/
|
|
48
|
+
createRaw(requestParameters: CreateMemoryRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryJob>>;
|
|
49
|
+
/**
|
|
50
|
+
* Create a memory by analyzing the provided input data. Set `infer` to `false` to skip inference and store the memory verbatim. Memory inference is asynchronous. The response contains a job ID which can be used to track the status of the memory creation.
|
|
51
|
+
* Create memory
|
|
52
|
+
*/
|
|
53
|
+
create(requestParameters: CreateMemoryRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<MemoryJob>;
|
|
54
|
+
/**
|
|
55
|
+
* Delete an existing memory.
|
|
56
|
+
* Delete memory
|
|
57
|
+
*/
|
|
58
|
+
deleteRaw(requestParameters: DeleteMemoryRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
59
|
+
/**
|
|
60
|
+
* Delete an existing memory.
|
|
61
|
+
* Delete memory
|
|
62
|
+
*/
|
|
63
|
+
delete(requestParameters: DeleteMemoryRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Retrieve the details of a specific memory.
|
|
66
|
+
* Get memory
|
|
67
|
+
*/
|
|
68
|
+
getRaw(requestParameters: GetMemoryRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Memory>>;
|
|
69
|
+
/**
|
|
70
|
+
* Retrieve the details of a specific memory.
|
|
71
|
+
* Get memory
|
|
72
|
+
*/
|
|
73
|
+
get(requestParameters: GetMemoryRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<Memory>;
|
|
74
|
+
/**
|
|
75
|
+
* Retrieve the status and details of a memory creation job.
|
|
76
|
+
* Get memory job
|
|
77
|
+
*/
|
|
78
|
+
getJobRaw(requestParameters: GetMemoryJobRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MemoryJob>>;
|
|
79
|
+
/**
|
|
80
|
+
* Retrieve the status and details of a memory creation job.
|
|
81
|
+
* Get memory job
|
|
82
|
+
*/
|
|
83
|
+
getJob(requestParameters: GetMemoryJobRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<MemoryJob>;
|
|
84
|
+
/**
|
|
85
|
+
* Search through memories using a query string. Uses hybrid semantic and keyword-based search with a recency bias to find relevant memories. Results are sorted by relevance and include a relevance score (higher is better).
|
|
86
|
+
* Search memories
|
|
87
|
+
*/
|
|
88
|
+
searchRaw(requestParameters?: SearchMemoriesRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchMemories200Response>>;
|
|
89
|
+
/**
|
|
90
|
+
* Search through memories using a query string. Uses hybrid semantic and keyword-based search with a recency bias to find relevant memories. Results are sorted by relevance and include a relevance score (higher is better).
|
|
91
|
+
* Search memories
|
|
92
|
+
*/
|
|
93
|
+
search(requestParameters?: SearchMemoriesRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<SearchMemories200Response>;
|
|
94
|
+
/**
|
|
95
|
+
* Update the name and content of an existing memory.
|
|
96
|
+
* Update memory
|
|
97
|
+
*/
|
|
98
|
+
updateRaw(requestParameters: UpdateMemoryOperationRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
99
|
+
/**
|
|
100
|
+
* Update the name and content of an existing memory.
|
|
101
|
+
* Update memory
|
|
102
|
+
*/
|
|
103
|
+
update(requestParameters: UpdateMemoryOperationRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<void>;
|
|
104
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Fabric API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.MemoriesApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class MemoriesApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Create a memory by analyzing the provided input data. Set `infer` to `false` to skip inference and store the memory verbatim. Memory inference is asynchronous. The response contains a job ID which can be used to track the status of the memory creation.
|
|
34
|
+
* Create memory
|
|
35
|
+
*/
|
|
36
|
+
createRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
const queryParameters = {};
|
|
39
|
+
const headerParameters = {};
|
|
40
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
41
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
42
|
+
// oauth required
|
|
43
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth2", []);
|
|
44
|
+
}
|
|
45
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
46
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKey authentication
|
|
47
|
+
}
|
|
48
|
+
let urlPath = `/v2/memories`;
|
|
49
|
+
const response = yield this.request({
|
|
50
|
+
path: urlPath,
|
|
51
|
+
method: 'POST',
|
|
52
|
+
headers: headerParameters,
|
|
53
|
+
query: queryParameters,
|
|
54
|
+
body: (0, index_1.MemoryJobSourceToJSON)(requestParameters),
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MemoryJobFromJSON)(jsonValue));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Create a memory by analyzing the provided input data. Set `infer` to `false` to skip inference and store the memory verbatim. Memory inference is asynchronous. The response contains a job ID which can be used to track the status of the memory creation.
|
|
61
|
+
* Create memory
|
|
62
|
+
*/
|
|
63
|
+
create(requestParameters, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const response = yield this.createRaw(requestParameters, initOverrides);
|
|
66
|
+
return yield response.value();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Delete an existing memory.
|
|
71
|
+
* Delete memory
|
|
72
|
+
*/
|
|
73
|
+
deleteRaw(requestParameters, initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
if (requestParameters['memoryId'] == null) {
|
|
76
|
+
throw new runtime.RequiredError('memoryId', 'Required parameter "memoryId" was null or undefined when calling ().');
|
|
77
|
+
}
|
|
78
|
+
const queryParameters = {};
|
|
79
|
+
const headerParameters = {};
|
|
80
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
81
|
+
// oauth required
|
|
82
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth2", []);
|
|
83
|
+
}
|
|
84
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
85
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKey authentication
|
|
86
|
+
}
|
|
87
|
+
let urlPath = `/v2/memories/{memoryId}`;
|
|
88
|
+
urlPath = urlPath.replace(`{${"memoryId"}}`, encodeURIComponent(String(requestParameters['memoryId'])));
|
|
89
|
+
const response = yield this.request({
|
|
90
|
+
path: urlPath,
|
|
91
|
+
method: 'DELETE',
|
|
92
|
+
headers: headerParameters,
|
|
93
|
+
query: queryParameters,
|
|
94
|
+
}, initOverrides);
|
|
95
|
+
return new runtime.VoidApiResponse(response);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Delete an existing memory.
|
|
100
|
+
* Delete memory
|
|
101
|
+
*/
|
|
102
|
+
delete(requestParameters, initOverrides) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
yield this.deleteRaw(requestParameters, initOverrides);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Retrieve the details of a specific memory.
|
|
109
|
+
* Get memory
|
|
110
|
+
*/
|
|
111
|
+
getRaw(requestParameters, initOverrides) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
if (requestParameters['memoryId'] == null) {
|
|
114
|
+
throw new runtime.RequiredError('memoryId', 'Required parameter "memoryId" was null or undefined when calling ().');
|
|
115
|
+
}
|
|
116
|
+
const queryParameters = {};
|
|
117
|
+
const headerParameters = {};
|
|
118
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
119
|
+
// oauth required
|
|
120
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth2", []);
|
|
121
|
+
}
|
|
122
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
123
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKey authentication
|
|
124
|
+
}
|
|
125
|
+
let urlPath = `/v2/memories/{memoryId}`;
|
|
126
|
+
urlPath = urlPath.replace(`{${"memoryId"}}`, encodeURIComponent(String(requestParameters['memoryId'])));
|
|
127
|
+
const response = yield this.request({
|
|
128
|
+
path: urlPath,
|
|
129
|
+
method: 'GET',
|
|
130
|
+
headers: headerParameters,
|
|
131
|
+
query: queryParameters,
|
|
132
|
+
}, initOverrides);
|
|
133
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MemoryFromJSON)(jsonValue));
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Retrieve the details of a specific memory.
|
|
138
|
+
* Get memory
|
|
139
|
+
*/
|
|
140
|
+
get(requestParameters, initOverrides) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
const response = yield this.getRaw(requestParameters, initOverrides);
|
|
143
|
+
return yield response.value();
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Retrieve the status and details of a memory creation job.
|
|
148
|
+
* Get memory job
|
|
149
|
+
*/
|
|
150
|
+
getJobRaw(requestParameters, initOverrides) {
|
|
151
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
if (requestParameters['jobId'] == null) {
|
|
153
|
+
throw new runtime.RequiredError('jobId', 'Required parameter "jobId" was null or undefined when calling ().');
|
|
154
|
+
}
|
|
155
|
+
const queryParameters = {};
|
|
156
|
+
const headerParameters = {};
|
|
157
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
158
|
+
// oauth required
|
|
159
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth2", []);
|
|
160
|
+
}
|
|
161
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
162
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKey authentication
|
|
163
|
+
}
|
|
164
|
+
let urlPath = `/v2/memories/jobs/{jobId}`;
|
|
165
|
+
urlPath = urlPath.replace(`{${"jobId"}}`, encodeURIComponent(String(requestParameters['jobId'])));
|
|
166
|
+
const response = yield this.request({
|
|
167
|
+
path: urlPath,
|
|
168
|
+
method: 'GET',
|
|
169
|
+
headers: headerParameters,
|
|
170
|
+
query: queryParameters,
|
|
171
|
+
}, initOverrides);
|
|
172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MemoryJobFromJSON)(jsonValue));
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Retrieve the status and details of a memory creation job.
|
|
177
|
+
* Get memory job
|
|
178
|
+
*/
|
|
179
|
+
getJob(requestParameters, initOverrides) {
|
|
180
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
+
const response = yield this.getJobRaw(requestParameters, initOverrides);
|
|
182
|
+
return yield response.value();
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Search through memories using a query string. Uses hybrid semantic and keyword-based search with a recency bias to find relevant memories. Results are sorted by relevance and include a relevance score (higher is better).
|
|
187
|
+
* Search memories
|
|
188
|
+
*/
|
|
189
|
+
searchRaw() {
|
|
190
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
191
|
+
const queryParameters = {};
|
|
192
|
+
if (requestParameters['query'] != null) {
|
|
193
|
+
queryParameters['query'] = requestParameters['query'];
|
|
194
|
+
}
|
|
195
|
+
if (requestParameters['limit'] != null) {
|
|
196
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
197
|
+
}
|
|
198
|
+
if (requestParameters['offset'] != null) {
|
|
199
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
200
|
+
}
|
|
201
|
+
if (requestParameters['order'] != null) {
|
|
202
|
+
queryParameters['order'] = requestParameters['order'];
|
|
203
|
+
}
|
|
204
|
+
const headerParameters = {};
|
|
205
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
206
|
+
// oauth required
|
|
207
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth2", []);
|
|
208
|
+
}
|
|
209
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
210
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKey authentication
|
|
211
|
+
}
|
|
212
|
+
let urlPath = `/v2/memories/search`;
|
|
213
|
+
const response = yield this.request({
|
|
214
|
+
path: urlPath,
|
|
215
|
+
method: 'GET',
|
|
216
|
+
headers: headerParameters,
|
|
217
|
+
query: queryParameters,
|
|
218
|
+
}, initOverrides);
|
|
219
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SearchMemories200ResponseFromJSON)(jsonValue));
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Search through memories using a query string. Uses hybrid semantic and keyword-based search with a recency bias to find relevant memories. Results are sorted by relevance and include a relevance score (higher is better).
|
|
224
|
+
* Search memories
|
|
225
|
+
*/
|
|
226
|
+
search() {
|
|
227
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
228
|
+
const response = yield this.searchRaw(requestParameters, initOverrides);
|
|
229
|
+
return yield response.value();
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Update the name and content of an existing memory.
|
|
234
|
+
* Update memory
|
|
235
|
+
*/
|
|
236
|
+
updateRaw(requestParameters, initOverrides) {
|
|
237
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
238
|
+
if (requestParameters['memoryId'] == null) {
|
|
239
|
+
throw new runtime.RequiredError('memoryId', 'Required parameter "memoryId" was null or undefined when calling ().');
|
|
240
|
+
}
|
|
241
|
+
const queryParameters = {};
|
|
242
|
+
const headerParameters = {};
|
|
243
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
244
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
245
|
+
// oauth required
|
|
246
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth2", []);
|
|
247
|
+
}
|
|
248
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
249
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKey authentication
|
|
250
|
+
}
|
|
251
|
+
let urlPath = `/v2/memories/{memoryId}`;
|
|
252
|
+
urlPath = urlPath.replace(`{${"memoryId"}}`, encodeURIComponent(String(requestParameters['memoryId'])));
|
|
253
|
+
const response = yield this.request({
|
|
254
|
+
path: urlPath,
|
|
255
|
+
method: 'PATCH',
|
|
256
|
+
headers: headerParameters,
|
|
257
|
+
query: queryParameters,
|
|
258
|
+
body: (0, index_1.UpdateMemoryRequestToJSON)(requestParameters),
|
|
259
|
+
}, initOverrides);
|
|
260
|
+
return new runtime.VoidApiResponse(response);
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Update the name and content of an existing memory.
|
|
265
|
+
* Update memory
|
|
266
|
+
*/
|
|
267
|
+
update(requestParameters, initOverrides) {
|
|
268
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
269
|
+
yield this.updateRaw(requestParameters, initOverrides);
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
exports.MemoriesApi = MemoriesApi;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fabric API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.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 { ListResourceRoots200Response, ListResourceRootsOrderParameter, ListResourceRootsTypesParameterInner, PermissionRole, ResourceRootDetail } from '../models/index';
|
|
14
|
+
export type GetResourceRootRequest = Omit<{
|
|
15
|
+
resourceRootId: string;
|
|
16
|
+
workspaceId?: string;
|
|
17
|
+
}, 'workspaceId'>;
|
|
18
|
+
export type ListResourceRootsRequest = Omit<{
|
|
19
|
+
workspaceId?: string;
|
|
20
|
+
limit?: number;
|
|
21
|
+
offset?: number | null;
|
|
22
|
+
order?: ListResourceRootsOrderParameter;
|
|
23
|
+
types?: Array<ListResourceRootsTypesParameterInner>;
|
|
24
|
+
search?: string;
|
|
25
|
+
role?: Array<PermissionRole>;
|
|
26
|
+
includeMembers?: number | null;
|
|
27
|
+
includeResources?: number | null;
|
|
28
|
+
}, 'workspaceId'>;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export declare class ResourceRootsApi extends runtime.BaseAPI {
|
|
33
|
+
/**
|
|
34
|
+
* Get resource root
|
|
35
|
+
*/
|
|
36
|
+
getRaw(requestParameters: GetResourceRootRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResourceRootDetail>>;
|
|
37
|
+
/**
|
|
38
|
+
* Get resource root
|
|
39
|
+
*/
|
|
40
|
+
get(requestParameters: GetResourceRootRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<ResourceRootDetail>;
|
|
41
|
+
/**
|
|
42
|
+
* List resource roots
|
|
43
|
+
*/
|
|
44
|
+
listRaw(requestParameters?: ListResourceRootsRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListResourceRoots200Response>>;
|
|
45
|
+
/**
|
|
46
|
+
* List resource roots
|
|
47
|
+
*/
|
|
48
|
+
list(requestParameters?: ListResourceRootsRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<ListResourceRoots200Response>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Fabric API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.ResourceRootsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class ResourceRootsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Get resource root
|
|
34
|
+
*/
|
|
35
|
+
getRaw(requestParameters, initOverrides) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['resourceRootId'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('resourceRootId', 'Required parameter "resourceRootId" was null or undefined when calling ().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
43
|
+
// oauth required
|
|
44
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth2", []);
|
|
45
|
+
}
|
|
46
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
47
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKey authentication
|
|
48
|
+
}
|
|
49
|
+
let urlPath = `/v2/resource-roots/{resourceRootId}`;
|
|
50
|
+
urlPath = urlPath.replace(`{${"resourceRootId"}}`, encodeURIComponent(String(requestParameters['resourceRootId'])));
|
|
51
|
+
const response = yield this.request({
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'GET',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
}, initOverrides);
|
|
57
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ResourceRootDetailFromJSON)(jsonValue));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get resource root
|
|
62
|
+
*/
|
|
63
|
+
get(requestParameters, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const response = yield this.getRaw(requestParameters, initOverrides);
|
|
66
|
+
return yield response.value();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* List resource roots
|
|
71
|
+
*/
|
|
72
|
+
listRaw() {
|
|
73
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
74
|
+
const queryParameters = {};
|
|
75
|
+
if (requestParameters['limit'] != null) {
|
|
76
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
77
|
+
}
|
|
78
|
+
if (requestParameters['offset'] != null) {
|
|
79
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
80
|
+
}
|
|
81
|
+
if (requestParameters['order'] != null) {
|
|
82
|
+
queryParameters['order'] = requestParameters['order'];
|
|
83
|
+
}
|
|
84
|
+
if (requestParameters['types'] != null) {
|
|
85
|
+
queryParameters['types'] = requestParameters['types'];
|
|
86
|
+
}
|
|
87
|
+
if (requestParameters['search'] != null) {
|
|
88
|
+
queryParameters['search'] = requestParameters['search'];
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters['role'] != null) {
|
|
91
|
+
queryParameters['role'] = requestParameters['role'];
|
|
92
|
+
}
|
|
93
|
+
if (requestParameters['includeMembers'] != null) {
|
|
94
|
+
queryParameters['includeMembers'] = requestParameters['includeMembers'];
|
|
95
|
+
}
|
|
96
|
+
if (requestParameters['includeResources'] != null) {
|
|
97
|
+
queryParameters['includeResources'] = requestParameters['includeResources'];
|
|
98
|
+
}
|
|
99
|
+
const headerParameters = {};
|
|
100
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
101
|
+
// oauth required
|
|
102
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("OAuth2", []);
|
|
103
|
+
}
|
|
104
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
105
|
+
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKey authentication
|
|
106
|
+
}
|
|
107
|
+
let urlPath = `/v2/resource-roots`;
|
|
108
|
+
const response = yield this.request({
|
|
109
|
+
path: urlPath,
|
|
110
|
+
method: 'GET',
|
|
111
|
+
headers: headerParameters,
|
|
112
|
+
query: queryParameters,
|
|
113
|
+
}, initOverrides);
|
|
114
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListResourceRoots200ResponseFromJSON)(jsonValue));
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* List resource roots
|
|
119
|
+
*/
|
|
120
|
+
list() {
|
|
121
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
122
|
+
const response = yield this.listRaw(requestParameters, initOverrides);
|
|
123
|
+
return yield response.value();
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
exports.ResourceRootsApi = ResourceRootsApi;
|
|
@@ -119,7 +119,7 @@ class ResourcesApi extends runtime.BaseAPI {
|
|
|
119
119
|
if (this.configuration && this.configuration.apiKey) {
|
|
120
120
|
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKey authentication
|
|
121
121
|
}
|
|
122
|
-
let urlPath = `/v2/
|
|
122
|
+
let urlPath = `/v2/resources/recover`;
|
|
123
123
|
const response = yield this.request({
|
|
124
124
|
path: urlPath,
|
|
125
125
|
method: 'POST',
|
|
@@ -156,7 +156,7 @@ class ResourcesApi extends runtime.BaseAPI {
|
|
|
156
156
|
if (this.configuration && this.configuration.apiKey) {
|
|
157
157
|
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKey authentication
|
|
158
158
|
}
|
|
159
|
-
let urlPath = `/v2/
|
|
159
|
+
let urlPath = `/v2/resources/delete`;
|
|
160
160
|
const response = yield this.request({
|
|
161
161
|
path: urlPath,
|
|
162
162
|
method: 'POST',
|
|
@@ -46,7 +46,7 @@ class SubscriptionApi extends runtime.BaseAPI {
|
|
|
46
46
|
if (this.configuration && this.configuration.apiKey) {
|
|
47
47
|
headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // ApiKey authentication
|
|
48
48
|
}
|
|
49
|
-
let urlPath = `/v2/
|
|
49
|
+
let urlPath = `/v2/subscriptions`;
|
|
50
50
|
const response = yield this.request({
|
|
51
51
|
path: urlPath,
|
|
52
52
|
method: 'GET',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fabric API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.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 { UsageType, WorkspaceSubscription } from '../models/index';
|
|
14
|
+
export type GetSubscriptionRequest = Omit<{
|
|
15
|
+
workspaceId?: string;
|
|
16
|
+
type?: Array<UsageType>;
|
|
17
|
+
}, 'workspaceId'>;
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare class SubscriptionsApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Get user subscription
|
|
24
|
+
*/
|
|
25
|
+
getRaw(requestParameters?: GetSubscriptionRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkspaceSubscription>>;
|
|
26
|
+
/**
|
|
27
|
+
* Get user subscription
|
|
28
|
+
*/
|
|
29
|
+
get(requestParameters?: GetSubscriptionRequest, initOverrides?: runtime.InitOverrides | runtime.InitOverrideFunction): Promise<WorkspaceSubscription>;
|
|
30
|
+
}
|