UNPKG

@kontent-ai/management-sdk

Version:
130 lines (129 loc) 19.1 kB
import { IHttpService, ISDKInfo } from '@kontent-ai/core-sdk'; import { IManagementClientConfig } from '../config/imanagement-client-config.interface'; import { ContentItemContracts, LanguageVariantContracts } from '../contracts'; import { AssetModels, ContentTypeModels, ContentTypeSnippetModels, IContentManagementQueryConfig, LanguageModels, TaxonomyModels, WebhookModels, WorkflowModels, AssetFolderModels, IContentManagementListQueryConfig, CollectionModels, ProjectUserModels, AssetRenditionModels, SpaceModels, PreviewModels, WebSpotlightModels, CustomAppModels, LanguageVariantModels } from '../models'; import { AssetFolderResponses, AssetResponses, BaseResponses, ContentItemResponses, ContentTypeResponses, ContentTypeSnippetResponses, LanguageResponses, LanguageVariantResponses, TaxonomyResponses, WebhookResponses, WorkflowResponses, GenericResponses, CollectionResponses, SubscriptionResponses, RoleResponses, ProjectUsersResponses, AssetRenditionResponses, SpaceResponses, PreviewResponses, WebSpotlightResponses, CustomAppsResponses } from '../responses'; import { BaseManagementQueryService } from './base-management-service.class'; import { EnvironmentResponses } from '../responses/environments/environment-responses'; import { EnvironmentModels } from '../models/environments/environment.models'; export declare class ManagementQueryService extends BaseManagementQueryService<any> { protected config: IManagementClientConfig; protected httpService: IHttpService<any>; protected sdkInfo: ISDKInfo; constructor(config: IManagementClientConfig, httpService: IHttpService<any>, sdkInfo: ISDKInfo); genericPostResponseAsync(url: string, data: any, config: IContentManagementQueryConfig): Promise<GenericResponses.GenericResponse>; genericPatchResponseAsync(url: string, data: any, config: IContentManagementQueryConfig): Promise<GenericResponses.GenericResponse>; genericDeleteResponseAsync(url: string, config: IContentManagementQueryConfig): Promise<GenericResponses.GenericResponse>; genericGetResponseAsync(url: string, config: IContentManagementQueryConfig): Promise<GenericResponses.GenericResponse>; genericPutResponseAsync(url: string, data: any, config: IContentManagementQueryConfig): Promise<GenericResponses.GenericResponse>; getListAllResponseAsync<TResponse extends BaseResponses.IContentManagementListResponse, TAllResponse extends BaseResponses.IContentManagementListAllResponse>(data: { getResponse: (xContinuationToken?: string) => Promise<TResponse>; allResponseFactory: (items: any[], responses: TResponse[]) => TAllResponse; listQueryConfig: IContentManagementListQueryConfig<TResponse> | undefined; }): Promise<TAllResponse>; publishLanguageVariantAsync(url: string, data: WorkflowModels.IPublishLanguageVariantData | undefined, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; createNewVersionOfLanguageVariantAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; unpublishLanguageVariantAsync(url: string, data: WorkflowModels.IUnpublishLanguageVarianthData | undefined, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; cancelScheduledPublishingOfLanguageVariantAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; cancelScheduledUnpublishingOfLanguageVariantAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; changeWorkflowOfLanguageVariantAsync(url: string, data: WorkflowModels.IChangeWorkflowOfLanguageVariantData, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; listWorkflowsAsync(url: string, config: IContentManagementQueryConfig): Promise<WorkflowResponses.ListWorkflowsResponse>; addWorkflowAsync(url: string, config: IContentManagementQueryConfig, data: WorkflowModels.IAddWorkflowData): Promise<WorkflowResponses.AddWorkflowResponse>; updateWorkflowAsync(url: string, config: IContentManagementQueryConfig, data: WorkflowModels.IUpdateWorkflowData): Promise<WorkflowResponses.AddWorkflowResponse>; deleteWorkflowAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; viewContentTypeSnippetAsync(url: string, config: IContentManagementQueryConfig): Promise<ContentTypeSnippetResponses.ViewContentTypeSnippetResponse>; deleteContentTypeSnippetAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; addContentTypeSnippetAsync(url: string, data: ContentTypeSnippetModels.IAddContentTypeSnippetData, config: IContentManagementQueryConfig): Promise<ContentTypeSnippetResponses.AddContentTypeSnippetResponse>; listContentTypeSnippetsAsync(url: string, config: IContentManagementQueryConfig): Promise<ContentTypeSnippetResponses.ContentTypeSnippetListResponse>; environmentInformationAsync(url: string, config: IContentManagementQueryConfig): Promise<EnvironmentResponses.EnvironmentInformationResponse>; listEnvironmentValidationIssuesAsync(url: string, config: IContentManagementQueryConfig): Promise<EnvironmentResponses.EnvironmentValidationIssuesListResponse>; startEnvironmentValidationAsync(url: string, config: IContentManagementQueryConfig): Promise<EnvironmentResponses.StartEnvironmentValidationResponse>; checkEnvironmentValidationAsync(url: string, config: IContentManagementQueryConfig): Promise<EnvironmentResponses.CheckEnvironmentValidationResponse>; addContentTypeAsync(url: string, data: ContentTypeModels.IAddContentTypeData, config: IContentManagementQueryConfig): Promise<ContentTypeResponses.AddContentTypeResponse>; deleteContentTypeAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; modifyContentTypeAsync(url: string, config: IContentManagementQueryConfig, data: ContentTypeModels.IModifyContentTypeData[]): Promise<ContentTypeResponses.ModifyContentTypeResponse>; modifyTaxonomyAsync(url: string, config: IContentManagementQueryConfig, data: TaxonomyModels.IModifyTaxonomyData[]): Promise<TaxonomyResponses.ModifyTaxonomyResponse>; modifyContentTypeSnippetAsync(url: string, config: IContentManagementQueryConfig, data: ContentTypeSnippetModels.IModifyContentTypeSnippetData[]): Promise<ContentTypeSnippetResponses.ModifyContentTypeSnippetResponse>; viewContentTypeAsync(url: string, config: IContentManagementQueryConfig): Promise<ContentTypeResponses.ViewContentTypeResponse>; listContentTypesAsync(url: string, config: IContentManagementQueryConfig): Promise<ContentTypeResponses.ContentTypeListResponse>; listAssetRenditionsAsync(url: string, config: IContentManagementQueryConfig): Promise<AssetRenditionResponses.AssetRenditionsListResponse>; viewAssetRenditionAsync(url: string, config: IContentManagementQueryConfig): Promise<AssetRenditionResponses.ViewAssetRenditionResponse>; addAssetRenditionAsync(url: string, config: IContentManagementQueryConfig, data: AssetRenditionModels.IAddAssetRenditionData): Promise<AssetRenditionResponses.AddAssetRenditionResponse>; modifyAssetRenditionAsync(url: string, config: IContentManagementQueryConfig, data: AssetRenditionModels.IModifyAssetRenditionData): Promise<AssetRenditionResponses.AddAssetRenditionResponse>; addCustomAppAsync(url: string, data: CustomAppModels.IAddCustomAppData, config: IContentManagementQueryConfig): Promise<CustomAppsResponses.AddCustomAppResponse>; modifyCustomAppAsync(url: string, data: CustomAppModels.ModifyCustomAppOperation[], config: IContentManagementQueryConfig): Promise<CustomAppsResponses.ModifyCustomAppResponse>; deleteCustomAppAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; getCustomAppAsync(url: string, config: IContentManagementQueryConfig): Promise<CustomAppsResponses.GetCustomAppResponse>; listCustomAppsAsync(url: string, config: IContentManagementQueryConfig): Promise<CustomAppsResponses.CustomAppsListResponse>; addTaxonomyAsync(url: string, data: TaxonomyModels.IAddTaxonomyRequestModel, config: IContentManagementQueryConfig): Promise<TaxonomyResponses.AddTaxonomyResponse>; deleteTaxonomyAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; getTaxonomyAsync(url: string, config: IContentManagementQueryConfig): Promise<TaxonomyResponses.GetTaxonomyResponse>; listTaxonomiesAsync(url: string, config: IContentManagementQueryConfig): Promise<TaxonomyResponses.TaxonomyListResponse>; deleteAssetAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; upsertAssetAsync(url: string, data: AssetModels.IUpsertAssetRequestData, config: IContentManagementQueryConfig): Promise<AssetResponses.UpdateAssetResponse>; addAssetAsync(url: string, data: AssetModels.IAddAssetRequestData, config: IContentManagementQueryConfig): Promise<AssetResponses.AddAssetResponse>; listSubscriptionProjectsAsync(url: string, config: IContentManagementQueryConfig): Promise<SubscriptionResponses.SubscriptionProjectsListResponse>; litSubscriptionUsersAsync(url: string, config: IContentManagementQueryConfig): Promise<SubscriptionResponses.SubscriptionUsersListResponse>; viewSubscriptionProjectAsync(url: string, config: IContentManagementQueryConfig): Promise<SubscriptionResponses.ViewSubscriptionProjectResponse>; viewSubscriptionUserAsync(url: string, config: IContentManagementQueryConfig): Promise<SubscriptionResponses.ViewSubscriptionUserResponse>; activateUserInAllProjectsAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; deactivateUserInAllProjectsAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; uploadAssetFromUrlAsync(uploadBinaryFileUrl: string, addAssetUrl: string, data: AssetModels.IUploadAssetFromUrlRequestData, config: IContentManagementQueryConfig): Promise<AssetResponses.AddAssetResponse>; uploadBinaryFileAsync(url: string, data: AssetModels.IUploadBinaryFileRequestData, config: IContentManagementQueryConfig): Promise<AssetResponses.UploadBinaryFileResponse>; viewAssetAsync(url: string, config: IContentManagementQueryConfig): Promise<AssetResponses.ViewAssetResponse>; listAssetsAsync(url: string, config: IContentManagementQueryConfig): Promise<AssetResponses.AssetsListResponse>; listContentItemsAsync(url: string, config: IContentManagementQueryConfig): Promise<ContentItemResponses.ContentItemsResponse>; viewContentItemAsync(url: string, config: IContentManagementQueryConfig): Promise<ContentItemResponses.ViewContentItemResponse>; addContentItemAsync(url: string, data: ContentItemContracts.IAddContentItemPostContract, config: IContentManagementQueryConfig): Promise<ContentItemResponses.AddContentItemResponse>; upsertContentItemAsync(url: string, data: ContentItemContracts.IUpsertContentItemPostContract, config: IContentManagementQueryConfig): Promise<ContentItemResponses.UpsertContentItemResponse>; updateContentItemAsync(url: string, data: ContentItemContracts.IUpdateContentItemPostContract, config: IContentManagementQueryConfig): Promise<ContentItemResponses.AddContentItemResponse>; deleteContentItemAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; deleteLanguageVariantAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; upsertLanguageVariantAsync(url: string, data: LanguageVariantContracts.IUpsertLanguageVariantPostContract, config: IContentManagementQueryConfig): Promise<LanguageVariantResponses.UpsertLanguageVariantResponse>; viewLanguageVariantAsync(url: string, config: IContentManagementQueryConfig): Promise<LanguageVariantResponses.ViewLanguageVariantResponse>; listLanguageVariantsOfItemAsync(url: string, config: IContentManagementQueryConfig): Promise<LanguageVariantResponses.ListLanguageVariantsOfItemResponse>; listLanguageVariantsOfContentTypeWithComponentsAsync(url: string, config: IContentManagementQueryConfig): Promise<LanguageVariantResponses.ListLanguageVariantsOfContentTypeWithComponentsResponse>; listLanguageVariantsOfContentTypeAsync(url: string, config: IContentManagementQueryConfig): Promise<LanguageVariantResponses.ListLanguageVariantsOfContentTypeResponse>; listLanguageVariantsByCollectionAsync(url: string, config: IContentManagementQueryConfig): Promise<LanguageVariantResponses.ListLanguageVariantsByCollectionResponse>; filterItemsWithVariantsAsync(url: string, data: LanguageVariantModels.IFilterItemsWithVariantsData, config: IContentManagementQueryConfig): Promise<LanguageVariantResponses.FilterItemsWithVariantsResponse>; bulkGetItemsWithVariantsAsync(url: string, data: LanguageVariantModels.IBulkGetItemsWithVariantsData, config: IContentManagementQueryConfig): Promise<LanguageVariantResponses.BulkGetItemsWithVariantsResponse>; listLanguageVariantsBySpaceAsync(url: string, config: IContentManagementQueryConfig): Promise<LanguageVariantResponses.ListLanguageVariantsBySpaceResponse>; listLanguagesAsync(url: string, config: IContentManagementQueryConfig): Promise<LanguageResponses.ListLanguagesResponse>; viewLanguageAsync(url: string, config: IContentManagementQueryConfig): Promise<LanguageResponses.ViewLanguageResponse>; addLanguageAsync(url: string, config: IContentManagementQueryConfig, data: LanguageModels.IAddLanguageData): Promise<LanguageResponses.AddLanguageResponse>; modifyLanguageAsync(url: string, config: IContentManagementQueryConfig, data: LanguageModels.IModifyLanguageData[]): Promise<LanguageResponses.ModifyLanguageResponse>; listWebhooksAsync(url: string, config: IContentManagementQueryConfig): Promise<WebhookResponses.WebhookListResponse>; getWebhookAsync(url: string, config: IContentManagementQueryConfig): Promise<WebhookResponses.GetWebhookResponse>; addWebhookAsync(url: string, config: IContentManagementQueryConfig, data: WebhookModels.IAddWebhookData): Promise<WebhookResponses.AddWebhookResponse>; enableWebhookAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; disableWebhookAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; deleteWebhookAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; listAssetFoldersAsync(url: string, config: IContentManagementQueryConfig): Promise<AssetFolderResponses.AssetFoldersListResponse>; addAssetFoldersAsync(url: string, config: IContentManagementQueryConfig, data: AssetFolderModels.IAddAssetFoldersData): Promise<AssetFolderResponses.AddAssetFoldersResponse>; modifyAssetFoldersAsync(url: string, config: IContentManagementQueryConfig, data: AssetFolderModels.IModifyAssetFolderData[]): Promise<AssetFolderResponses.ModifyAssetFoldersResponse>; listCollectionsAsync(url: string, config: IContentManagementQueryConfig): Promise<CollectionResponses.CollectionsListResponse>; listRolesAsync(url: string, config: IContentManagementQueryConfig): Promise<RoleResponses.RoleListResponse>; viewRoleAsync(url: string, config: IContentManagementQueryConfig): Promise<RoleResponses.ViewRoleResponse>; getPreviewConfigurationAsync(url: string, config: IContentManagementQueryConfig): Promise<PreviewResponses.PreviewConfigurationResponse>; modifyPreviewConfigurationAsync(url: string, config: IContentManagementQueryConfig, data: PreviewModels.IModifyPreviewConfigurationData): Promise<PreviewResponses.ModifyConfigurationResponse>; getLivePreviewConfigurationAsync(url: string, config: IContentManagementQueryConfig): Promise<PreviewResponses.LivePreviewConfigurationResponse>; changeLivePreviewConfigurationAsync(url: string, config: IContentManagementQueryConfig, data: PreviewModels.IChangeLivePreviewConfigurationData): Promise<PreviewResponses.ChangeLivePreviewConfigurationResponse>; setCollectionsAsync(url: string, config: IContentManagementQueryConfig, data: CollectionModels.ISetCollectionData[]): Promise<CollectionResponses.SetCollectionsResponse>; inviteProjectUserAsync(url: string, config: IContentManagementQueryConfig, data: ProjectUserModels.IInviteUserData): Promise<ProjectUsersResponses.InviteUserResponse>; changeUserRolesAsync(url: string, config: IContentManagementQueryConfig, data: ProjectUserModels.IChangeUserRoleData): Promise<ProjectUsersResponses.ChangeUserRolesResponse>; getEnvironmentCloningStateAsync(url: string, config: IContentManagementQueryConfig): Promise<EnvironmentResponses.GetCloningStateResponse>; deleteEnvironmentAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; modifyEnvironmentAsync(url: string, config: IContentManagementQueryConfig, data: EnvironmentModels.IModifyEnvironmentData[]): Promise<EnvironmentResponses.ModifyEnvironmentResponse>; cloneEnvironmentAsync(url: string, config: IContentManagementQueryConfig, data: EnvironmentModels.ICloneEnvironmentData): Promise<EnvironmentResponses.CloneEnvironmentResponse>; markEnvironmentAsProductionAsync(url: string, config: IContentManagementQueryConfig, data: EnvironmentModels.IMarkEnvironmentAsProductionData): Promise<BaseResponses.EmptyContentManagementResponse>; addSpaceAsync(url: string, data: SpaceModels.IAddSpaceData, config: IContentManagementQueryConfig): Promise<SpaceResponses.AddSpaceResponse>; viewSpaceAsync(url: string, config: IContentManagementQueryConfig): Promise<SpaceResponses.ViewSpaceResponse>; listSpacesAsync(url: string, config: IContentManagementQueryConfig): Promise<SpaceResponses.SpacesListResponse>; deleteSpaceAsync(url: string, config: IContentManagementQueryConfig): Promise<BaseResponses.EmptyContentManagementResponse>; modifySpaceAsync(url: string, config: IContentManagementQueryConfig, data: SpaceModels.IModifySpaceData[]): Promise<SpaceResponses.ModifySpaceResponse>; activateWebSpotlightAsync(url: string, config: IContentManagementQueryConfig, data: WebSpotlightModels.IActivateWebSpotlightData): Promise<WebSpotlightResponses.WebSpotlightStatusResponse>; deactivateWebSpotlightAsync(url: string, config: IContentManagementQueryConfig): Promise<WebSpotlightResponses.WebSpotlightStatusResponse>; checkWebSpotlightStatusAsync(url: string, config: IContentManagementQueryConfig): Promise<WebSpotlightResponses.WebSpotlightStatusResponse>; private getListAllResponseInternalAsync; private sleepAsync; }