import { AxiosRequestConfig } from 'axios' ; import { OpPatch } from 'json-patch' ; import { Stream } from 'stream' ; import { CollectionProp , GetAppDefinitionParams , GetAppInstallationParams , GetCommentParams , GetContentTypeParams , GetEditorInterfaceParams , GetOrganizationMembershipProps , GetOrganizationParams , GetSnapshotForContentTypeParams , GetSnapshotForEntryParams , GetSpaceEnvAliasParams , GetSpaceEnvironmentParams , GetSpaceMembershipProps , GetSpaceParams , GetTagParams , GetTeamMembershipParams , GetTeamParams , GetTeamSpaceMembershipParams , GetExtensionParams , GetWebhookCallDetailsUrl , GetWebhookParams , KeyValueMap , PaginationQueryParams , QueryParams , GetAppUploadParams , GetAppBundleParams , GetBulkActionParams , GetReleaseParams , GetTaskParams , GetEntryParams , CursorPaginatedCollectionProp , GetWorkflowDefinitionParams , } from '../common-types' ; import { ApiKeyProps , CreateApiKeyProps } from '../entities/api-key' ; import { AppDefinitionProps , CreateAppDefinitionProps } from '../entities/app-definition' ; import { AppInstallationProps , CreateAppInstallationProps } from '../entities/app-installation' ; import { AssetFileProp , AssetProcessingForLocale , AssetProps , CreateAssetProps , } from '../entities/asset' ; import { CreateCommentParams , CreateCommentProps , DeleteCommentParams , CommentProps , UpdateCommentParams , UpdateCommentProps , } from '../entities/comment' ; import { ContentTypeProps , CreateContentTypeProps } from '../entities/content-type' ; import { EditorInterfaceProps } from '../entities/editor-interface' ; import { CreateEntryProps , EntryProps , EntryReferenceProps } from '../entities/entry' ; import { CreateEnvironmentProps , EnvironmentProps } from '../entities/environment' ; import { CreateEnvironmentAliasProps , EnvironmentAliasProps } from '../entities/environment-alias' ; import { CreateLocaleProps , LocaleProps } from '../entities/locale' ; import { OrganizationProp } from '../entities/organization' ; import { CreateOrganizationInvitationProps , OrganizationInvitationProps , } from '../entities/organization-invitation' ; import { OrganizationMembershipProps } from '../entities/organization-membership' ; import { CreatePersonalAccessTokenProps , PersonalAccessTokenProp , } from '../entities/personal-access-token' ; import { PreviewApiKeyProps } from '../entities/preview-api-key' ; import { CreateRoleProps , RoleProps } from '../entities/role' ; import { ScheduledActionProps , CreateUpdateScheduledActionProps , } from '../entities/scheduled-action' ; import { SnapshotProps } from '../entities/snapshot' ; import { SpaceProps } from '../entities/space' ; import { SpaceMemberProps } from '../entities/space-member' ; import { CreateSpaceMembershipProps , SpaceMembershipProps } from '../entities/space-membership' ; import { CreateTagProps , TagProps , UpdateTagProps } from '../entities/tag' ; import { CreateTeamProps , TeamProps } from '../entities/team' ; import { CreateTeamMembershipProps , TeamMembershipProps } from '../entities/team-membership' ; import { CreateTeamSpaceMembershipProps , TeamSpaceMembershipProps , } from '../entities/team-space-membership' ; import { CreateExtensionProps , ExtensionProps } from '../entities/extension' ; import { UsageProps } from '../entities/usage' ; import { UserProps } from '../entities/user' ; import { CreateWebhooksProps , WebhookCallDetailsProps , WebhookCallOverviewProps , WebhookHealthProps , WebhookProps , } from '../entities/webhook' ; import { DefaultParams , OptionalDefaults } from './wrappers/wrap' ; import { AssetKeyProps , CreateAssetKeyProps } from '../entities/asset-key' ; import { AppUploadProps } from '../entities/app-upload' ; import { AppBundleProps , CreateAppBundleProps } from '../entities/app-bundle' ; import { AppDetailsProps , CreateAppDetailsProps } from '../entities/app-details' ; import { AppSignedRequestProps , CreateAppSignedRequestProps } from '../entities/app-signed-request' ; import { AppSigningSecretProps , CreateAppSigningSecretProps } from '../entities/app-signing-secret' ; import { BulkActionPayload , BulkActionProps , BulkActionPublishPayload , BulkActionUnpublishPayload , BulkActionValidatePayload , } from '../entities/bulk-action' ; import { ReleasePayload , ReleaseProps , ReleaseQueryOptions , ReleaseValidatePayload , } from '../entities/release' ; import { ReleaseActionProps , ReleaseActionQueryOptions } from '../entities/release-action' ; import { CreateTaskParams , CreateTaskProps , DeleteTaskParams , TaskProps , UpdateTaskParams , UpdateTaskProps , } from '../entities/task' ; import { CreateWorkflowDefinitionParams , CreateWorkflowDefinitionProps , DeleteWorkflowDefinitionParams , UpdateWorkflowDefinitionParams , UpdateWorkflowDefinitionProps , WorkflowDefinitionProps , WorkflowDefinitionQueryOptions , } from '../entities/workflow-definition' ; export type PlainClientAPI = { raw : { getDefaultParams ( ) : DefaultParams | undefined ; get < T = unknown > ( url , config ? ) : Promise < T > ; post < T = unknown > ( url , payload ? , config ? ) : Promise < T > ; patch < T = unknown > ( url , payload ? , config ? ) : Promise < T > ; put < T = unknown > ( url , payload ? , config ? ) : Promise < T > ; delete < T = unknown > ( url , config ? ) : Promise < T > ; http < T = unknown > ( url , config ? ) : Promise < T > ; } ; appBundle : { get ( params ) : Promise < AppBundleProps > ; getMany ( params ) : Promise < CollectionProp < AppBundleProps > > ; delete ( params ) : Promise < void > ; create ( params , payload ) : Promise < AppBundleProps > ; } ; appDetails : { upsert ( params , payload ) : Promise < AppDetailsProps > ; get ( params ) : Promise < AppDetailsProps > ; delete ( params ) : Promise < void > ; } ; appSignedRequest : { create ( params , payload ) : Promise < AppSignedRequestProps > ; } ; appSigningSecret : { upsert ( params , payload ) : Promise < AppSigningSecretProps > ; get ( params ) : Promise < AppSigningSecretProps > ; delete ( params ) : Promise < void > ; } ; editorInterface : { get ( params ) : Promise < EditorInterfaceProps > ; getMany ( params ) : Promise < CollectionProp < EditorInterfaceProps > > ; update ( params , rawData , headers ? ) : Promise < EditorInterfaceProps > ; } ; space : { get ( params ) : Promise < SpaceProps > ; getMany ( params ) : Promise < CollectionProp < SpaceProps > > ; create ( params , payload , headers ? ) : Promise < any > ; update ( params , payload , headers ? ) : Promise < SpaceProps > ; delete ( params ) : Promise < any > ; } ; environment : { get ( params ) : Promise < EnvironmentProps > ; getMany ( params ) : Promise < CollectionProp < EnvironmentProps > > ; create ( params , rawData , headers ? ) : Promise < EnvironmentProps > ; createWithId ( params , rawData , headers ? ) : Promise < EnvironmentProps > ; update ( params , rawData , headers ? ) : Promise < EnvironmentProps > ; delete ( params ) : Promise < any > ; } ; environmentAlias : { get ( params ) : Promise < EnvironmentAliasProps > ; getMany ( params ) : Promise < CollectionProp < EnvironmentAliasProps > > ; createWithId ( params , rawData , headers ? ) : Promise < EnvironmentAliasProps > ; update ( params , rawData , headers ? ) : Promise < EnvironmentAliasProps > ; delete ( params ) : Promise < any > ; } ; bulkAction : { get < T extends BulkActionPayload = any > ( params ) : Promise < BulkActionProps < T > > ; publish ( params , payload ) : Promise < BulkActionProps < BulkActionPublishPayload > > ; unpublish ( params , payload ) : Promise < BulkActionProps < BulkActionUnpublishPayload > > ; validate ( params , payload ) : Promise < BulkActionProps < BulkActionValidatePayload > > ; } ; comment : { get ( params ) : Promise < CommentProps > ; getAll ( params ) : Promise < CollectionProp < CommentProps > > ; create ( params , rawData , headers ? ) : Promise < CommentProps > ; update ( params , rawData , headers ? ) : Promise < CommentProps > ; delete ( params ) : Promise < void > ; } ; contentType : { get ( params ) : Promise < ContentTypeProps > ; getMany ( params ) : Promise < CollectionProp < ContentTypeProps > > ; update ( params , rawData , headers ? ) : Promise < ContentTypeProps > ; delete ( params ) : Promise < any > ; publish ( params , rawData ) : Promise < ContentTypeProps > ; unpublish ( params ) : Promise < ContentTypeProps > ; create ( params , rawData ) : Promise < ContentTypeProps > ; createWithId ( params , rawData ) : Promise < ContentTypeProps > ; omitAndDeleteField ( params , contentType , fieldId ) : Promise < ContentTypeProps > ; } ; user : { getManyForSpace ( params ) : Promise < CollectionProp < UserProps > > ; getForSpace ( params ) : Promise < UserProps > ; getCurrent < T = UserProps > ( params ? ) : Promise < T > ; getForOrganization ( params ) : Promise < UserProps > ; getManyForOrganization ( params ) : Promise < CollectionProp < UserProps > > ; } ; entry : { getMany < T extends KeyValueMap = KeyValueMap > ( params ) : Promise < CollectionProp < EntryProps < T > > > ; get < T extends KeyValueMap = KeyValueMap > ( params , rawData ? , headers ? ) : Promise < EntryProps < T > > ; update < T extends KeyValueMap = KeyValueMap > ( params , rawData , headers ? ) : Promise < EntryProps < T > > ; patch < T extends KeyValueMap = KeyValueMap > ( params , rawData , headers ? ) : Promise < EntryProps < T > > ; delete ( params ) : Promise < any > ; publish < T extends KeyValueMap = KeyValueMap > ( params , rawData ) : Promise < EntryProps < T > > ; unpublish < T extends KeyValueMap = KeyValueMap > ( params ) : Promise < EntryProps < T > > ; archive < T extends KeyValueMap = KeyValueMap > ( params ) : Promise < EntryProps < T > > ; unarchive < T extends KeyValueMap = KeyValueMap > ( params ) : Promise < EntryProps < T > > ; create < T extends KeyValueMap = KeyValueMap > ( params , rawData ) : Promise < EntryProps < T > > ; createWithId < T extends KeyValueMap = KeyValueMap > ( params , rawData ) : Promise < EntryProps < T > > ; references ( params ) : Promise < EntryReferenceProps > ; } ; asset : { getMany ( params ) : Promise < CollectionProp < AssetProps > > ; get ( params , rawData ? , headers ? ) : Promise < AssetProps > ; update ( params , rawData , headers ? ) : Promise < AssetProps > ; delete ( params ) : Promise < any > ; publish ( params , rawData ) : Promise < AssetProps > ; unpublish ( params ) : Promise < AssetProps > ; archive ( params ) : Promise < AssetProps > ; unarchive ( params ) : Promise < AssetProps > ; create ( params , rawData ) : Promise < AssetProps > ; createWithId ( params , rawData ) : Promise < AssetProps > ; createFromFiles ( params , data ) : Promise < AssetProps > ; processForAllLocales ( params , asset , processingOptions ? ) : Promise < AssetProps > ; processForLocale ( params , asset , locale , processingOptions ? ) : Promise < AssetProps > ; } ; appUpload : { get ( params ) : Promise < AppUploadProps > ; delete ( params ) : Promise < void > ; create ( params , payload ) : Promise < AppUploadProps > ; } ; assetKey : { create ( params , data ) : Promise < AssetKeyProps > ; } ; upload : { get ( params ) : Promise < any > ; create ( params , data ) : Promise < any > ; delete ( params ) : Promise < any > ; } ; locale : { get ( params ) : Promise < LocaleProps > ; getMany ( params ) : Promise < CollectionProp < LocaleProps > > ; delete ( params ) : Promise < any > ; update ( params , rawData , headers ? ) : Promise < LocaleProps > ; create ( params , data , headers ? ) : Promise < LocaleProps > ; } ; personalAccessToken : { get ( params ) : Promise < PersonalAccessTokenProp > ; getMany ( params ) : Promise < CollectionProp < PersonalAccessTokenProp > > ; create ( rawData , headers ? ) : Promise < PersonalAccessTokenProp > ; revoke ( params ) : Promise < PersonalAccessTokenProp > ; } ; usage : { getManyForSpace ( params ) : Promise < CollectionProp < UsageProps > > ; getManyForOrganization ( params ) : Promise < CollectionProp < UsageProps > > ; } ; release : { get ( params ) : Promise < ReleaseProps > ; query ( params ) : Promise < CursorPaginatedCollectionProp < ReleaseProps > > ; create ( params , data ) : Promise < ReleaseProps > ; update ( params , data ) : Promise < ReleaseProps > ; delete ( params ) : Promise < void > ; publish ( params ) : Promise < ReleaseActionProps < 'publish' > > ; unpublish ( params ) : Promise < ReleaseActionProps < 'unpublish' > > ; validate ( params , data ? ) : Promise < ReleaseActionProps < 'validate' > > ; } ; releaseAction : { get ( params ) : Promise < ReleaseActionProps > ; queryForRelease ( params ) : Promise < CollectionProp < ReleaseActionProps > > ; } ; role : { get ( params ) : Promise < RoleProps > ; getMany ( params ) : Promise < CollectionProp < RoleProps > > ; create ( params , data , headers ? ) : Promise < RoleProps > ; createWithId ( params , data , headers ? ) : Promise < RoleProps > ; update ( params , rawData , headers ? ) : Promise < RoleProps > ; delete ( params ) : Promise < any > ; } ; scheduledActions : { get ( params ) : Promise < ScheduledActionProps > ; getMany ( params ) : Promise < CursorPaginatedCollectionProp < ScheduledActionProps > > ; create ( params , data ) : Promise < ScheduledActionProps > ; delete ( params ) : Promise < ScheduledActionProps > ; update ( params , data ) : Promise < ScheduledActionProps > ; } ; previewApiKey : { get ( params ) : Promise < PreviewApiKeyProps > ; getMany ( params ) : Promise < CollectionProp < PreviewApiKeyProps > > ; } ; apiKey : { get ( params ) : Promise < ApiKeyProps > ; getMany ( params ) : Promise < CollectionProp < ApiKeyProps > > ; create ( params , data , headers ? ) : Promise < ApiKeyProps > ; createWithId ( params , data , headers ? ) : Promise < ApiKeyProps > ; update ( params , rawData , headers ? ) : Promise < ApiKeyProps > ; delete ( params ) : Promise < any > ; } ; appDefinition : { get ( params ) : Promise < AppDefinitionProps > ; getMany ( params ) : Promise < CollectionProp < AppDefinitionProps > > ; create ( params , rawData ) : Promise < AppDefinitionProps > ; update ( params , rawData , headers ? ) : Promise < AppDefinitionProps > ; delete ( params ) : Promise < any > ; } ; appInstallation : { get ( params ) : Promise < AppInstallationProps > ; getMany ( params ) : Promise < CollectionProp < AppInstallationProps > > ; upsert ( params , rawData , headers ? ) : Promise < AppInstallationProps > ; delete ( params ) : Promise < any > ; } ; extension : { get ( params ) : Promise < ExtensionProps > ; getMany ( params ) : Promise < CollectionProp < ExtensionProps > > ; create ( params , rawData , headers ? ) : Promise < ExtensionProps > ; createWithId ( params , rawData , headers ? ) : Promise < ExtensionProps > ; update ( params , rawData , headers ? ) : Promise < ExtensionProps > ; delete ( params ) : Promise < any > ; } ; webhook : { get ( params ) : Promise < WebhookProps > ; getMany ( params ) : Promise < CollectionProp < WebhookProps > > ; getHealthStatus ( params ) : Promise < WebhookHealthProps > ; getCallDetails ( params ) : Promise < WebhookCallDetailsProps > ; getManyCallDetails ( params ) : Promise < CollectionProp < WebhookCallOverviewProps > > ; create ( params , rawData , headers ? ) : Promise < WebhookProps > ; update ( params , rawData ) : Promise < WebhookProps > ; delete ( params ) : Promise < any > ; } ; snapshot : { getManyForEntry < T extends KeyValueMap = KeyValueMap > ( params ) : Promise < CollectionProp < SnapshotProps < EntryProps < T > > > > ; getForEntry < T extends KeyValueMap = KeyValueMap > ( params ) : Promise < SnapshotProps < EntryProps < T > > > ; getManyForContentType ( params ) : Promise < CollectionProp < SnapshotProps < ContentTypeProps > > > ; getForContentType ( params ) : Promise < SnapshotProps < ContentTypeProps > > ; } ; tag : { get ( params ) : Promise < TagProps > ; getMany ( params ) : Promise < CollectionProp < TagProps > > ; createWithId ( params , rawData ) : Promise < TagProps > ; update ( params , rawData , headers ? ) : Promise < TagProps > ; delete ( params , version ) : Promise < any > ; } ; organization : { getAll ( params ? ) : Promise < CollectionProp < OrganizationProp > > ; get ( params ) : Promise < OrganizationProp > ; } ; organizationInvitation : { get ( params , headers ? ) : Promise < OrganizationInvitationProps > ; create ( params , data , headers ? ) : Promise < OrganizationInvitationProps > ; } ; organizationMembership : { get ( params ) : Promise < OrganizationMembershipProps > ; getMany ( params ) : Promise < CollectionProp < OrganizationMembershipProps > > ; update ( params , rawData , headers ? ) : Promise < OrganizationMembershipProps > ; delete ( params ) : Promise < any > ; } ; spaceMember : { get ( params ) : Promise < SpaceMemberProps > ; getMany ( params ) : Promise < CollectionProp < SpaceMemberProps > > ; } ; spaceMembership : { get ( params ) : Promise < SpaceMembershipProps > ; getMany ( params ) : Promise < CollectionProp < SpaceMembershipProps > > ; getForOrganization ( params ) : Promise < SpaceMembershipProps > ; getManyForOrganization ( params ) : Promise < CollectionProp < SpaceMembershipProps > > ; create ( params , data , headers ? ) : Promise < SpaceMembershipProps > ; createWithId ( params , data , headers ? ) : Promise < SpaceMembershipProps > ; update ( params , rawData , headers ? ) : Promise < SpaceMembershipProps > ; delete ( params ) : Promise < any > ; } ; task : { get ( params ) : Promise < TaskProps > ; getAll ( params ) : Promise < CollectionProp < TaskProps > > ; create ( params , rawData , headers ? ) : Promise < TaskProps > ; update ( params , rawData , headers ? ) : Promise < TaskProps > ; delete ( params ) : Promise < void > ; } ; team : { get ( params ) : Promise < TeamProps > ; getMany ( params ) : Promise < CollectionProp < TeamProps > > ; getManyForSpace ( params ) : Promise < CollectionProp < TeamProps > > ; create ( params , rawData , headers ? ) : Promise < any > ; update ( params , rawData , headers ? ) : Promise < TeamProps > ; delete ( params ) : Promise < any > ; } ; teamMembership : { get ( params ) : Promise < TeamMembershipProps > ; getManyForOrganization ( params ) : Promise < CollectionProp < TeamMembershipProps > > ; getManyForTeam ( params ) : Promise < CollectionProp < TeamMembershipProps > > ; create ( params , rawData , headers ? ) : Promise < TeamMembershipProps > ; update ( params , rawData , headers ? ) : Promise < TeamMembershipProps > ; delete ( params ) : Promise < any > ; } ; teamSpaceMembership : { get ( params ) : Promise < TeamSpaceMembershipProps > ; getMany ( params ) : Promise < CollectionProp < TeamSpaceMembershipProps > > ; getForOrganization ( params ) : Promise < TeamSpaceMembershipProps > ; getManyForOrganization ( params ) : Promise < CollectionProp < TeamSpaceMembershipProps > > ; create ( params , rawData , headers ? ) : Promise < TeamSpaceMembershipProps > ; update ( params , rawData , headers ? ) : Promise < TeamSpaceMembershipProps > ; delete ( params ) : Promise < any > ; } ; } ; export type AlphaWorkflowExtension = { workflowDefinition : { get ( params , headers ? ) : Promise < WorkflowDefinitionProps > ; getMany ( params , headers ? ) : Promise < CollectionProp < WorkflowDefinitionProps > > ; create ( params , rawData , headers ? ) : Promise < WorkflowDefinitionProps > ; update ( params , rawData , headers ? ) : Promise < WorkflowDefinitionProps > ; delete ( params , headers ? ) : Promise < any > ; } ; } ; export type AlphaExtensions = AlphaWorkflowExtension ; export type AlphaPlainClientAPI = PlainClientAPI & AlphaWorkflowExtension ;