import { IHttpCancelRequestToken } from '@kentico/kontent-core'; import { ContentItemContracts } from '../contracts'; import { AssetElementsBuilder, AssetFolderModels, AssetModels, AssetRenditionModels, CollectionModels, ContentTypeElementsBuilder, ContentTypeModels, ContentTypeSnippetElements, ContentTypeSnippetModels, LanguageModels, LanguageVariantElements, LanguageVariantElementsBuilder, ProjectUserModels, TaxonomyModels, WebhookModels, WorkflowModels } from '../models'; import { ViewSubscriptionUserQuery, ActionQuery, AddAssetFoldersQuery, AddAssetQuery, AddContentItemQuery, AddContentTypeQuery, AddContentTypeSnippetQuery, AddLanguageQuery, AddTaxonomyQuery, AddWebhookQuery, AssetIdentifierQuery, CancelScheduledPublishingOfLanguageVariantQuery, CancelScheduledUnpublishingOfLanguageVariantQuery, ChangeWorkflowStepOfLanguageOrVariantQuery, ContentItemIdentifierQuery, ContentTypeCodenameAndIdIdentifierQuery, ContentTypeIdentifierQuery, CreateNewVersionOfLanguageVariantQuery, DataQuery, DataQueryOptional, DeleteAssetQuery, DeleteContentItemQuery, DeleteContentTypeQuery, DeleteContentTypeSnippetQuery, DeleteLanguageVariantQuery, DeleteQuery, DeleteTaxonomyQuery, DeleteWebhookQuery, GetQuery, GetTaxonomyQuery, GetWebhookQuery, LanguageIdAndCodenameIdentifierQuery, LanguageIdentifierQuery, ListAssetFoldersQuery, ListAssetsQuery, ListContentItemsQuery, ListContentTypeSnippetsQuery, ListContentTypesQuery, ListLanguagesQuery, ListLanguageVariantsOfContentTypeQuery, ListLanguageVariantsOfContentTypeWithComponentsQuery, ListLanguageVariantsOfItemQuery, ListTaxonomiesQuery, ListWebhooksQuery, ListWorkflowStepsQuery, ModifyAssetFoldersQuery, ModifyContentTypeQuery, ModifyContentTypeSnippetQuery, ModifyLanguageQuery, ModifyTaxonomyQuery, PatchQuery, PostQuery, ProjectIdentifierQuery, ProjectInformationQuery, PublishLanguageVariantQuery, PutQuery, TaxonomyIdentifierQuery, UnpublishLanguageVariantQuery, UpdateContentItemQuery, UploadBinaryFileQuery, UpsertAssetQuery, UpsertContentItemQuery, UpsertLanguageVariantQuery, ValidateProjectContentQuery, ViewAssetsQuery, ViewContentItemQuery, ViewContentTypeQuery, ViewContentTypeSnippetQuery, ViewLanguageQuery, ViewLanguageVariantQuery, WebhookIdentifierQuery, WorkflowStepIdentifierQuery, 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 } 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'; export interface IManagementClient { mappingService: IMappingService; /** * 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>; /** * 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>>; /** * 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>>; /** * Lists all workflows in projects */ listWorkflows(): ListWorkflowsQuery; /** * Deletes an unused workflow from your project. */ deleteWorkflow(): WorkflowIdentifierQuery; /** * Updates workflow */ updateWorkflow(): WorkflowIdentifierQuery>; /** * Create a new workflow. */ addWorkflow(): DataQuery; /** * @deprecated The method should not be used anymore. Use 'changeWorkflowLanguageVariant' instead */ changeWorkflowStepOfLanguageVariant(): ContentItemIdentifierQuery>>; /** * @deprecated The method should not be used anymore. Use 'listWorkflows' instead */ listWorkflowSteps(): ListWorkflowStepsQuery; /** * Cancel scheduled unpublishing of the specified language variant. */ cancelSheduledUnpublishingOfLanguageVariant(): ContentItemIdentifierQuery>; /** * 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>; /** * Change the workflow step of the specified language variant to "Published" or schedule publishing at the specified time. */ publishLanguageVariant(): ContentItemIdentifierQuery>>; /** * 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 ContentTypeSnippetModels.IAddContentTypeSnippetData>; /** * Query to modify content type */ modifyContentType(): ContentTypeIdentifierQuery>; /** * Query to modify taxonomy */ modifyTaxonomy(): TaxonomyIdentifierQuery>; /** * Query to modify content type snippet */ modifyContentTypeSnippet(): ContentTypeIdentifierQuery>; /** * Query to view language variant */ viewLanguageVariant(): ContentItemIdentifierQuery>; /** * Query to upsert language variant */ upsertLanguageVariant(): ContentItemIdentifierQuery LanguageVariantElements.ILanguageVariantElementBase[]>>>; /** * Query to delete language variant */ deleteLanguageVariant(): ContentItemIdentifierQuery>; /** * Query to validate project content */ validateProjectContent(): ProjectIdentifierQuery; /** * Query to delete content type */ deleteContentType(): ContentTypeIdentifierQuery; /** * Query to add new content type */ addContentType(): DataQuery 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 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>; /** * Upsert content item query */ upsertContentItem(): ContentItemIdentifierQuery>; /** * 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 project */ 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 project information */ projectInformation(): ProjectInformationQuery; /** * 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 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(): ProjectIdentifierQuery; /** * 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 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; /** * List asset renditions of given asset */ listAssetRenditions(): AssetIdentifierQuery; /** * Adds rendition to given asset */ addAssetRendition(): AssetIdentifierQuery>; /** * Modifies asset rendition */ modifyAssetRendition(): AssetIdentifierQuery>>; /** * Views asset rendition */ viewAssetRendition(): AssetIdentifierQuery>; }