import { IHttpCancelRequestToken } from '@kontent-ai/core-sdk'; import { ContentItemContracts, LanguageVariantContracts } from '../contracts'; import { AssetElementsBuilder, AssetFolderModels, AssetModels, AssetRenditionModels, CollectionModels, ContentTypeElementsBuilder, ContentTypeModels, ContentTypeSnippetElements, ContentTypeSnippetModels, CustomAppModels, LanguageModels, LanguageVariantElementsBuilder, PreviewModels, ProjectUserModels, SpaceModels, TaxonomyModels, WebhookModels, WebSpotlightModels, WorkflowModels } from '../models'; import { ViewSubscriptionUserQuery, ActionQuery, AddAssetFoldersQuery, AddAssetQuery, AddContentItemQuery, AddContentTypeQuery, AddContentTypeSnippetQuery, AddLanguageQuery, AddSpaceQuery, AddTaxonomyQuery, AddWebhookQuery, AssetIdentifierQuery, CancelScheduledPublishingOfLanguageVariantQuery, CancelScheduledUnpublishingOfLanguageVariantQuery, ContentItemIdentifierQuery, ContentTypeCodenameAndIdIdentifierQuery, ContentTypeIdentifierQuery, CreateNewVersionOfLanguageVariantQuery, DataQuery, DataQueryOptional, DeleteAssetQuery, DeleteContentItemQuery, DeleteContentTypeQuery, DeleteContentTypeSnippetQuery, DeleteLanguageVariantQuery, DeleteSpaceQuery, DeleteQuery, DeleteTaxonomyQuery, DeleteWebhookQuery, GetQuery, GetTaxonomyQuery, GetWebhookQuery, LanguageIdAndCodenameIdentifierQuery, LanguageIdentifierQuery, ListAssetFoldersQuery, ListAssetsQuery, ListContentItemsQuery, ListContentTypeSnippetsQuery, ListContentTypesQuery, ListLanguagesQuery, ListLanguageVariantsOfContentTypeQuery, ListLanguageVariantsOfContentTypeWithComponentsQuery, ListLanguageVariantsOfItemQuery, ListLanguageVariantsBySpaceQuery, ListSpacesQuery, ListTaxonomiesQuery, ListWebhooksQuery, ModifyAssetFoldersQuery, ModifyContentTypeQuery, ModifyContentTypeSnippetQuery, ModifyLanguageQuery, ModifySpaceQuery, ModifyTaxonomyQuery, PatchQuery, PostQuery, EnvironmentIdentifierQuery, EnvironmentInformationQuery, PublishLanguageVariantQuery, PutQuery, SpaceIdentifierQuery, TaxonomyIdentifierQuery, UnpublishLanguageVariantQuery, UpdateContentItemQuery, UploadBinaryFileQuery, UpsertAssetQuery, UpsertContentItemQuery, UpsertLanguageVariantQuery, ViewAssetsQuery, ViewContentItemQuery, ViewContentTypeQuery, ViewContentTypeSnippetQuery, ViewLanguageQuery, ViewLanguageVariantQuery, ViewSpaceQuery, WebhookIdentifierQuery, EnableWebhookQuery, DisableWebhookQuery, ListCollectionsQuery, CollectionIdentifierQuery, ListLanguageVariantsByCollectionQuery, SetCollectionsQuery, UploadAssetFromUrlQuery, ListSubscriptionProjectsQuery, ViewSubscriptionProjectQuery, ListSubscriptionUsersQuery, UserIdentifierQuery, ActivateUserInAllProjectsQuery, DeactivateUserInAllProjectsQuery, ListRolesQuery, InviteProjectUserQuery, ChangeUserRolesQuery, RoleIdentifierQuery, ViewRoleQuery, ListAssetRenditionsQuery, AddAssetRenditionQuery, ModifyAssetRenditionQuery, RenditionIdentifierQuery, ViewAssetRenditionQuery, ChangeWorkflowOfLanguageOrVariantQuery, ListWorkflowsQuery, WorkflowIdentifierQuery, DeleteWorkflowQuery, AddWorkflowQuery, UpdateWorkflowQuery, StartEnvironmentValidationQuery, TaskIdentifierQuery, CheckEnvironmentValidationQuery, ListEnvironmentValidationIssuesQuery, GetPreviewConfigurationQuery, ModifyPreviewConfigurationQuery, GetLivePreviewConfigurationQuery, ChangeLivePreviewConfigurationQuery, ActivateWebSpotlightQuery, DeactivateWebSpotlightQuery, CheckWebSpotlightStatusQuery, AddCustomAppQuery, CustomAppsIdentifierQuery, GetCustomAppQuery, ListCustomAppsQuery, ModifyCustomAppQuery, DeleteCustomAppQuery, FilterItemsWithVariantsQuery, BulkGetItemsWithVariantsQuery } from '../queries'; import { IMappingService } from '../services'; import { GetEnvironmentCloningStateQuery } from '../queries/environments'; import { DeleteEnvironmentQuery } from '../queries/environments/delete-environment-query'; import { EnvironmentModels } from '../models/environments/environment.models'; import { CloneEnvironmentQuery } from '../queries/environments/clone-environment-query'; import { MarkEnvironmentAsProductionQuery } from '../queries/environments/mark-environment-as-production-query'; import { ModifyEnvironmentQuery } from '../queries/environments/modify-environment-query'; import { LanguageVariantModels } from '../models'; export interface IManagementClient { mappingService: IMappingService; /** * Query to filter items with variants */ filterItemsWithVariants(): DataQuery; /** * Query to bulk get items with variants */ bulkGetItemsWithVariants(): DataQuery; /** * Creates cancel token */ createCancelToken(): IHttpCancelRequestToken; /** * Custom post query */ post(): ActionQuery>; /** * Custom post query */ patch(): ActionQuery>; /** * Custom post query */ delete(): ActionQuery; /** * Custom get query */ get(): ActionQuery; /** * Custom put query */ put(): ActionQuery>; /** * Create a new version of a published language variant while keeping the original version published and available through Delivery API. Equivalent to the UI action of creating new versions of content. */ createNewVersionOfLanguageVariant(): ContentItemIdentifierQuery< LanguageIdAndCodenameIdentifierQuery >; /** * Unpublish a language variant to make it no longer accessible through Delivery API. Equivalent to the UI action of unpublishing content. * You can only unpublish language variants that are published and don't already have a Draft (unpublished) version. */ unpublishLanguageVariant(): ContentItemIdentifierQuery< LanguageIdAndCodenameIdentifierQuery< DataQueryOptional > >; /** * The Management API ignores the workflow transition limitations present in the UI. This means you can change the workflow step of the language variant from any step to any other step excluding Published or Scheduled. */ changeWorkflowOfLanguageVariant(): ContentItemIdentifierQuery< LanguageIdAndCodenameIdentifierQuery< DataQuery > >; /** * Lists all workflows in environment */ listWorkflows(): ListWorkflowsQuery; /** * Deletes an unused workflow from your environment. */ deleteWorkflow(): WorkflowIdentifierQuery; /** * Updates workflow */ updateWorkflow(): WorkflowIdentifierQuery>; /** * Create a new workflow. */ addWorkflow(): DataQuery; /** * Cancel scheduled unpublishing of the specified language variant. */ cancelSheduledUnpublishingOfLanguageVariant(): ContentItemIdentifierQuery< LanguageIdAndCodenameIdentifierQuery >; /** * Cancel scheduling of a language variant. Equivalent to the UI action of canceling scheduled content. If the language variant is not scheduled, nothing happens. */ cancelSheduledPublishingOfLanguageVariant(): ContentItemIdentifierQuery< LanguageIdAndCodenameIdentifierQuery >; /** * Change the workflow step of the specified language variant to "Published" or schedule publishing at the specified time. */ publishLanguageVariant(): ContentItemIdentifierQuery< LanguageIdAndCodenameIdentifierQuery< DataQueryOptional > >; /** * Query to view content type snippet */ viewContentTypeSnippet(): ContentTypeIdentifierQuery; /** * Query to list content types */ listContentTypeSnippets(): ListContentTypeSnippetsQuery; /** * Query to delete content type snippet */ deleteContentTypeSnippet(): ContentTypeIdentifierQuery; /** * Query to add new content type snippet */ addContentTypeSnippet(): DataQuery< AddContentTypeSnippetQuery, (builder: ContentTypeSnippetElements) => ContentTypeSnippetModels.IAddContentTypeSnippetData >; /** * Query to modify content type */ modifyContentType(): ContentTypeIdentifierQuery< DataQuery >; /** * Query to modify taxonomy */ modifyTaxonomy(): TaxonomyIdentifierQuery>; /** * Query to modify content type snippet */ modifyContentTypeSnippet(): ContentTypeIdentifierQuery< DataQuery >; /** * Query to view language variant */ viewLanguageVariant(): ContentItemIdentifierQuery>; /** * Query to upsert language variant */ upsertLanguageVariant(): ContentItemIdentifierQuery< LanguageIdAndCodenameIdentifierQuery< DataQuery< UpsertLanguageVariantQuery, (builder: LanguageVariantElementsBuilder) => LanguageVariantContracts.IUpsertLanguageVariantPostContract > > >; /** * Query to delete language variant */ deleteLanguageVariant(): ContentItemIdentifierQuery< LanguageIdAndCodenameIdentifierQuery >; /** * Starts validating the specified environment to check for issues such as: * - Nonexistent objects referenced in content items. * - Content element values don't meet the limitations configured in content types. * - Content types referencing nonexistent taxonomy groups. * Depending on the size of your environment, the validation might take several minutes. * After you start the environment validation, you get a validation task. * With the validation task, you can check validation progress and list validation results once the validation is finished. */ startEnvironmentValidation(): StartEnvironmentValidationQuery; /** * Retrieves information about a environment validation task by the task's internal ID. */ checkEnvironmentValidation(): TaskIdentifierQuery; /** * Retrieves a paginated list of environment validation issues. */ listEnvironmentValidationIssues(): TaskIdentifierQuery; /** * Query to delete content type */ deleteContentType(): ContentTypeIdentifierQuery; /** * Query to add new content type */ addContentType(): DataQuery< AddContentTypeQuery, (builder: ContentTypeElementsBuilder) => ContentTypeModels.IAddContentTypeData >; /** * Query to view content type */ viewContentType(): ContentTypeIdentifierQuery; /** * Query to list content types */ listContentTypes(): ListContentTypesQuery; /** * Query to delete a taxonomy */ deleteTaxonomy(): TaxonomyIdentifierQuery; /** * Query to add a taxonomy */ addTaxonomy(): DataQuery; /** * Query to list taxonomies */ listTaxonomies(): ListTaxonomiesQuery; /** * Query to view taxonomy */ getTaxonomy(): TaxonomyIdentifierQuery; /** * Query to delete an asset */ deleteAsset(): AssetIdentifierQuery; /** * Query to upsert an asset from uploaded binary file */ upsertAsset(): AssetIdentifierQuery< DataQuery AssetModels.IUpsertAssetRequestData> >; /** * Query to add an asset from uploaded binary file */ addAsset(): DataQuery AssetModels.IAddAssetRequestData>; /** * Query to upload file */ uploadBinaryFile(): DataQuery; /** * Query to view asset */ viewAsset(): AssetIdentifierQuery; /** * Query for listing assets */ listAssets(): ListAssetsQuery; /** * List of content items query */ listContentItems(): ListContentItemsQuery; /** * View content item query */ viewContentItem(): ContentItemIdentifierQuery; /** * Add content item query */ addContentItem(): DataQuery; /** * Update content item query */ updateContentItem(): ContentItemIdentifierQuery< DataQuery >; /** * Upsert content item query */ upsertContentItem(): ContentItemIdentifierQuery< DataQuery >; /** * Delete content item query */ deleteContentItem(): ContentItemIdentifierQuery; /** * List language variants of a specific content item query */ listLanguageVariantsOfItem(): ContentItemIdentifierQuery; /** * List language variants of a specific content type query */ listLanguageVariantsOfContentType(): ContentTypeCodenameAndIdIdentifierQuery; /** * List language variants of a specific content type with components */ listLanguageVariantsOfContentTypeWithComponents(): ContentTypeCodenameAndIdIdentifierQuery; /** * List languages in environment */ listLanguages(): ListLanguagesQuery; /** * View language */ viewLanguage(): LanguageIdentifierQuery; /** * Adds new language */ addLanguage(): DataQuery; /** * Modifies existing language */ modifyLanguage(): LanguageIdentifierQuery>; /** * Delete a webhook */ deleteWebhook(): WebhookIdentifierQuery; /** * Adds new webhook */ addWebhook(): DataQuery; /** * Gets single webhook */ getWebhook(): WebhookIdentifierQuery; /** * Enables webhook */ enableWebhook(): WebhookIdentifierQuery; /** * Disables webhook */ disableWebhook(): WebhookIdentifierQuery; /** * Gets all webhooks */ listWebhooks(): ListWebhooksQuery; /** * Query to get environment information */ environmentInformation(): EnvironmentInformationQuery; /** * Query to list asset folders */ listAssetFolders(): ListAssetFoldersQuery; /** * Query to add asset folders */ addAssetFolders(): DataQuery; /** * Query to modify asset folders */ modifyAssetFolders(): DataQuery; /** * Query to list collections */ listCollections(): ListCollectionsQuery; /** * Query to list language variants of given collection */ listLanguageVariantsByCollection(): CollectionIdentifierQuery; /** * Query to list language variants of given space */ listLanguageVariantsBySpace(): SpaceIdentifierQuery; /** * Query to set collections */ setCollections(): DataQuery; /** * Helper methods that uploads file from url, creates binary file & asset in one go */ uploadAssetFromUrl(): DataQuery; /** * Creates edit urls according to https://docs.kontent.ai/tutorials/develop-apps/build-strong-foundation/set-up-editing-from-preview */ createLanguageVariantEditUrl(data: { variantId: string; languageCodename: string; elementCodename?: string; nestedItemId?: string; nestedItemElementCodename?: string; }): string; /** * Query to list projects in given subscription */ listSubscriptionProjects(): ListSubscriptionProjectsQuery; /** * View subscription project */ viewSubscriptionProject(): EnvironmentIdentifierQuery; /** * View subscription users */ listSubscriptionUsers(): ListSubscriptionUsersQuery; /** * View subscription user */ viewSubscriptionUser(): UserIdentifierQuery; /** * Activates user in all projects */ activateUserInAllProjects(): UserIdentifierQuery; /** * Deactivates user in all projects */ deactivateUserInAllProjects(): UserIdentifierQuery; /** * List roles */ listRoles(): ListRolesQuery; /** * Invites specified user to Kontent.ai project */ inviteUser(): DataQuery; /** * Changes roles of a specified user */ changeUserRoles(): UserIdentifierQuery>; /** * View role */ viewRole(): RoleIdentifierQuery; /** * Get cloning state of the environment */ getEnvironmentCloningState(): GetEnvironmentCloningStateQuery; /** * Delete environment */ deleteEnvironment(): DeleteEnvironmentQuery; /** * Modify environment */ modifyEnvironment(): DataQuery; /** * Clone environment */ cloneEnvironment(): DataQuery; /** * Mark environment as production */ markEnvironmentAsProduction(): DataQuery< MarkEnvironmentAsProductionQuery, EnvironmentModels.IMarkEnvironmentAsProductionData >; /** * List asset renditions of given asset */ listAssetRenditions(): AssetIdentifierQuery; /** * Adds rendition to given asset */ addAssetRendition(): AssetIdentifierQuery< DataQuery >; /** * Modifies asset rendition */ modifyAssetRendition(): AssetIdentifierQuery< RenditionIdentifierQuery> >; /** * Views asset rendition */ viewAssetRendition(): AssetIdentifierQuery>; /** * Adds space */ addSpace(): DataQuery; /** * Deletes a space */ deleteSpace(): SpaceIdentifierQuery; /** * Lists all spaces */ listSpaces(): ListSpacesQuery; /** * Modifies a space */ modifySpace(): SpaceIdentifierQuery>; /** * Views a space */ viewSpace(): SpaceIdentifierQuery; /** * Gets preview configuration */ getPreviewConfiguration(): GetPreviewConfigurationQuery; /** * Adjusts the preview URLs configured for your environment */ modifyPreviewConfiguration(): DataQuery< ModifyPreviewConfigurationQuery, PreviewModels.IModifyPreviewConfigurationData >; /** * Gets live preview configuration */ getLivePreviewConfiguration(): GetLivePreviewConfigurationQuery; /** * Changes live preview configuration */ changeLivePreviewConfiguration(): DataQuery< ChangeLivePreviewConfigurationQuery, PreviewModels.IChangeLivePreviewConfigurationData >; /** * Activates Web Spotlight * @deprecated Web Spotlight has been discontinued and this method will be removed in a future version. */ activateWebSpotlight(): DataQuery; /** * Deactivates Web Spotlight * @deprecated Web Spotlight has been discontinued and this method will be removed in a future version. */ deactivateWebSpotlight(): DeactivateWebSpotlightQuery; /** * Checks Web Spotlight status * @deprecated Web Spotlight has been discontinued and this method will be removed in a future version. */ checkWebSpotlightStatus(): CheckWebSpotlightStatusQuery; /** * Modify custom app */ modifyCustomApp(): CustomAppsIdentifierQuery< DataQuery >; /** * Delete custom app */ deleteCustomApp(): CustomAppsIdentifierQuery; /** * Add custom app */ addCustomApp(): DataQuery; /** * List custom apps */ listCustomApps(): ListCustomAppsQuery; /* * Get custom app */ getCustomApp(): CustomAppsIdentifierQuery; }