@fbrc/sdk 0.0.13 → 0.0.14
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 +1 -1
- package/.openapi-generator-ignore +1 -0
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/models/PlanEntitlements.d.ts +6 -0
- package/dist/esm/models/PlanEntitlements.js +4 -0
- package/dist/esm/models/StorageUsageItem.d.ts +65 -0
- package/dist/esm/models/StorageUsageItem.js +85 -0
- package/dist/esm/models/UpdateResourceRequestLocationAnyOf.d.ts +32 -0
- package/dist/esm/models/UpdateResourceRequestLocationAnyOf.js +45 -0
- package/dist/esm/models/UpdateResourceRequestLocationAnyOf1.d.ts +32 -0
- package/dist/esm/models/UpdateResourceRequestLocationAnyOf1.js +45 -0
- package/dist/esm/models/UsageItem.d.ts +9 -8
- package/dist/esm/models/UsageItem.js +12 -22
- package/dist/esm/models/UsageItems.d.ts +9 -2
- package/dist/esm/models/UsageItems.js +7 -2
- package/dist/esm/models/UsageType.d.ts +1 -0
- package/dist/esm/models/UsageType.js +2 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/examples/src/index.d.ts +1 -0
- package/dist/examples/src/index.js +69 -0
- package/dist/examples/src/utils/client.d.ts +2 -0
- package/dist/examples/src/utils/client.js +39 -0
- package/dist/examples/src/utils/random.d.ts +1 -0
- package/dist/examples/src/utils/random.js +7 -0
- package/dist/examples/src/workspaces.d.ts +7 -0
- package/dist/examples/src/workspaces.js +62 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/models/PlanEntitlements.d.ts +6 -0
- package/dist/models/PlanEntitlements.js +4 -0
- package/dist/models/StorageUsageItem.d.ts +65 -0
- package/dist/models/StorageUsageItem.js +92 -0
- package/dist/models/UpdateResourceRequestLocationAnyOf.d.ts +32 -0
- package/dist/models/UpdateResourceRequestLocationAnyOf.js +52 -0
- package/dist/models/UpdateResourceRequestLocationAnyOf1.d.ts +32 -0
- package/dist/models/UpdateResourceRequestLocationAnyOf1.js +52 -0
- package/dist/models/UsageItem.d.ts +9 -8
- package/dist/models/UsageItem.js +12 -22
- package/dist/models/UsageItems.d.ts +9 -2
- package/dist/models/UsageItems.js +7 -2
- package/dist/models/UsageType.d.ts +1 -0
- package/dist/models/UsageType.js +2 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/src/apis/BookmarksApi.d.ts +29 -0
- package/dist/src/apis/BookmarksApi.js +68 -0
- package/dist/src/apis/CommentsApi.d.ts +33 -0
- package/dist/src/apis/CommentsApi.js +79 -0
- package/dist/src/apis/FilesApi.d.ts +31 -0
- package/dist/src/apis/FilesApi.js +70 -0
- package/dist/src/apis/FoldersApi.d.ts +29 -0
- package/dist/src/apis/FoldersApi.js +68 -0
- package/dist/src/apis/MemoriesApi.d.ts +104 -0
- package/dist/src/apis/MemoriesApi.js +273 -0
- package/dist/src/apis/NotepadsApi.d.ts +41 -0
- package/dist/src/apis/NotepadsApi.js +110 -0
- package/dist/src/apis/ResourceRootsApi.d.ts +49 -0
- package/dist/src/apis/ResourceRootsApi.js +127 -0
- package/dist/src/apis/ResourcesApi.d.ts +65 -0
- package/dist/src/apis/ResourcesApi.js +179 -0
- package/dist/src/apis/SearchApi.d.ts +29 -0
- package/dist/src/apis/SearchApi.js +68 -0
- package/dist/src/apis/SpacesApi.d.ts +42 -0
- package/dist/src/apis/SpacesApi.js +107 -0
- package/dist/src/apis/SubscriptionsApi.d.ts +30 -0
- package/dist/src/apis/SubscriptionsApi.js +69 -0
- package/dist/src/apis/TagsApi.d.ts +43 -0
- package/dist/src/apis/TagsApi.js +110 -0
- package/dist/src/apis/UploadsApi.d.ts +34 -0
- package/dist/src/apis/UploadsApi.js +80 -0
- package/dist/src/apis/UsersApi.d.ts +29 -0
- package/dist/src/apis/UsersApi.js +66 -0
- package/dist/src/apis/WorkspacesApi.d.ts +97 -0
- package/dist/src/apis/WorkspacesApi.js +256 -0
- package/dist/src/apis/index.d.ts +15 -0
- package/dist/src/apis/index.js +33 -0
- package/dist/src/index.d.ts +27 -0
- package/dist/src/index.js +49 -0
- package/dist/src/models/AcceptWorkspaceRemovalRequest.d.ts +32 -0
- package/dist/src/models/AcceptWorkspaceRemovalRequest.js +52 -0
- package/dist/src/models/AssistantChat.d.ts +56 -0
- package/dist/src/models/AssistantChat.js +79 -0
- package/dist/src/models/AssistantMessage.d.ts +91 -0
- package/dist/src/models/AssistantMessage.js +127 -0
- package/dist/src/models/AssistantMessageAllOfContext.d.ts +38 -0
- package/dist/src/models/AssistantMessageAllOfContext.js +54 -0
- package/dist/src/models/AssistantMessageBase.d.ts +53 -0
- package/dist/src/models/AssistantMessageBase.js +79 -0
- package/dist/src/models/AssistantMessagePart.d.ts +23 -0
- package/dist/src/models/AssistantMessagePart.js +57 -0
- package/dist/src/models/AssistantMessagePartOneOf.d.ts +45 -0
- package/dist/src/models/AssistantMessagePartOneOf.js +65 -0
- package/dist/src/models/AssistantMessagePartOneOf1.d.ts +78 -0
- package/dist/src/models/AssistantMessagePartOneOf1.js +97 -0
- package/dist/src/models/BillingCycle.d.ts +27 -0
- package/dist/src/models/BillingCycle.js +53 -0
- package/dist/src/models/BookmarkCreationResponse.d.ts +197 -0
- package/dist/src/models/BookmarkCreationResponse.js +291 -0
- package/dist/src/models/ChatbotModel.d.ts +38 -0
- package/dist/src/models/ChatbotModel.js +64 -0
- package/dist/src/models/CommentCreate.d.ts +32 -0
- package/dist/src/models/CommentCreate.js +50 -0
- package/dist/src/models/CommentWithAuthor.d.ts +69 -0
- package/dist/src/models/CommentWithAuthor.js +94 -0
- package/dist/src/models/CreateBookmarkRequest.d.ts +59 -0
- package/dist/src/models/CreateBookmarkRequest.js +83 -0
- package/dist/src/models/CreateBookmarkRequestParentId.d.ts +26 -0
- package/dist/src/models/CreateBookmarkRequestParentId.js +38 -0
- package/dist/src/models/CreateBookmarkRequestTagsInner.d.ts +38 -0
- package/dist/src/models/CreateBookmarkRequestTagsInner.js +58 -0
- package/dist/src/models/CreateBookmarkRequestTagsInnerAnyOf.d.ts +32 -0
- package/dist/src/models/CreateBookmarkRequestTagsInnerAnyOf.js +52 -0
- package/dist/src/models/CreateBookmarkRequestTagsInnerAnyOf1.d.ts +32 -0
- package/dist/src/models/CreateBookmarkRequestTagsInnerAnyOf1.js +52 -0
- package/dist/src/models/CreateFile201Response.d.ts +197 -0
- package/dist/src/models/CreateFile201Response.js +291 -0
- package/dist/src/models/CreateFolderRequest.d.ts +52 -0
- package/dist/src/models/CreateFolderRequest.js +81 -0
- package/dist/src/models/CreateFolderRequestIcon.d.ts +24 -0
- package/dist/src/models/CreateFolderRequestIcon.js +64 -0
- package/dist/src/models/CreateFolderRequestIconOneOf.d.ts +45 -0
- package/dist/src/models/CreateFolderRequestIconOneOf.js +65 -0
- package/dist/src/models/CreateFolderRequestIconOneOf1.d.ts +45 -0
- package/dist/src/models/CreateFolderRequestIconOneOf1.js +65 -0
- package/dist/src/models/CreateFolderRequestIconOneOf2.d.ts +45 -0
- package/dist/src/models/CreateFolderRequestIconOneOf2.js +65 -0
- package/dist/src/models/CreateNotepadRequest.d.ts +59 -0
- package/dist/src/models/CreateNotepadRequest.js +83 -0
- package/dist/src/models/CreateNotepadRequestAllOfAnyOf.d.ts +32 -0
- package/dist/src/models/CreateNotepadRequestAllOfAnyOf.js +52 -0
- package/dist/src/models/CreateSpaceRequest.d.ts +50 -0
- package/dist/src/models/CreateSpaceRequest.js +73 -0
- package/dist/src/models/CreateSpaceRequestAnyOf.d.ts +38 -0
- package/dist/src/models/CreateSpaceRequestAnyOf.js +61 -0
- package/dist/src/models/CreateSpaceRequestAnyOf1.d.ts +32 -0
- package/dist/src/models/CreateSpaceRequestAnyOf1.js +52 -0
- package/dist/src/models/CreateSpaceRequestAnyOf2.d.ts +38 -0
- package/dist/src/models/CreateSpaceRequestAnyOf2.js +56 -0
- package/dist/src/models/CreateTagRequest.d.ts +44 -0
- package/dist/src/models/CreateTagRequest.js +70 -0
- package/dist/src/models/CreateWorkspaceRequest.d.ts +50 -0
- package/dist/src/models/CreateWorkspaceRequest.js +67 -0
- package/dist/src/models/EmailMessageMetadataBlock.d.ts +52 -0
- package/dist/src/models/EmailMessageMetadataBlock.js +78 -0
- package/dist/src/models/EmailMessageMetadataBlockEmailMessage.d.ts +68 -0
- package/dist/src/models/EmailMessageMetadataBlockEmailMessage.js +123 -0
- package/dist/src/models/EmailMessageMetadataBlockEmailPreview.d.ts +32 -0
- package/dist/src/models/EmailMessageMetadataBlockEmailPreview.js +57 -0
- package/dist/src/models/FileCreation.d.ts +79 -0
- package/dist/src/models/FileCreation.js +99 -0
- package/dist/src/models/FileCreationAttachment.d.ts +38 -0
- package/dist/src/models/FileCreationAttachment.js +58 -0
- package/dist/src/models/FileCreationMetadata.d.ts +39 -0
- package/dist/src/models/FileCreationMetadata.js +65 -0
- package/dist/src/models/FileCreationMetadataTranscript.d.ts +32 -0
- package/dist/src/models/FileCreationMetadataTranscript.js +52 -0
- package/dist/src/models/FilterResourcesRequest.d.ts +187 -0
- package/dist/src/models/FilterResourcesRequest.js +185 -0
- package/dist/src/models/FilterResourcesRequestOrder.d.ts +57 -0
- package/dist/src/models/FilterResourcesRequestOrder.js +74 -0
- package/dist/src/models/FilterResourcesRequestParentRoot.d.ts +65 -0
- package/dist/src/models/FilterResourcesRequestParentRoot.js +79 -0
- package/dist/src/models/Folder.d.ts +63 -0
- package/dist/src/models/Folder.js +88 -0
- package/dist/src/models/FolderAllOfIcon.d.ts +58 -0
- package/dist/src/models/FolderAllOfIcon.js +78 -0
- package/dist/src/models/FolderBase.d.ts +38 -0
- package/dist/src/models/FolderBase.js +63 -0
- package/dist/src/models/IntegrationStatus.d.ts +26 -0
- package/dist/src/models/IntegrationStatus.js +52 -0
- package/dist/src/models/IntegrationType.d.ts +35 -0
- package/dist/src/models/IntegrationType.js +61 -0
- package/dist/src/models/Kind.d.ts +35 -0
- package/dist/src/models/Kind.js +61 -0
- package/dist/src/models/ListResourceComments200Response.d.ts +39 -0
- package/dist/src/models/ListResourceComments200Response.js +59 -0
- package/dist/src/models/ListResourceComments200ResponseData.d.ts +33 -0
- package/dist/src/models/ListResourceComments200ResponseData.js +53 -0
- package/dist/src/models/ListResourceComments404Response.d.ts +52 -0
- package/dist/src/models/ListResourceComments404Response.js +71 -0
- package/dist/src/models/ListResourceRoots200Response.d.ts +39 -0
- package/dist/src/models/ListResourceRoots200Response.js +59 -0
- package/dist/src/models/ListResourceRoots200ResponseData.d.ts +58 -0
- package/dist/src/models/ListResourceRoots200ResponseData.js +70 -0
- package/dist/src/models/ListResourceRoots200ResponseDataIntegrationsInner.d.ts +102 -0
- package/dist/src/models/ListResourceRoots200ResponseDataIntegrationsInner.js +130 -0
- package/dist/src/models/ListResourceRoots200ResponseDataSharedWithValue.d.ts +39 -0
- package/dist/src/models/ListResourceRoots200ResponseDataSharedWithValue.js +59 -0
- package/dist/src/models/ListResourceRoots200ResponseDataSharedWithValueMembersInner.d.ts +51 -0
- package/dist/src/models/ListResourceRoots200ResponseDataSharedWithValueMembersInner.js +77 -0
- package/dist/src/models/ListResourceRoots200ResponseDataSharedWithValueMembersInnerAllOfPermission.d.ts +33 -0
- package/dist/src/models/ListResourceRoots200ResponseDataSharedWithValueMembersInnerAllOfPermission.js +53 -0
- package/dist/src/models/ListResourceRootsOrderParameter.d.ts +54 -0
- package/dist/src/models/ListResourceRootsOrderParameter.js +71 -0
- package/dist/src/models/ListResourceRootsTypesParameterInner.d.ts +59 -0
- package/dist/src/models/ListResourceRootsTypesParameterInner.js +75 -0
- package/dist/src/models/ListTags200Response.d.ts +39 -0
- package/dist/src/models/ListTags200Response.js +59 -0
- package/dist/src/models/ListTags200ResponseData.d.ts +33 -0
- package/dist/src/models/ListTags200ResponseData.js +53 -0
- package/dist/src/models/ListWorkspaces200Response.d.ts +39 -0
- package/dist/src/models/ListWorkspaces200Response.js +59 -0
- package/dist/src/models/ListWorkspaces200ResponseData.d.ts +33 -0
- package/dist/src/models/ListWorkspaces200ResponseData.js +53 -0
- package/dist/src/models/Memory.d.ts +56 -0
- package/dist/src/models/Memory.js +81 -0
- package/dist/src/models/MemoryJob.d.ts +23 -0
- package/dist/src/models/MemoryJob.js +57 -0
- package/dist/src/models/MemoryJobOneOf.d.ts +52 -0
- package/dist/src/models/MemoryJobOneOf.js +72 -0
- package/dist/src/models/MemoryJobOneOf1.d.ts +45 -0
- package/dist/src/models/MemoryJobOneOf1.js +65 -0
- package/dist/src/models/MemoryJobOneOfMemories.d.ts +32 -0
- package/dist/src/models/MemoryJobOneOfMemories.js +52 -0
- package/dist/src/models/MemoryJobSource.d.ts +57 -0
- package/dist/src/models/MemoryJobSource.js +73 -0
- package/dist/src/models/MineProfile.d.ts +81 -0
- package/dist/src/models/MineProfile.js +118 -0
- package/dist/src/models/PatchWorkspaceRequest.d.ts +50 -0
- package/dist/src/models/PatchWorkspaceRequest.js +72 -0
- package/dist/src/models/Permission.d.ts +57 -0
- package/dist/src/models/Permission.js +77 -0
- package/dist/src/models/PermissionRole.d.ts +27 -0
- package/dist/src/models/PermissionRole.js +53 -0
- package/dist/src/models/PermissionWithUser.d.ts +64 -0
- package/dist/src/models/PermissionWithUser.js +84 -0
- package/dist/src/models/PlanEntitlements.d.ts +146 -0
- package/dist/src/models/PlanEntitlements.js +154 -0
- package/dist/src/models/PresignedImage.d.ts +50 -0
- package/dist/src/models/PresignedImage.js +79 -0
- package/dist/src/models/PresignedResponse.d.ts +39 -0
- package/dist/src/models/PresignedResponse.js +59 -0
- package/dist/src/models/PresignedResponseHeaders.d.ts +38 -0
- package/dist/src/models/PresignedResponseHeaders.js +64 -0
- package/dist/src/models/PresignedResponseHeadersAnyOf.d.ts +38 -0
- package/dist/src/models/PresignedResponseHeadersAnyOf.js +64 -0
- package/dist/src/models/ProcessingState.d.ts +27 -0
- package/dist/src/models/ProcessingState.js +53 -0
- package/dist/src/models/PublicIntegrationSchema.d.ts +102 -0
- package/dist/src/models/PublicIntegrationSchema.js +130 -0
- package/dist/src/models/RecoverResourcesRequest.d.ts +32 -0
- package/dist/src/models/RecoverResourcesRequest.js +52 -0
- package/dist/src/models/RemoveResourcesRequest.d.ts +38 -0
- package/dist/src/models/RemoveResourcesRequest.js +56 -0
- package/dist/src/models/RemoveSpace404Response.d.ts +52 -0
- package/dist/src/models/RemoveSpace404Response.js +71 -0
- package/dist/src/models/Resource.d.ts +191 -0
- package/dist/src/models/Resource.js +285 -0
- package/dist/src/models/ResourceDetail.d.ts +54 -0
- package/dist/src/models/ResourceDetail.js +98 -0
- package/dist/src/models/ResourceDetailAudio.d.ts +197 -0
- package/dist/src/models/ResourceDetailAudio.js +291 -0
- package/dist/src/models/ResourceDetailBookmark.d.ts +197 -0
- package/dist/src/models/ResourceDetailBookmark.js +291 -0
- package/dist/src/models/ResourceDetailDefault.d.ts +197 -0
- package/dist/src/models/ResourceDetailDefault.js +291 -0
- package/dist/src/models/ResourceDetailDocument.d.ts +197 -0
- package/dist/src/models/ResourceDetailDocument.js +291 -0
- package/dist/src/models/ResourceDetailEmailMessage.d.ts +204 -0
- package/dist/src/models/ResourceDetailEmailMessage.js +298 -0
- package/dist/src/models/ResourceDetailFolder.d.ts +197 -0
- package/dist/src/models/ResourceDetailFolder.js +291 -0
- package/dist/src/models/ResourceDetailHighlight.d.ts +197 -0
- package/dist/src/models/ResourceDetailHighlight.js +291 -0
- package/dist/src/models/ResourceDetailImage.d.ts +197 -0
- package/dist/src/models/ResourceDetailImage.js +291 -0
- package/dist/src/models/ResourceDetailNotepad.d.ts +197 -0
- package/dist/src/models/ResourceDetailNotepad.js +291 -0
- package/dist/src/models/ResourceDetailVideo.d.ts +197 -0
- package/dist/src/models/ResourceDetailVideo.js +291 -0
- package/dist/src/models/ResourceDetailVoicenote.d.ts +197 -0
- package/dist/src/models/ResourceDetailVoicenote.js +291 -0
- package/dist/src/models/ResourceFilterResponse.d.ts +51 -0
- package/dist/src/models/ResourceFilterResponse.js +74 -0
- package/dist/src/models/ResourceIcon.d.ts +24 -0
- package/dist/src/models/ResourceIcon.js +64 -0
- package/dist/src/models/ResourceIconOneOf.d.ts +45 -0
- package/dist/src/models/ResourceIconOneOf.js +65 -0
- package/dist/src/models/ResourceIconOneOf1.d.ts +45 -0
- package/dist/src/models/ResourceIconOneOf1.js +65 -0
- package/dist/src/models/ResourceIconOneOf2.d.ts +46 -0
- package/dist/src/models/ResourceIconOneOf2.js +66 -0
- package/dist/src/models/ResourceLabel.d.ts +38 -0
- package/dist/src/models/ResourceLabel.js +58 -0
- package/dist/src/models/ResourceParent.d.ts +38 -0
- package/dist/src/models/ResourceParent.js +63 -0
- package/dist/src/models/ResourcePublishedAncestorsInner.d.ts +38 -0
- package/dist/src/models/ResourcePublishedAncestorsInner.js +58 -0
- package/dist/src/models/ResourceRoot.d.ts +78 -0
- package/dist/src/models/ResourceRoot.js +103 -0
- package/dist/src/models/ResourceRootBase.d.ts +70 -0
- package/dist/src/models/ResourceRootBase.js +93 -0
- package/dist/src/models/ResourceRootDetail.d.ts +83 -0
- package/dist/src/models/ResourceRootDetail.js +106 -0
- package/dist/src/models/ResourceRootFolder.d.ts +45 -0
- package/dist/src/models/ResourceRootFolder.js +73 -0
- package/dist/src/models/ResourceRootIntegration.d.ts +83 -0
- package/dist/src/models/ResourceRootIntegration.js +106 -0
- package/dist/src/models/ResourceRootListItem.d.ts +84 -0
- package/dist/src/models/ResourceRootListItem.js +112 -0
- package/dist/src/models/ResourceRootSpace.d.ts +82 -0
- package/dist/src/models/ResourceRootSpace.js +110 -0
- package/dist/src/models/ResourceRootSystem.d.ts +83 -0
- package/dist/src/models/ResourceRootSystem.js +106 -0
- package/dist/src/models/ResourceTagsInner.d.ts +38 -0
- package/dist/src/models/ResourceTagsInner.js +58 -0
- package/dist/src/models/ResourceThumbnail.d.ts +56 -0
- package/dist/src/models/ResourceThumbnail.js +66 -0
- package/dist/src/models/RootAlias.d.ts +25 -0
- package/dist/src/models/RootAlias.js +51 -0
- package/dist/src/models/RootType.d.ts +26 -0
- package/dist/src/models/RootType.js +52 -0
- package/dist/src/models/Search200Response.d.ts +45 -0
- package/dist/src/models/Search200Response.js +65 -0
- package/dist/src/models/Search200ResponseHitsInner.d.ts +40 -0
- package/dist/src/models/Search200ResponseHitsInner.js +55 -0
- package/dist/src/models/Search200ResponseHitsInnerAllOfEmbeddings.d.ts +38 -0
- package/dist/src/models/Search200ResponseHitsInnerAllOfEmbeddings.js +54 -0
- package/dist/src/models/SearchMemories200Response.d.ts +45 -0
- package/dist/src/models/SearchMemories200Response.js +65 -0
- package/dist/src/models/SearchMemories200ResponseHitsInner.d.ts +62 -0
- package/dist/src/models/SearchMemories200ResponseHitsInner.js +85 -0
- package/dist/src/models/SearchMemoriesOrderParameter.d.ts +56 -0
- package/dist/src/models/SearchMemoriesOrderParameter.js +73 -0
- package/dist/src/models/SearchRequest.d.ts +72 -0
- package/dist/src/models/SearchRequest.js +85 -0
- package/dist/src/models/SearchRequestAllOfFilters.d.ts +117 -0
- package/dist/src/models/SearchRequestAllOfFilters.js +123 -0
- package/dist/src/models/SearchRequestAllOfFiltersRootsInner.d.ts +65 -0
- package/dist/src/models/SearchRequestAllOfFiltersRootsInner.js +81 -0
- package/dist/src/models/SearchRequestAllOfOneOf.d.ts +32 -0
- package/dist/src/models/SearchRequestAllOfOneOf.js +52 -0
- package/dist/src/models/SearchRequestAllOfPagination.d.ts +38 -0
- package/dist/src/models/SearchRequestAllOfPagination.js +54 -0
- package/dist/src/models/SearchRequestAllOfQueriesInner.d.ts +45 -0
- package/dist/src/models/SearchRequestAllOfQueriesInner.js +61 -0
- package/dist/src/models/SearchRequestAllOfSort.d.ts +56 -0
- package/dist/src/models/SearchRequestAllOfSort.js +73 -0
- package/dist/src/models/SharingFilters.d.ts +28 -0
- package/dist/src/models/SharingFilters.js +54 -0
- package/dist/src/models/Space.d.ts +38 -0
- package/dist/src/models/Space.js +63 -0
- package/dist/src/models/StorageUsageItem.d.ts +65 -0
- package/dist/src/models/StorageUsageItem.js +92 -0
- package/dist/src/models/Store.d.ts +27 -0
- package/dist/src/models/Store.js +53 -0
- package/dist/src/models/SubscriptionStatus.d.ts +31 -0
- package/dist/src/models/SubscriptionStatus.js +57 -0
- package/dist/src/models/SubscriptionTier.d.ts +31 -0
- package/dist/src/models/SubscriptionTier.js +57 -0
- package/dist/src/models/SystemSubtypes.d.ts +25 -0
- package/dist/src/models/SystemSubtypes.js +51 -0
- package/dist/src/models/Tag.d.ts +62 -0
- package/dist/src/models/Tag.js +93 -0
- package/dist/src/models/ToolStatus.d.ts +27 -0
- package/dist/src/models/ToolStatus.js +53 -0
- package/dist/src/models/UpdateMemoryRequest.d.ts +38 -0
- package/dist/src/models/UpdateMemoryRequest.js +59 -0
- package/dist/src/models/UsageAmountType.d.ts +25 -0
- package/dist/src/models/UsageAmountType.js +51 -0
- package/dist/src/models/UsageBreakdownLabel.d.ts +25 -0
- package/dist/src/models/UsageBreakdownLabel.js +51 -0
- package/dist/src/models/UsageItem.d.ts +65 -0
- package/dist/src/models/UsageItem.js +82 -0
- package/dist/src/models/UsageItemBreakdownInner.d.ts +39 -0
- package/dist/src/models/UsageItemBreakdownInner.js +59 -0
- package/dist/src/models/UsageItems.d.ts +58 -0
- package/dist/src/models/UsageItems.js +68 -0
- package/dist/src/models/UsageType.d.ts +28 -0
- package/dist/src/models/UsageType.js +54 -0
- package/dist/src/models/UserGroup.d.ts +32 -0
- package/dist/src/models/UserGroup.js +58 -0
- package/dist/src/models/UserProfilePublic.d.ts +44 -0
- package/dist/src/models/UserProfilePublic.js +70 -0
- package/dist/src/models/Workspace.d.ts +101 -0
- package/dist/src/models/Workspace.js +149 -0
- package/dist/src/models/WorkspaceReferral.d.ts +44 -0
- package/dist/src/models/WorkspaceReferral.js +73 -0
- package/dist/src/models/WorkspaceRole.d.ts +64 -0
- package/dist/src/models/WorkspaceRole.js +84 -0
- package/dist/src/models/WorkspaceRolePermissions.d.ts +62 -0
- package/dist/src/models/WorkspaceRolePermissions.js +70 -0
- package/dist/src/models/WorkspaceRoleType.d.ts +25 -0
- package/dist/src/models/WorkspaceRoleType.js +51 -0
- package/dist/src/models/WorkspaceSubscription.d.ts +99 -0
- package/dist/src/models/WorkspaceSubscription.js +159 -0
- package/dist/src/models/WorkspaceSubscriptionCreditOperationCosts.d.ts +62 -0
- package/dist/src/models/WorkspaceSubscriptionCreditOperationCosts.js +70 -0
- package/dist/src/models/WorkspaceType.d.ts +27 -0
- package/dist/src/models/WorkspaceType.js +53 -0
- package/dist/src/models/index.d.ts +156 -0
- package/dist/src/models/index.js +174 -0
- package/dist/src/runtime.d.ts +187 -0
- package/dist/src/runtime.js +353 -0
- package/examples/bun.lock +40 -0
- package/examples/package.json +19 -0
- package/examples/src/index.ts +70 -0
- package/examples/src/utils/client.ts +29 -0
- package/examples/src/utils/random.ts +5 -0
- package/examples/src/workspaces.ts +47 -0
- package/examples/tsconfig.json +29 -0
- package/package.json +1 -1
- package/src/index.ts +5 -1
- package/src/models/PlanEntitlements.ts +10 -0
- package/src/models/StorageUsageItem.ts +150 -0
- package/src/models/UsageItem.ts +19 -26
- package/src/models/UsageItems.ts +21 -4
- package/src/models/UsageType.ts +2 -1
- package/src/models/index.ts +1 -0
- package/tsconfig.json +2 -7
|
@@ -0,0 +1,353 @@
|
|
|
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.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
|
|
26
|
+
exports.querystring = querystring;
|
|
27
|
+
exports.exists = exists;
|
|
28
|
+
exports.mapValues = mapValues;
|
|
29
|
+
exports.canConsumeForm = canConsumeForm;
|
|
30
|
+
exports.BASE_PATH = "https://api.fabric.so".replace(/\/+$/, "");
|
|
31
|
+
class Configuration {
|
|
32
|
+
constructor(configuration = {}) {
|
|
33
|
+
this.configuration = configuration;
|
|
34
|
+
}
|
|
35
|
+
set config(configuration) {
|
|
36
|
+
this.configuration = configuration;
|
|
37
|
+
}
|
|
38
|
+
get basePath() {
|
|
39
|
+
return this.configuration.basePath != null ? this.configuration.basePath : exports.BASE_PATH;
|
|
40
|
+
}
|
|
41
|
+
get fetchApi() {
|
|
42
|
+
return this.configuration.fetchApi;
|
|
43
|
+
}
|
|
44
|
+
get middleware() {
|
|
45
|
+
return this.configuration.middleware || [];
|
|
46
|
+
}
|
|
47
|
+
get queryParamsStringify() {
|
|
48
|
+
return this.configuration.queryParamsStringify || querystring;
|
|
49
|
+
}
|
|
50
|
+
get username() {
|
|
51
|
+
return this.configuration.username;
|
|
52
|
+
}
|
|
53
|
+
get password() {
|
|
54
|
+
return this.configuration.password;
|
|
55
|
+
}
|
|
56
|
+
get apiKey() {
|
|
57
|
+
const apiKey = this.configuration.apiKey;
|
|
58
|
+
if (apiKey) {
|
|
59
|
+
return typeof apiKey === 'function' ? apiKey : () => apiKey;
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
get accessToken() {
|
|
64
|
+
const accessToken = this.configuration.accessToken;
|
|
65
|
+
if (accessToken) {
|
|
66
|
+
return typeof accessToken === 'function' ? accessToken : () => __awaiter(this, void 0, void 0, function* () { return accessToken; });
|
|
67
|
+
}
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
get headers() {
|
|
71
|
+
return this.configuration.headers;
|
|
72
|
+
}
|
|
73
|
+
get credentials() {
|
|
74
|
+
return this.configuration.credentials;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.Configuration = Configuration;
|
|
78
|
+
exports.DefaultConfig = new Configuration();
|
|
79
|
+
/**
|
|
80
|
+
* This is the base class for all generated API classes.
|
|
81
|
+
*/
|
|
82
|
+
class BaseAPI {
|
|
83
|
+
constructor(configuration = exports.DefaultConfig) {
|
|
84
|
+
this.configuration = configuration;
|
|
85
|
+
this.fetchApi = (url, init) => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
let fetchParams = { url, init };
|
|
87
|
+
for (const middleware of this.middleware) {
|
|
88
|
+
if (middleware.pre) {
|
|
89
|
+
fetchParams = (yield middleware.pre(Object.assign({ fetch: this.fetchApi }, fetchParams))) || fetchParams;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
let response = undefined;
|
|
93
|
+
try {
|
|
94
|
+
response = yield (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
95
|
+
}
|
|
96
|
+
catch (e) {
|
|
97
|
+
for (const middleware of this.middleware) {
|
|
98
|
+
if (middleware.onError) {
|
|
99
|
+
response = (yield middleware.onError({
|
|
100
|
+
fetch: this.fetchApi,
|
|
101
|
+
url: fetchParams.url,
|
|
102
|
+
init: fetchParams.init,
|
|
103
|
+
error: e,
|
|
104
|
+
response: response ? response.clone() : undefined,
|
|
105
|
+
})) || response;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (response === undefined) {
|
|
109
|
+
if (e instanceof Error) {
|
|
110
|
+
throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
throw e;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
for (const middleware of this.middleware) {
|
|
118
|
+
if (middleware.post) {
|
|
119
|
+
response = (yield middleware.post({
|
|
120
|
+
fetch: this.fetchApi,
|
|
121
|
+
url: fetchParams.url,
|
|
122
|
+
init: fetchParams.init,
|
|
123
|
+
response: response.clone(),
|
|
124
|
+
})) || response;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return response;
|
|
128
|
+
});
|
|
129
|
+
this.middleware = configuration.middleware;
|
|
130
|
+
}
|
|
131
|
+
withMiddleware(...middlewares) {
|
|
132
|
+
const next = this.clone();
|
|
133
|
+
next.middleware = next.middleware.concat(...middlewares);
|
|
134
|
+
return next;
|
|
135
|
+
}
|
|
136
|
+
withPreMiddleware(...preMiddlewares) {
|
|
137
|
+
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
|
138
|
+
return this.withMiddleware(...middlewares);
|
|
139
|
+
}
|
|
140
|
+
withPostMiddleware(...postMiddlewares) {
|
|
141
|
+
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
142
|
+
return this.withMiddleware(...middlewares);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Check if the given MIME is a JSON MIME.
|
|
146
|
+
* JSON MIME examples:
|
|
147
|
+
* application/json
|
|
148
|
+
* application/json; charset=UTF8
|
|
149
|
+
* APPLICATION/JSON
|
|
150
|
+
* application/vnd.company+json
|
|
151
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
152
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
153
|
+
*/
|
|
154
|
+
isJsonMime(mime) {
|
|
155
|
+
if (!mime) {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
return BaseAPI.jsonRegex.test(mime);
|
|
159
|
+
}
|
|
160
|
+
request(context, initOverrides) {
|
|
161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
const { url, init } = yield this.createFetchParams(context, initOverrides);
|
|
163
|
+
const response = yield this.fetchApi(url, init);
|
|
164
|
+
if (response && (response.status >= 200 && response.status < 300)) {
|
|
165
|
+
return response;
|
|
166
|
+
}
|
|
167
|
+
throw new ResponseError(response, 'Response returned an error code');
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
createFetchParams(context, initOverrides) {
|
|
171
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
172
|
+
let url = this.configuration.basePath + context.path;
|
|
173
|
+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
174
|
+
// only add the querystring to the URL if there are query parameters.
|
|
175
|
+
// this is done to avoid urls ending with a "?" character which buggy webservers
|
|
176
|
+
// do not handle correctly sometimes.
|
|
177
|
+
url += '?' + this.configuration.queryParamsStringify(context.query);
|
|
178
|
+
}
|
|
179
|
+
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
180
|
+
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
|
|
181
|
+
const initOverrideFn = typeof initOverrides === "function"
|
|
182
|
+
? initOverrides
|
|
183
|
+
: () => __awaiter(this, void 0, void 0, function* () { return initOverrides; });
|
|
184
|
+
const initParams = {
|
|
185
|
+
method: context.method,
|
|
186
|
+
headers,
|
|
187
|
+
body: context.body,
|
|
188
|
+
credentials: this.configuration.credentials,
|
|
189
|
+
};
|
|
190
|
+
const overriddenInit = Object.assign(Object.assign({}, initParams), (yield initOverrideFn({
|
|
191
|
+
init: initParams,
|
|
192
|
+
context,
|
|
193
|
+
})));
|
|
194
|
+
let body;
|
|
195
|
+
if (isFormData(overriddenInit.body)
|
|
196
|
+
|| (overriddenInit.body instanceof URLSearchParams)
|
|
197
|
+
|| isBlob(overriddenInit.body)) {
|
|
198
|
+
body = overriddenInit.body;
|
|
199
|
+
}
|
|
200
|
+
else if (this.isJsonMime(headers['Content-Type'])) {
|
|
201
|
+
body = JSON.stringify(overriddenInit.body);
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
body = overriddenInit.body;
|
|
205
|
+
}
|
|
206
|
+
const init = Object.assign(Object.assign({}, overriddenInit), { body });
|
|
207
|
+
if (overriddenInit.workspaceId) {
|
|
208
|
+
init.headers['X-Fabric-Workspace-Id'] = overriddenInit.workspaceId;
|
|
209
|
+
}
|
|
210
|
+
return { url, init };
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
215
|
+
* and then shallow cloning data members.
|
|
216
|
+
*/
|
|
217
|
+
clone() {
|
|
218
|
+
const constructor = this.constructor;
|
|
219
|
+
const next = new constructor(this.configuration);
|
|
220
|
+
next.middleware = this.middleware.slice();
|
|
221
|
+
return next;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
exports.BaseAPI = BaseAPI;
|
|
225
|
+
BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
|
|
226
|
+
;
|
|
227
|
+
function isBlob(value) {
|
|
228
|
+
return typeof Blob !== 'undefined' && value instanceof Blob;
|
|
229
|
+
}
|
|
230
|
+
function isFormData(value) {
|
|
231
|
+
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
232
|
+
}
|
|
233
|
+
class ResponseError extends Error {
|
|
234
|
+
constructor(response, msg) {
|
|
235
|
+
super(msg);
|
|
236
|
+
this.response = response;
|
|
237
|
+
this.name = "ResponseError";
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
exports.ResponseError = ResponseError;
|
|
241
|
+
class FetchError extends Error {
|
|
242
|
+
constructor(cause, msg) {
|
|
243
|
+
super(msg);
|
|
244
|
+
this.cause = cause;
|
|
245
|
+
this.name = "FetchError";
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
exports.FetchError = FetchError;
|
|
249
|
+
class RequiredError extends Error {
|
|
250
|
+
constructor(field, msg) {
|
|
251
|
+
super(msg);
|
|
252
|
+
this.field = field;
|
|
253
|
+
this.name = "RequiredError";
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
exports.RequiredError = RequiredError;
|
|
257
|
+
exports.COLLECTION_FORMATS = {
|
|
258
|
+
csv: ",",
|
|
259
|
+
ssv: " ",
|
|
260
|
+
tsv: "\t",
|
|
261
|
+
pipes: "|",
|
|
262
|
+
};
|
|
263
|
+
function querystring(params, prefix = '') {
|
|
264
|
+
return Object.keys(params)
|
|
265
|
+
.map(key => querystringSingleKey(key, params[key], prefix))
|
|
266
|
+
.filter(part => part.length > 0)
|
|
267
|
+
.join('&');
|
|
268
|
+
}
|
|
269
|
+
function querystringSingleKey(key, value, keyPrefix = '') {
|
|
270
|
+
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
|
271
|
+
if (value instanceof Array) {
|
|
272
|
+
const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
|
|
273
|
+
.join(`&${encodeURIComponent(fullKey)}=`);
|
|
274
|
+
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
|
275
|
+
}
|
|
276
|
+
if (value instanceof Set) {
|
|
277
|
+
const valueAsArray = Array.from(value);
|
|
278
|
+
return querystringSingleKey(key, valueAsArray, keyPrefix);
|
|
279
|
+
}
|
|
280
|
+
if (value instanceof Date) {
|
|
281
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
|
282
|
+
}
|
|
283
|
+
if (value instanceof Object) {
|
|
284
|
+
return querystring(value, fullKey);
|
|
285
|
+
}
|
|
286
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
287
|
+
}
|
|
288
|
+
function exists(json, key) {
|
|
289
|
+
const value = json[key];
|
|
290
|
+
return value !== null && value !== undefined;
|
|
291
|
+
}
|
|
292
|
+
function mapValues(data, fn) {
|
|
293
|
+
const result = {};
|
|
294
|
+
for (const key of Object.keys(data)) {
|
|
295
|
+
result[key] = fn(data[key]);
|
|
296
|
+
}
|
|
297
|
+
return result;
|
|
298
|
+
}
|
|
299
|
+
function canConsumeForm(consumes) {
|
|
300
|
+
for (const consume of consumes) {
|
|
301
|
+
if ('multipart/form-data' === consume.contentType) {
|
|
302
|
+
return true;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return false;
|
|
306
|
+
}
|
|
307
|
+
class JSONApiResponse {
|
|
308
|
+
constructor(raw, transformer = (jsonValue) => jsonValue) {
|
|
309
|
+
this.raw = raw;
|
|
310
|
+
this.transformer = transformer;
|
|
311
|
+
}
|
|
312
|
+
value() {
|
|
313
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
314
|
+
return this.transformer(yield this.raw.json());
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
exports.JSONApiResponse = JSONApiResponse;
|
|
319
|
+
class VoidApiResponse {
|
|
320
|
+
constructor(raw) {
|
|
321
|
+
this.raw = raw;
|
|
322
|
+
}
|
|
323
|
+
value() {
|
|
324
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
325
|
+
return undefined;
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
exports.VoidApiResponse = VoidApiResponse;
|
|
330
|
+
class BlobApiResponse {
|
|
331
|
+
constructor(raw) {
|
|
332
|
+
this.raw = raw;
|
|
333
|
+
}
|
|
334
|
+
value() {
|
|
335
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
336
|
+
return yield this.raw.blob();
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
;
|
|
340
|
+
}
|
|
341
|
+
exports.BlobApiResponse = BlobApiResponse;
|
|
342
|
+
class TextApiResponse {
|
|
343
|
+
constructor(raw) {
|
|
344
|
+
this.raw = raw;
|
|
345
|
+
}
|
|
346
|
+
value() {
|
|
347
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
348
|
+
return yield this.raw.text();
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
;
|
|
352
|
+
}
|
|
353
|
+
exports.TextApiResponse = TextApiResponse;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lockfileVersion": 1,
|
|
3
|
+
"configVersion": 1,
|
|
4
|
+
"workspaces": {
|
|
5
|
+
"": {
|
|
6
|
+
"name": "examples",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@clack/prompts": "^1.0.1",
|
|
9
|
+
"@fbrc/sdk": "^0.0.13",
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"@types/bun": "latest",
|
|
13
|
+
},
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"typescript": "^5",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
"packages": {
|
|
20
|
+
"@clack/core": ["@clack/core@1.0.1", "", { "dependencies": { "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-WKeyK3NOBwDOzagPR5H08rFk9D/WuN705yEbuZvKqlkmoLM2woKtXb10OO2k1NoSU4SFG947i2/SCYh+2u5e4g=="],
|
|
21
|
+
|
|
22
|
+
"@clack/prompts": ["@clack/prompts@1.0.1", "", { "dependencies": { "@clack/core": "1.0.1", "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-/42G73JkuYdyWZ6m8d/CJtBrGl1Hegyc7Fy78m5Ob+jF85TOUmLR5XLce/U3LxYAw0kJ8CT5aI99RIvPHcGp/Q=="],
|
|
23
|
+
|
|
24
|
+
"@fbrc/sdk": ["@fbrc/sdk@0.0.13", "", {}, "sha512-nFRChaDd0ZboL5NaA/WiYv1GSWO3CxSnVgMVIZU0IAH6+3ITQOjMxSVWzfrHQwkGTX12sPYf0g7sRloQVyreTA=="],
|
|
25
|
+
|
|
26
|
+
"@types/bun": ["@types/bun@1.3.9", "", { "dependencies": { "bun-types": "1.3.9" } }, "sha512-KQ571yULOdWJiMH+RIWIOZ7B2RXQGpL1YQrBtLIV3FqDcCu6FsbFUBwhdKUlCKUpS3PJDsHlJ1QKlpxoVR+xtw=="],
|
|
27
|
+
|
|
28
|
+
"@types/node": ["@types/node@25.2.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-m0jEgYlYz+mDJZ2+F4v8D1AyQb+QzsNqRuI7xg1VQX/KlKS0qT9r1Mo16yo5F/MtifXFgaofIFsdFMox2SxIbQ=="],
|
|
29
|
+
|
|
30
|
+
"bun-types": ["bun-types@1.3.9", "", { "dependencies": { "@types/node": "*" } }, "sha512-+UBWWOakIP4Tswh0Bt0QD0alpTY8cb5hvgiYeWCMet9YukHbzuruIEeXC2D7nMJPB12kbh8C7XJykSexEqGKJg=="],
|
|
31
|
+
|
|
32
|
+
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
|
|
33
|
+
|
|
34
|
+
"sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],
|
|
35
|
+
|
|
36
|
+
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
|
37
|
+
|
|
38
|
+
"undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "examples",
|
|
3
|
+
"module": "src/index.ts",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "bun run src/index.ts"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@clack/prompts": "^1.0.1",
|
|
11
|
+
"@fbrc/sdk": "^0.0.13"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@types/bun": "latest"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"typescript": "^5"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as p from '@clack/prompts';
|
|
2
|
+
import {
|
|
3
|
+
createWorkspaces,
|
|
4
|
+
listWorkspaces,
|
|
5
|
+
deleteWorkspace,
|
|
6
|
+
} from './workspaces';
|
|
7
|
+
|
|
8
|
+
const commands: Record<
|
|
9
|
+
string,
|
|
10
|
+
{ label: string; description: string; action: () => Promise<void> }
|
|
11
|
+
> = {
|
|
12
|
+
createWorkspaces: {
|
|
13
|
+
label: 'Create workspaces',
|
|
14
|
+
description: 'Will create 1 workspace with a random slug',
|
|
15
|
+
action: createWorkspaces,
|
|
16
|
+
},
|
|
17
|
+
listWorkspaces: {
|
|
18
|
+
label: 'List workspaces',
|
|
19
|
+
description: 'Will list all workspaces',
|
|
20
|
+
action: listWorkspaces,
|
|
21
|
+
},
|
|
22
|
+
deleteWorkspace: {
|
|
23
|
+
label: 'Delete workspace',
|
|
24
|
+
description: 'Will delete the first workspace',
|
|
25
|
+
action: deleteWorkspace,
|
|
26
|
+
},
|
|
27
|
+
exit: {
|
|
28
|
+
label: 'Exit',
|
|
29
|
+
description: 'Exit the program',
|
|
30
|
+
action: () => {
|
|
31
|
+
p.outro('Exiting...');
|
|
32
|
+
process.exit(0);
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
async function main() {
|
|
38
|
+
while (true) {
|
|
39
|
+
p.intro('Fabric API Example');
|
|
40
|
+
const selectOptions = Object.entries(commands).map(([key, command]) => ({
|
|
41
|
+
label: command.label,
|
|
42
|
+
value: key,
|
|
43
|
+
hint: command.description,
|
|
44
|
+
}));
|
|
45
|
+
|
|
46
|
+
const selectedKey = await p.select({
|
|
47
|
+
message: 'Select a command:',
|
|
48
|
+
options: selectOptions,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
if (!selectedKey) {
|
|
52
|
+
p.outro('No command selected. Exiting...');
|
|
53
|
+
process.exit(0);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const selectedCommand = commands[selectedKey as keyof typeof commands]!;
|
|
57
|
+
try {
|
|
58
|
+
await selectedCommand.action();
|
|
59
|
+
} catch (error) {
|
|
60
|
+
p.log.error(
|
|
61
|
+
(error instanceof Error ? error.message : 'Unknown error') +
|
|
62
|
+
'\n' +
|
|
63
|
+
JSON.stringify(error, null, 2),
|
|
64
|
+
);
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
main();
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { log } from '@clack/prompts';
|
|
2
|
+
import { Fabric } from '@fbrc/sdk';
|
|
3
|
+
|
|
4
|
+
if (!process.env.FABRIC_API_KEY) {
|
|
5
|
+
throw new Error('FABRIC_API_KEY is not set');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const api = new Fabric({
|
|
9
|
+
apiKey: process.env.FABRIC_API_KEY,
|
|
10
|
+
// @ts-expect-error - wait for wooody client to be updated
|
|
11
|
+
basePath: "woody.fabric.staging.projectsimba.live",
|
|
12
|
+
middleware: [
|
|
13
|
+
{
|
|
14
|
+
post: async (context) => {
|
|
15
|
+
if (!context.response) {
|
|
16
|
+
return context.response;
|
|
17
|
+
}
|
|
18
|
+
if (context.response.status >= 400) {
|
|
19
|
+
log.error(JSON.stringify(context.response.status + ' ' + context.response.statusText, null, 2));
|
|
20
|
+
}
|
|
21
|
+
return context.response;
|
|
22
|
+
},
|
|
23
|
+
onError: async (context) => {
|
|
24
|
+
log.error(JSON.stringify(context, null, 2));
|
|
25
|
+
return context.response;
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { api } from './utils/client';
|
|
2
|
+
import { note, log, spinner } from '@clack/prompts';
|
|
3
|
+
import { randomString } from './utils/random';
|
|
4
|
+
|
|
5
|
+
export async function createWorkspaces(number: number = 1) {
|
|
6
|
+
const created = [];
|
|
7
|
+
const s = spinner();
|
|
8
|
+
s.start(`Creating ${number} workspaces`);
|
|
9
|
+
for (let i = 0; i < number; i++) {
|
|
10
|
+
s.message(`Creating workspace ${i + 1} of ${number}`);
|
|
11
|
+
const randomSlug = randomString(10);
|
|
12
|
+
const workspace = await api.workspaces.create({
|
|
13
|
+
title: `Example Workspace ${randomString(10)}`,
|
|
14
|
+
description: `Example Description ${randomString(10)}`,
|
|
15
|
+
slug: randomSlug,
|
|
16
|
+
});
|
|
17
|
+
created.push(workspace);
|
|
18
|
+
}
|
|
19
|
+
s.stop(`Created ${created.length} workspaces`);
|
|
20
|
+
note(created.map((w) => `- ${w.title} (${w.id})`).join('\n'), 'Created workspaces');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function listWorkspaces() {
|
|
24
|
+
const response = await api.workspaces.list();
|
|
25
|
+
note(JSON.stringify(response, null, 2), 'api.workspaces.list()');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @param id if undefined, delete the first workspace
|
|
31
|
+
*/
|
|
32
|
+
export async function deleteWorkspace(id?: string) {
|
|
33
|
+
if (!id) {
|
|
34
|
+
id = (await api.workspaces.list()).data.items?.[0]?.id;
|
|
35
|
+
if (!id) {
|
|
36
|
+
log.warn('No workspaces found');
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const response = await api.workspaces.remove(undefined, {
|
|
41
|
+
workspaceId: id,
|
|
42
|
+
});
|
|
43
|
+
note(
|
|
44
|
+
JSON.stringify(response, null, 2),
|
|
45
|
+
`api.workspaces.remove(${id ?? '<first workspace>'})`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// Environment setup & latest features
|
|
4
|
+
"lib": ["ESNext"],
|
|
5
|
+
"target": "ESNext",
|
|
6
|
+
"module": "Preserve",
|
|
7
|
+
"moduleDetection": "force",
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
|
|
11
|
+
// Bundler mode
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
|
|
17
|
+
// Best practices
|
|
18
|
+
"strict": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"noFallthroughCasesInSwitch": true,
|
|
21
|
+
"noUncheckedIndexedAccess": true,
|
|
22
|
+
"noImplicitOverride": true,
|
|
23
|
+
|
|
24
|
+
// Some stricter flags (disabled by default)
|
|
25
|
+
"noUnusedLocals": false,
|
|
26
|
+
"noUnusedParameters": false,
|
|
27
|
+
"noPropertyAccessFromIndexSignature": false
|
|
28
|
+
}
|
|
29
|
+
}
|
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, Middleware } from './runtime';
|
|
3
|
+
import { Configuration, FetchAPI, Middleware } from './runtime';
|
|
4
4
|
|
|
5
5
|
export * from './runtime';
|
|
6
6
|
export * from './apis/index';
|
|
@@ -22,7 +22,9 @@ const APIS = Object.keys(generatedApis)
|
|
|
22
22
|
export interface FabricApiOptions {
|
|
23
23
|
apiKey: string;
|
|
24
24
|
workspaceId?: string;
|
|
25
|
+
basePath?: string;
|
|
25
26
|
middleware?: Middleware[];
|
|
27
|
+
fetchApi?: FetchAPI;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
type ApiKeys = {
|
|
@@ -60,6 +62,8 @@ export class Fabric {
|
|
|
60
62
|
const configuration = new Configuration({
|
|
61
63
|
middleware: options.middleware,
|
|
62
64
|
apiKey: options.apiKey,
|
|
65
|
+
basePath: options.basePath,
|
|
66
|
+
fetchApi: options.fetchApi,
|
|
63
67
|
...(options.workspaceId && {
|
|
64
68
|
headers: {
|
|
65
69
|
'X-Fabric-Workspace-Id': String(options.workspaceId),
|
|
@@ -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
|
+
'memoryEnabled'?: boolean;
|
|
130
136
|
/**
|
|
131
137
|
*
|
|
132
138
|
* @type {boolean}
|
|
@@ -222,6 +228,9 @@ export function PlanEntitlementsFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
222
228
|
if (json['maxDelegatedWorkspaces'] !== undefined) {
|
|
223
229
|
result['maxDelegatedWorkspaces'] = json['maxDelegatedWorkspaces'];
|
|
224
230
|
}
|
|
231
|
+
if (json['memoryEnabled'] !== undefined) {
|
|
232
|
+
result['memoryEnabled'] = json['memoryEnabled'];
|
|
233
|
+
}
|
|
225
234
|
if (json['webSearchEnabled'] !== undefined) {
|
|
226
235
|
result['webSearchEnabled'] = json['webSearchEnabled'];
|
|
227
236
|
}
|
|
@@ -257,6 +266,7 @@ export function PlanEntitlementsToJSONTyped(value?: PlanEntitlements | null, ign
|
|
|
257
266
|
'requestsPerHour': value['requestsPerHour'],
|
|
258
267
|
'unitPricePerGB': value['unitPricePerGB'],
|
|
259
268
|
'maxDelegatedWorkspaces': value['maxDelegatedWorkspaces'],
|
|
269
|
+
'memoryEnabled': value['memoryEnabled'],
|
|
260
270
|
'webSearchEnabled': value['webSearchEnabled'],
|
|
261
271
|
};
|
|
262
272
|
}
|