Alokai

ApiMethods

ApiMethods type of the Contentful integration.

type ApiMethods = {
  createAssetKey(context: ContentfulIntegrationContext, expiresAt: number): Promise<AssetKey>;
  getAsset(context: ContentfulIntegrationContext, id: string, query?: AssetQueries<undefined>): Promise<Asset<undefined, LocaleCode>>;
  getAssets(context: ContentfulIntegrationContext, query?: AssetsQueries<AssetFields, undefined>): Promise<AssetCollection<undefined, LocaleCode>>;
  getContent(context: ContentfulIntegrationContext, params: GetContentParams): Promise<Entry<any>[]>;
  getContentType(context: ContentfulIntegrationContext, id: string): Promise<ContentType>;
  getContentTypes(context: ContentfulIntegrationContext, query?: {
    query?: string;
  }): Promise<ContentType>;
  getEntries<Fields extends FieldsType = FieldsType>(context: ContentfulIntegrationContext, query?: EntriesQueries<EntrySkeletonType<Fields>, undefined>): Promise<EntryCollection<EntrySkeletonType<Fields>, undefined, LocaleCode>>;
  getEntry<Fields extends FieldsType = FieldsType>(context: ContentfulIntegrationContext, id: string, query?: EntryQueries<undefined>): Promise<Entry<EntrySkeletonType<Fields>, undefined, LocaleCode>>;
  getLocales(context: ContentfulIntegrationContext): Promise<LocaleCollection>;
  getSpace(context: ContentfulIntegrationContext): Promise<Space>;
  getTag(context: ContentfulIntegrationContext, id: string): Promise<Tag>;
  getTags(context: ContentfulIntegrationContext, query?: TagQueries): Promise<TagCollection>;
  sync<Fields extends FieldsType = FieldsType>(context: ContentfulIntegrationContext, query: SyncQuery, syncOptions?: SyncOptions): Promise<SyncCollection<EntrySkeletonType<Fields>, undefined, LocaleCode>>;
};

Referenced Types

  • ContentfulIntegrationContext
  • AssetKey
  • AssetQueries
  • Asset
  • LocaleCode
  • AssetsQueries
  • AssetFields
  • AssetCollection
  • GetContentParams
  • Entry
  • ContentType
  • FieldsType
  • EntriesQueries
  • EntrySkeletonType
  • EntryCollection
  • EntryQueries
  • LocaleCollection
  • Space
  • Tag
  • TagQueries
  • TagCollection
  • SyncQuery
  • SyncOptions
  • SyncCollection

On this page