@localazy/strapi-plugin
Version:
The official Strapi Plugin by Localazy.
78 lines (77 loc) • 4.22 kB
TypeScript
export declare const getLocalazyUserService: () => {
getUser(): Promise<import("../db/model/localazy-user").Identity>;
updateUser(identity: import("../db/model/localazy-user").Identity): Promise<import("../db/model/localazy-user").Identity>;
deleteUser(): Promise<import("../db/model/localazy-user").Identity>;
};
export declare const getLocalazyPubAPIService: () => {
listFiles(projectId: string): Promise<import("@localazy/api-client").File[]>;
getStrapiFile(projectId: string): Promise<import("@localazy/api-client").File>;
listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project[]>;
getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project>;
getWebhooksSecret(projectId: string): Promise<string>;
};
export declare const getLocalazyTransferUploadService: () => {
upload({ notificationService }: {
notificationService: import("../services/helpers/job-notification-service").default;
}): Promise<void>;
};
export declare const getLocalazyTransferDownloadService: () => {
download({ notificationService }: {
notificationService: import("../services/helpers/job-notification-service").default;
}): Promise<void>;
};
export declare const getPluginSettingsService: () => {
getContentTransferSetup(): Promise<import("../models/plugin/content-transfer-setup").ContentTransferSetup>;
updateContentTransferSetup(setup: any): Promise<{
has_setup: boolean;
setup: any;
}>;
getPluginSettings(): Promise<import("../db/model/plugin-settings").PluginSettings>;
updatePluginSettings(settings: any): Promise<any>;
};
export declare const getStrapiService: () => {
getModels(): Promise<any[]>;
getLocalizableModels(): Promise<any[]>;
getPluginVersion(): Promise<string>;
};
export declare const getStrapiI18nService: () => {
getLocales(): Promise<import("../models/strapi/locale").Locale[]>;
getDefaultLocaleCode(): Promise<string>;
createStrapiLocale(isoLocalazy: string): Promise<import("../models/strapi/locale").Locale>;
parseLocalazyKey(key: string): {
uid: string;
id: string;
rest: string[];
};
getEntryInLocale(modelUid: import("@strapi/types/dist/uid").ContentType, documentId: string, isoStrapi: string): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
createLocalizationForAnExistingEntry(uid: import("@strapi/types/dist/uid").ContentType, baseEntry: any, newEntry: any): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
updateLocalizationForAnExistingEntry(uid: any, localizedDocumentId: any, data: any, locale: string): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
};
export declare const getStrapiLocalazyI18nService: () => {
createEntry(uid: import("@strapi/types/dist/uid").ContentType, strapiContentTypesModels: any, translatedModel: any, baseEntry: any, isoStrapi: any): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
updateEntry(uid: any, localizedDocumentId: string, strapiContentTypesModels: any, translatedModel: any, baseEntry: any, isoStrapi: any): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
};
export declare const getLocalazyUploadService: () => {
upload(file: any, config?: {}): Promise<{
success: boolean;
result: import("@localazy/api-client").File & {
importBatch: string;
};
message?: undefined;
} | {
success: boolean;
message: any;
result?: undefined;
}>;
createImportFileRepresentation(sourceLang: string, strings: Record<string, any>): {
[x: string]: {
[x: string]: any;
};
};
};
export declare const getEntryExclusionService: () => {
getEntryKey(contentType: string, documentId: string): string;
getEntryExclusion(contentType: string, documentId: string): Promise<boolean>;
setEntryExclusion(contentType: string, documentId: string, excludeFromTranslation: boolean): Promise<void>;
getContentTypeExclusions(contentType: string): Promise<string[]>;
};