@fbrc/sdk 0.0.12 → 0.0.13
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 +3 -0
- package/dist/apis/DefaultApi.d.ts +89 -0
- package/dist/apis/DefaultApi.js +249 -0
- package/dist/esm/apis/DefaultApi.d.ts +89 -0
- package/dist/esm/apis/DefaultApi.js +245 -0
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/models/ChatbotModel.d.ts +2 -1
- package/dist/esm/models/ChatbotModel.js +2 -1
- package/dist/esm/models/CreateBookmarkRequestLocation.d.ts +38 -0
- package/dist/esm/models/CreateBookmarkRequestLocation.js +51 -0
- package/dist/esm/models/CreateBookmarkRequestLocationAnyOf.d.ts +32 -0
- package/dist/esm/models/CreateBookmarkRequestLocationAnyOf.js +45 -0
- package/dist/esm/models/CreateBookmarkRequestLocationAnyOf1.d.ts +32 -0
- package/dist/esm/models/CreateBookmarkRequestLocationAnyOf1.js +45 -0
- package/dist/esm/models/DeleteResourcesRequest.d.ts +38 -0
- package/dist/esm/models/DeleteResourcesRequest.js +45 -0
- package/dist/esm/models/DeleteSpace404Response.d.ts +52 -0
- package/dist/esm/models/DeleteSpace404Response.js +59 -0
- package/dist/esm/models/MarketingCampaignSource.d.ts +69 -0
- package/dist/esm/models/MarketingCampaignSource.js +68 -0
- package/dist/esm/models/PlanEntitlements.d.ts +6 -0
- package/dist/esm/models/PlanEntitlements.js +4 -0
- package/dist/esm/models/SearchRequestAllOfFilters.d.ts +6 -0
- package/dist/esm/models/SearchRequestAllOfFilters.js +4 -0
- package/dist/esm/models/UpdateResourceRequest.d.ts +58 -0
- package/dist/esm/models/UpdateResourceRequest.js +76 -0
- package/dist/esm/models/UpdateResourceRequestLocation.d.ts +38 -0
- package/dist/esm/models/UpdateResourceRequestLocation.js +51 -0
- package/dist/esm/models/UsageAmountType.d.ts +25 -0
- package/dist/esm/models/UsageAmountType.js +43 -0
- package/dist/esm/models/UsageBreakdownLabel.d.ts +25 -0
- package/dist/esm/models/UsageBreakdownLabel.js +43 -0
- package/dist/esm/models/UsageItem.d.ts +26 -0
- package/dist/esm/models/UsageItem.js +29 -0
- package/dist/esm/models/UsageItemBreakdownInner.d.ts +39 -0
- package/dist/esm/models/UsageItemBreakdownInner.js +52 -0
- package/dist/esm/models/UtmSources.d.ts +24 -0
- package/dist/esm/models/UtmSources.js +42 -0
- package/dist/esm/models/V2WorkspaceDeletionConfirmationPostRequest.d.ts +32 -0
- package/dist/esm/models/V2WorkspaceDeletionConfirmationPostRequest.js +43 -0
- package/dist/esm/models/V2WorkspaceGet200Response.d.ts +39 -0
- package/dist/esm/models/V2WorkspaceGet200Response.js +48 -0
- package/dist/esm/models/V2WorkspaceGet200ResponseData.d.ts +33 -0
- package/dist/esm/models/V2WorkspaceGet200ResponseData.js +44 -0
- package/dist/esm/models/V2WorkspacePatchRequest.d.ts +50 -0
- package/dist/esm/models/V2WorkspacePatchRequest.js +47 -0
- package/dist/esm/models/V2WorkspacePostRequest.d.ts +64 -0
- package/dist/esm/models/V2WorkspacePostRequest.js +53 -0
- package/dist/esm/models/WorkspaceSubscriptionCreditOperationCosts.d.ts +6 -0
- package/dist/esm/models/WorkspaceSubscriptionCreditOperationCosts.js +4 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/models/ChatbotModel.d.ts +2 -1
- package/dist/models/ChatbotModel.js +2 -1
- package/dist/models/CreateBookmarkRequestLocation.d.ts +38 -0
- package/dist/models/CreateBookmarkRequestLocation.js +58 -0
- package/dist/models/CreateBookmarkRequestLocationAnyOf.d.ts +32 -0
- package/dist/models/CreateBookmarkRequestLocationAnyOf.js +52 -0
- package/dist/models/CreateBookmarkRequestLocationAnyOf1.d.ts +32 -0
- package/dist/models/CreateBookmarkRequestLocationAnyOf1.js +52 -0
- package/dist/models/DeleteResourcesRequest.d.ts +38 -0
- package/dist/models/DeleteResourcesRequest.js +52 -0
- package/dist/models/DeleteSpace404Response.d.ts +52 -0
- package/dist/models/DeleteSpace404Response.js +67 -0
- package/dist/models/MarketingCampaignSource.d.ts +69 -0
- package/dist/models/MarketingCampaignSource.js +75 -0
- package/dist/models/PlanEntitlements.d.ts +6 -0
- package/dist/models/PlanEntitlements.js +4 -0
- package/dist/models/SearchRequestAllOfFilters.d.ts +6 -0
- package/dist/models/SearchRequestAllOfFilters.js +4 -0
- package/dist/models/UpdateResourceRequest.d.ts +58 -0
- package/dist/models/UpdateResourceRequest.js +83 -0
- package/dist/models/UpdateResourceRequestLocation.d.ts +38 -0
- package/dist/models/UpdateResourceRequestLocation.js +58 -0
- package/dist/models/UsageAmountType.d.ts +25 -0
- package/dist/models/UsageAmountType.js +51 -0
- package/dist/models/UsageBreakdownLabel.d.ts +25 -0
- package/dist/models/UsageBreakdownLabel.js +51 -0
- package/dist/models/UsageItem.d.ts +26 -0
- package/dist/models/UsageItem.js +29 -0
- package/dist/models/UsageItemBreakdownInner.d.ts +39 -0
- package/dist/models/UsageItemBreakdownInner.js +59 -0
- package/dist/models/UtmSources.d.ts +24 -0
- package/dist/models/UtmSources.js +50 -0
- package/dist/models/V2WorkspaceDeletionConfirmationPostRequest.d.ts +32 -0
- package/dist/models/V2WorkspaceDeletionConfirmationPostRequest.js +50 -0
- package/dist/models/V2WorkspaceGet200Response.d.ts +39 -0
- package/dist/models/V2WorkspaceGet200Response.js +55 -0
- package/dist/models/V2WorkspaceGet200ResponseData.d.ts +33 -0
- package/dist/models/V2WorkspaceGet200ResponseData.js +51 -0
- package/dist/models/V2WorkspacePatchRequest.d.ts +50 -0
- package/dist/models/V2WorkspacePatchRequest.js +54 -0
- package/dist/models/V2WorkspacePostRequest.d.ts +64 -0
- package/dist/models/V2WorkspacePostRequest.js +60 -0
- package/dist/models/V2WorkspacesPatchRequest.d.ts +50 -0
- package/dist/models/V2WorkspacesPatchRequest.js +72 -0
- package/dist/models/V2WorkspacesPostRequest.d.ts +64 -0
- package/dist/models/V2WorkspacesPostRequest.js +82 -0
- package/dist/models/WorkspaceSubscriptionCreditOperationCosts.d.ts +6 -0
- package/dist/models/WorkspaceSubscriptionCreditOperationCosts.js +4 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/index.ts +3 -1
- package/src/models/ChatbotModel.ts +2 -1
- package/src/models/PlanEntitlements.ts +10 -0
- package/src/models/SearchRequestAllOfFilters.ts +10 -0
- package/src/models/UsageAmountType.ts +53 -0
- package/src/models/UsageBreakdownLabel.ts +53 -0
- package/src/models/UsageItem.ts +64 -0
- package/src/models/UsageItemBreakdownInner.ts +91 -0
- package/src/models/WorkspaceSubscriptionCreditOperationCosts.ts +10 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfV2WorkspacesPostRequest = instanceOfV2WorkspacesPostRequest;
|
|
17
|
+
exports.V2WorkspacesPostRequestFromJSON = V2WorkspacesPostRequestFromJSON;
|
|
18
|
+
exports.V2WorkspacesPostRequestFromJSONTyped = V2WorkspacesPostRequestFromJSONTyped;
|
|
19
|
+
exports.V2WorkspacesPostRequestToJSON = V2WorkspacesPostRequestToJSON;
|
|
20
|
+
exports.V2WorkspacesPostRequestToJSONTyped = V2WorkspacesPostRequestToJSONTyped;
|
|
21
|
+
const MarketingCampaignSource_1 = require("./MarketingCampaignSource");
|
|
22
|
+
const WorkspaceType_1 = require("./WorkspaceType");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the V2WorkspacesPostRequest interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfV2WorkspacesPostRequest(value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function V2WorkspacesPostRequestFromJSON(json) {
|
|
30
|
+
return V2WorkspacesPostRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function V2WorkspacesPostRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
const result = {};
|
|
37
|
+
if (json['title'] !== undefined) {
|
|
38
|
+
result['title'] = json['title'];
|
|
39
|
+
}
|
|
40
|
+
if (json['description'] !== undefined) {
|
|
41
|
+
if (json['description'] === null) {
|
|
42
|
+
result['description'] = null;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
result['description'] = json['description'];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (json['slug'] !== undefined) {
|
|
49
|
+
result['slug'] = json['slug'];
|
|
50
|
+
}
|
|
51
|
+
if (json['marketing'] !== undefined) {
|
|
52
|
+
if (json['marketing'] === null) {
|
|
53
|
+
result['marketing'] = null;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
result['marketing'] = (0, MarketingCampaignSource_1.MarketingCampaignSourceFromJSON)(json['marketing']);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (json['referral'] !== undefined) {
|
|
60
|
+
result['referral'] = json['referral'];
|
|
61
|
+
}
|
|
62
|
+
if (json['type'] !== undefined) {
|
|
63
|
+
result['type'] = (0, WorkspaceType_1.WorkspaceTypeFromJSON)(json['type']);
|
|
64
|
+
}
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
function V2WorkspacesPostRequestToJSON(json) {
|
|
68
|
+
return V2WorkspacesPostRequestToJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
function V2WorkspacesPostRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
71
|
+
if (value == null) {
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
'title': value['title'],
|
|
76
|
+
'description': value['description'],
|
|
77
|
+
'slug': value['slug'],
|
|
78
|
+
'marketing': (0, MarketingCampaignSource_1.MarketingCampaignSourceToJSON)(value['marketing']),
|
|
79
|
+
'referral': value['referral'],
|
|
80
|
+
'type': (0, WorkspaceType_1.WorkspaceTypeToJSON)(value['type']),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
@@ -27,6 +27,12 @@ export interface WorkspaceSubscriptionCreditOperationCosts {
|
|
|
27
27
|
* @memberof WorkspaceSubscriptionCreditOperationCosts
|
|
28
28
|
*/
|
|
29
29
|
'ASSISTANT_MESSAGE'?: number;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof WorkspaceSubscriptionCreditOperationCosts
|
|
34
|
+
*/
|
|
35
|
+
'WEB_SEARCH'?: number;
|
|
30
36
|
/**
|
|
31
37
|
*
|
|
32
38
|
* @type {number}
|
|
@@ -38,6 +38,9 @@ function WorkspaceSubscriptionCreditOperationCostsFromJSONTyped(json, ignoreDisc
|
|
|
38
38
|
if (json['ASSISTANT_MESSAGE'] !== undefined) {
|
|
39
39
|
result['ASSISTANT_MESSAGE'] = json['ASSISTANT_MESSAGE'];
|
|
40
40
|
}
|
|
41
|
+
if (json['WEB_SEARCH'] !== undefined) {
|
|
42
|
+
result['WEB_SEARCH'] = json['WEB_SEARCH'];
|
|
43
|
+
}
|
|
41
44
|
if (json['TOP_UP_MANUAL'] !== undefined) {
|
|
42
45
|
result['TOP_UP_MANUAL'] = json['TOP_UP_MANUAL'];
|
|
43
46
|
}
|
|
@@ -59,6 +62,7 @@ function WorkspaceSubscriptionCreditOperationCostsToJSONTyped(value, ignoreDiscr
|
|
|
59
62
|
return {
|
|
60
63
|
'RESOURCE_CREATED': value['RESOURCE_CREATED'],
|
|
61
64
|
'ASSISTANT_MESSAGE': value['ASSISTANT_MESSAGE'],
|
|
65
|
+
'WEB_SEARCH': value['WEB_SEARCH'],
|
|
62
66
|
'TOP_UP_MANUAL': value['TOP_UP_MANUAL'],
|
|
63
67
|
'TOP_UP_PLAN': value['TOP_UP_PLAN'],
|
|
64
68
|
'TOP_UP_AUTO': value['TOP_UP_AUTO'],
|
package/dist/models/index.d.ts
CHANGED
|
@@ -137,7 +137,10 @@ export * from './SystemSubtypes';
|
|
|
137
137
|
export * from './Tag';
|
|
138
138
|
export * from './ToolStatus';
|
|
139
139
|
export * from './UpdateMemoryRequest';
|
|
140
|
+
export * from './UsageAmountType';
|
|
141
|
+
export * from './UsageBreakdownLabel';
|
|
140
142
|
export * from './UsageItem';
|
|
143
|
+
export * from './UsageItemBreakdownInner';
|
|
141
144
|
export * from './UsageItems';
|
|
142
145
|
export * from './UsageType';
|
|
143
146
|
export * from './UserGroup';
|
package/dist/models/index.js
CHANGED
|
@@ -155,7 +155,10 @@ __exportStar(require("./SystemSubtypes"), exports);
|
|
|
155
155
|
__exportStar(require("./Tag"), exports);
|
|
156
156
|
__exportStar(require("./ToolStatus"), exports);
|
|
157
157
|
__exportStar(require("./UpdateMemoryRequest"), exports);
|
|
158
|
+
__exportStar(require("./UsageAmountType"), exports);
|
|
159
|
+
__exportStar(require("./UsageBreakdownLabel"), exports);
|
|
158
160
|
__exportStar(require("./UsageItem"), exports);
|
|
161
|
+
__exportStar(require("./UsageItemBreakdownInner"), exports);
|
|
159
162
|
__exportStar(require("./UsageItems"), exports);
|
|
160
163
|
__exportStar(require("./UsageType"), exports);
|
|
161
164
|
__exportStar(require("./UserGroup"), exports);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import * as generatedApis from './apis/index';
|
|
3
|
-
import { Configuration } from './runtime';
|
|
3
|
+
import { Configuration, Middleware } from './runtime';
|
|
4
4
|
|
|
5
5
|
export * from './runtime';
|
|
6
6
|
export * from './apis/index';
|
|
@@ -22,6 +22,7 @@ const APIS = Object.keys(generatedApis)
|
|
|
22
22
|
export interface FabricApiOptions {
|
|
23
23
|
apiKey: string;
|
|
24
24
|
workspaceId?: string;
|
|
25
|
+
middleware?: Middleware[];
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
type ApiKeys = {
|
|
@@ -57,6 +58,7 @@ export interface Fabric extends FabricApis {}
|
|
|
57
58
|
export class Fabric {
|
|
58
59
|
constructor(options: FabricApiOptions) {
|
|
59
60
|
const configuration = new Configuration({
|
|
61
|
+
middleware: options.middleware,
|
|
60
62
|
apiKey: options.apiKey,
|
|
61
63
|
...(options.workspaceId && {
|
|
62
64
|
headers: {
|
|
@@ -25,10 +25,11 @@ export const ChatbotModel = {
|
|
|
25
25
|
Gpt52Instant: 'gpt-5-2-instant',
|
|
26
26
|
ClaudeHaiku45: 'claude-haiku-4-5',
|
|
27
27
|
ClaudeSonnet45: 'claude-sonnet-4-5',
|
|
28
|
-
|
|
28
|
+
ClaudeOpus46: 'claude-opus-4-6',
|
|
29
29
|
Gemini3Flash: 'gemini-3-flash',
|
|
30
30
|
Gemini3Pro: 'gemini-3-pro',
|
|
31
31
|
Grok4: 'grok-4',
|
|
32
|
+
ClaudeOpus45: 'claude-opus-4-5',
|
|
32
33
|
Gpt4o: 'gpt-4o',
|
|
33
34
|
Gpt41: 'gpt-4-1',
|
|
34
35
|
Gemini25Flash: 'gemini-2-5-flash'
|
|
@@ -127,6 +127,12 @@ export interface PlanEntitlements {
|
|
|
127
127
|
* @memberof PlanEntitlements
|
|
128
128
|
*/
|
|
129
129
|
'maxDelegatedWorkspaces'?: number;
|
|
130
|
+
/**
|
|
131
|
+
*
|
|
132
|
+
* @type {boolean}
|
|
133
|
+
* @memberof PlanEntitlements
|
|
134
|
+
*/
|
|
135
|
+
'webSearchEnabled'?: boolean;
|
|
130
136
|
}
|
|
131
137
|
|
|
132
138
|
/**
|
|
@@ -216,6 +222,9 @@ export function PlanEntitlementsFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
216
222
|
if (json['maxDelegatedWorkspaces'] !== undefined) {
|
|
217
223
|
result['maxDelegatedWorkspaces'] = json['maxDelegatedWorkspaces'];
|
|
218
224
|
}
|
|
225
|
+
if (json['webSearchEnabled'] !== undefined) {
|
|
226
|
+
result['webSearchEnabled'] = json['webSearchEnabled'];
|
|
227
|
+
}
|
|
219
228
|
return result;
|
|
220
229
|
}
|
|
221
230
|
|
|
@@ -248,6 +257,7 @@ export function PlanEntitlementsToJSONTyped(value?: PlanEntitlements | null, ign
|
|
|
248
257
|
'requestsPerHour': value['requestsPerHour'],
|
|
249
258
|
'unitPricePerGB': value['unitPricePerGB'],
|
|
250
259
|
'maxDelegatedWorkspaces': value['maxDelegatedWorkspaces'],
|
|
260
|
+
'webSearchEnabled': value['webSearchEnabled'],
|
|
251
261
|
};
|
|
252
262
|
}
|
|
253
263
|
|
|
@@ -75,6 +75,12 @@ export interface SearchRequestAllOfFilters {
|
|
|
75
75
|
* @memberof SearchRequestAllOfFilters
|
|
76
76
|
*/
|
|
77
77
|
'tagIds'?: Array<string>;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof SearchRequestAllOfFilters
|
|
82
|
+
*/
|
|
83
|
+
'userId'?: string;
|
|
78
84
|
/**
|
|
79
85
|
*
|
|
80
86
|
* @type {Array<string>}
|
|
@@ -159,6 +165,9 @@ export function SearchRequestAllOfFiltersFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
159
165
|
if (json['tagIds'] !== undefined) {
|
|
160
166
|
result['tagIds'] = json['tagIds'];
|
|
161
167
|
}
|
|
168
|
+
if (json['userId'] !== undefined) {
|
|
169
|
+
result['userId'] = json['userId'];
|
|
170
|
+
}
|
|
162
171
|
if (json['userIds'] !== undefined) {
|
|
163
172
|
result['userIds'] = json['userIds'];
|
|
164
173
|
}
|
|
@@ -198,6 +207,7 @@ export function SearchRequestAllOfFiltersToJSONTyped(value?: SearchRequestAllOfF
|
|
|
198
207
|
'roots': value['roots'] == null ? undefined : ((value['roots'] as Array<any>).map(SearchRequestAllOfFiltersRootsInnerToJSON)),
|
|
199
208
|
'excludeRoots': value['excludeRoots'] == null ? undefined : ((value['excludeRoots'] as Array<any>).map(SearchRequestAllOfFiltersRootsInnerToJSON)),
|
|
200
209
|
'tagIds': value['tagIds'],
|
|
210
|
+
'userId': value['userId'],
|
|
201
211
|
'userIds': value['userIds'],
|
|
202
212
|
'createdAfter': value['createdAfter'],
|
|
203
213
|
'createdBefore': value['createdBefore'],
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Fabric API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.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
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const UsageAmountType = {
|
|
21
|
+
Consumed: 'consumed',
|
|
22
|
+
Remaining: 'remaining'
|
|
23
|
+
} as const;
|
|
24
|
+
export type UsageAmountType = typeof UsageAmountType[keyof typeof UsageAmountType];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfUsageAmountType(value: any): boolean {
|
|
28
|
+
for (const key in UsageAmountType) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(UsageAmountType, key)) {
|
|
30
|
+
if (UsageAmountType[key as keyof typeof UsageAmountType] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function UsageAmountTypeFromJSON(json: any): UsageAmountType {
|
|
39
|
+
return UsageAmountTypeFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function UsageAmountTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageAmountType {
|
|
43
|
+
return json as UsageAmountType;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function UsageAmountTypeToJSON(value?: UsageAmountType | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function UsageAmountTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): UsageAmountType {
|
|
51
|
+
return value as UsageAmountType;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Fabric API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.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
|
+
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const UsageBreakdownLabel = {
|
|
21
|
+
ToppedUp: 'topped_up',
|
|
22
|
+
Included: 'included'
|
|
23
|
+
} as const;
|
|
24
|
+
export type UsageBreakdownLabel = typeof UsageBreakdownLabel[keyof typeof UsageBreakdownLabel];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfUsageBreakdownLabel(value: any): boolean {
|
|
28
|
+
for (const key in UsageBreakdownLabel) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(UsageBreakdownLabel, key)) {
|
|
30
|
+
if (UsageBreakdownLabel[key as keyof typeof UsageBreakdownLabel] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function UsageBreakdownLabelFromJSON(json: any): UsageBreakdownLabel {
|
|
39
|
+
return UsageBreakdownLabelFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function UsageBreakdownLabelFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageBreakdownLabel {
|
|
43
|
+
return json as UsageBreakdownLabel;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function UsageBreakdownLabelToJSON(value?: UsageBreakdownLabel | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function UsageBreakdownLabelToJSONTyped(value: any, ignoreDiscriminator: boolean): UsageBreakdownLabel {
|
|
51
|
+
return value as UsageBreakdownLabel;
|
|
52
|
+
}
|
|
53
|
+
|
package/src/models/UsageItem.ts
CHANGED
|
@@ -13,12 +13,51 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { UsageItemBreakdownInner } from './UsageItemBreakdownInner';
|
|
17
|
+
import {
|
|
18
|
+
UsageItemBreakdownInnerFromJSON,
|
|
19
|
+
UsageItemBreakdownInnerFromJSONTyped,
|
|
20
|
+
UsageItemBreakdownInnerToJSON,
|
|
21
|
+
UsageItemBreakdownInnerToJSONTyped,
|
|
22
|
+
} from './UsageItemBreakdownInner';
|
|
23
|
+
import type { UsageAmountType } from './UsageAmountType';
|
|
24
|
+
import {
|
|
25
|
+
UsageAmountTypeFromJSON,
|
|
26
|
+
UsageAmountTypeFromJSONTyped,
|
|
27
|
+
UsageAmountTypeToJSON,
|
|
28
|
+
UsageAmountTypeToJSONTyped,
|
|
29
|
+
} from './UsageAmountType';
|
|
30
|
+
|
|
16
31
|
/**
|
|
17
32
|
*
|
|
18
33
|
* @export
|
|
19
34
|
* @interface UsageItem
|
|
20
35
|
*/
|
|
21
36
|
export interface UsageItem {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof UsageItem
|
|
41
|
+
*/
|
|
42
|
+
'total': number | null;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof UsageItem
|
|
47
|
+
*/
|
|
48
|
+
'amount': number;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {UsageAmountType}
|
|
52
|
+
* @memberof UsageItem
|
|
53
|
+
*/
|
|
54
|
+
'amountType': UsageAmountType;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Array<UsageItemBreakdownInner>}
|
|
58
|
+
* @memberof UsageItem
|
|
59
|
+
*/
|
|
60
|
+
'breakdown'?: Array<UsageItemBreakdownInner>;
|
|
22
61
|
/**
|
|
23
62
|
*
|
|
24
63
|
* @type {number}
|
|
@@ -33,10 +72,15 @@ export interface UsageItem {
|
|
|
33
72
|
'used': number;
|
|
34
73
|
}
|
|
35
74
|
|
|
75
|
+
|
|
76
|
+
|
|
36
77
|
/**
|
|
37
78
|
* Check if a given object implements the UsageItem interface.
|
|
38
79
|
*/
|
|
39
80
|
export function instanceOfUsageItem(value: object): value is UsageItem {
|
|
81
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
82
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
83
|
+
if (!('amountType' in value) || value['amountType'] === undefined) return false;
|
|
40
84
|
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
41
85
|
if (!('used' in value) || value['used'] === undefined) return false;
|
|
42
86
|
return true;
|
|
@@ -54,6 +98,22 @@ export function UsageItemFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
54
98
|
|
|
55
99
|
} as UsageItem;
|
|
56
100
|
|
|
101
|
+
if (json['total'] !== undefined) {
|
|
102
|
+
if (json['total'] === null) {
|
|
103
|
+
result['total'] = null;
|
|
104
|
+
} else {
|
|
105
|
+
result['total'] = json['total'];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (json['amount'] !== undefined) {
|
|
109
|
+
result['amount'] = json['amount'];
|
|
110
|
+
}
|
|
111
|
+
if (json['amountType'] !== undefined) {
|
|
112
|
+
result['amountType'] = UsageAmountTypeFromJSON(json['amountType']);
|
|
113
|
+
}
|
|
114
|
+
if (json['breakdown'] !== undefined) {
|
|
115
|
+
result['breakdown'] = (json['breakdown'] as Array<any>).map(UsageItemBreakdownInnerFromJSON);
|
|
116
|
+
}
|
|
57
117
|
if (json['limit'] !== undefined) {
|
|
58
118
|
if (json['limit'] === null) {
|
|
59
119
|
result['limit'] = null;
|
|
@@ -78,6 +138,10 @@ export function UsageItemToJSONTyped(value?: UsageItem | null, ignoreDiscriminat
|
|
|
78
138
|
|
|
79
139
|
return {
|
|
80
140
|
|
|
141
|
+
'total': value['total'],
|
|
142
|
+
'amount': value['amount'],
|
|
143
|
+
'amountType': UsageAmountTypeToJSON(value['amountType']),
|
|
144
|
+
'breakdown': value['breakdown'] == null ? undefined : ((value['breakdown'] as Array<any>).map(UsageItemBreakdownInnerToJSON)),
|
|
81
145
|
'limit': value['limit'],
|
|
82
146
|
'used': value['used'],
|
|
83
147
|
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Fabric API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.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
|
+
import type { UsageBreakdownLabel } from './UsageBreakdownLabel';
|
|
17
|
+
import {
|
|
18
|
+
UsageBreakdownLabelFromJSON,
|
|
19
|
+
UsageBreakdownLabelFromJSONTyped,
|
|
20
|
+
UsageBreakdownLabelToJSON,
|
|
21
|
+
UsageBreakdownLabelToJSONTyped,
|
|
22
|
+
} from './UsageBreakdownLabel';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface UsageItemBreakdownInner
|
|
28
|
+
*/
|
|
29
|
+
export interface UsageItemBreakdownInner {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {UsageBreakdownLabel}
|
|
33
|
+
* @memberof UsageItemBreakdownInner
|
|
34
|
+
*/
|
|
35
|
+
'label': UsageBreakdownLabel;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof UsageItemBreakdownInner
|
|
40
|
+
*/
|
|
41
|
+
'amount': number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the UsageItemBreakdownInner interface.
|
|
48
|
+
*/
|
|
49
|
+
export function instanceOfUsageItemBreakdownInner(value: object): value is UsageItemBreakdownInner {
|
|
50
|
+
if (!('label' in value) || value['label'] === undefined) return false;
|
|
51
|
+
if (!('amount' in value) || value['amount'] === undefined) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function UsageItemBreakdownInnerFromJSON(json: any): UsageItemBreakdownInner {
|
|
56
|
+
return UsageItemBreakdownInnerFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function UsageItemBreakdownInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageItemBreakdownInner {
|
|
60
|
+
if (json == null) {
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
const result = {
|
|
64
|
+
|
|
65
|
+
} as UsageItemBreakdownInner;
|
|
66
|
+
|
|
67
|
+
if (json['label'] !== undefined) {
|
|
68
|
+
result['label'] = UsageBreakdownLabelFromJSON(json['label']);
|
|
69
|
+
}
|
|
70
|
+
if (json['amount'] !== undefined) {
|
|
71
|
+
result['amount'] = json['amount'];
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function UsageItemBreakdownInnerToJSON(json: any): UsageItemBreakdownInner {
|
|
77
|
+
return UsageItemBreakdownInnerToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function UsageItemBreakdownInnerToJSONTyped(value?: UsageItemBreakdownInner | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'label': UsageBreakdownLabelToJSON(value['label']),
|
|
88
|
+
'amount': value['amount'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -31,6 +31,12 @@ export interface WorkspaceSubscriptionCreditOperationCosts {
|
|
|
31
31
|
* @memberof WorkspaceSubscriptionCreditOperationCosts
|
|
32
32
|
*/
|
|
33
33
|
'ASSISTANT_MESSAGE'?: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof WorkspaceSubscriptionCreditOperationCosts
|
|
38
|
+
*/
|
|
39
|
+
'WEB_SEARCH'?: number;
|
|
34
40
|
/**
|
|
35
41
|
*
|
|
36
42
|
* @type {number}
|
|
@@ -76,6 +82,9 @@ export function WorkspaceSubscriptionCreditOperationCostsFromJSONTyped(json: any
|
|
|
76
82
|
if (json['ASSISTANT_MESSAGE'] !== undefined) {
|
|
77
83
|
result['ASSISTANT_MESSAGE'] = json['ASSISTANT_MESSAGE'];
|
|
78
84
|
}
|
|
85
|
+
if (json['WEB_SEARCH'] !== undefined) {
|
|
86
|
+
result['WEB_SEARCH'] = json['WEB_SEARCH'];
|
|
87
|
+
}
|
|
79
88
|
if (json['TOP_UP_MANUAL'] !== undefined) {
|
|
80
89
|
result['TOP_UP_MANUAL'] = json['TOP_UP_MANUAL'];
|
|
81
90
|
}
|
|
@@ -101,6 +110,7 @@ export function WorkspaceSubscriptionCreditOperationCostsToJSONTyped(value?: Wor
|
|
|
101
110
|
|
|
102
111
|
'RESOURCE_CREATED': value['RESOURCE_CREATED'],
|
|
103
112
|
'ASSISTANT_MESSAGE': value['ASSISTANT_MESSAGE'],
|
|
113
|
+
'WEB_SEARCH': value['WEB_SEARCH'],
|
|
104
114
|
'TOP_UP_MANUAL': value['TOP_UP_MANUAL'],
|
|
105
115
|
'TOP_UP_PLAN': value['TOP_UP_PLAN'],
|
|
106
116
|
'TOP_UP_AUTO': value['TOP_UP_AUTO'],
|
package/src/models/index.ts
CHANGED
|
@@ -139,7 +139,10 @@ export * from './SystemSubtypes';
|
|
|
139
139
|
export * from './Tag';
|
|
140
140
|
export * from './ToolStatus';
|
|
141
141
|
export * from './UpdateMemoryRequest';
|
|
142
|
+
export * from './UsageAmountType';
|
|
143
|
+
export * from './UsageBreakdownLabel';
|
|
142
144
|
export * from './UsageItem';
|
|
145
|
+
export * from './UsageItemBreakdownInner';
|
|
143
146
|
export * from './UsageItems';
|
|
144
147
|
export * from './UsageType';
|
|
145
148
|
export * from './UserGroup';
|