Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@transifex/api Update TS declarations #209

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 35 additions & 22 deletions packages/api/src/transifexApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ declare class JsonApiResource {
static allPages(): Iterable<Collection>;
}

declare class JsonApiResourceDownload extends JsonApiResource {
static download(params: AnyDict): Promise<any>;
}

declare class JsonApiResourceUpload extends JsonApiResource {
static upload(params: AnyDict): Promise<any>;
}

declare class JsonApiResourceResource extends JsonApiResource {
purge(): Promise<number>;
downloadSource(params?: AnyDict): Promise<any>;
}

declare class Collection {
fetch(): Promise<void>;
getNext(): Promise<Collection>;
Expand All @@ -67,53 +80,53 @@ export declare class TransifexApi {
Language: typeof JsonApiResource;
Project: typeof JsonApiResource;
ProjectWebhook: typeof JsonApiResource;
Resource: typeof JsonApiResource;
Resource: typeof JsonApiResourceResource;
ResourceString: typeof JsonApiResource;
ResourceStringsAsyncDownload: typeof JsonApiResource;
ResourceStringsAsyncUpload: typeof JsonApiResource;
ResourceStringsAsyncDownload: typeof JsonApiResourceDownload;
ResourceStringsAsyncUpload: typeof JsonApiResourceUpload;
ResourceStringComment: typeof JsonApiResource;
I18nFormat: typeof JsonApiResource;
ContextScreenshotMap: typeof JsonApiResource;
ContextScreenshot: typeof JsonApiResource;
OrganizationActivityReportsAsyncDownload: typeof JsonApiResource;
ProjectActivityReportsAsyncDownload: typeof JsonApiResource;
ResourceActivityReportsAsyncDownload: typeof JsonApiResource;
TeamActivityReportsAsyncDownload: typeof JsonApiResource;
OrganizationActivityReportsAsyncDownload: typeof JsonApiResourceDownload;
ProjectActivityReportsAsyncDownload: typeof JsonApiResourceDownload;
ResourceActivityReportsAsyncDownload: typeof JsonApiResourceDownload;
TeamActivityReportsAsyncDownload: typeof JsonApiResourceDownload;
ResourceLanguageStats: typeof JsonApiResource;
ResourceTranslation: typeof JsonApiResource;
ResourceTranslationsAsyncDownload: typeof JsonApiResource;
ResourceTranslationsAsyncUpload: typeof JsonApiResource;
ResourceTranslationsAsyncDownload: typeof JsonApiResourceDownload;
ResourceTranslationsAsyncUpload: typeof JsonApiResourceUpload;
TeamMembership: typeof JsonApiResource;
Team: typeof JsonApiResource;
TmxAsyncDownload: typeof JsonApiResource;
TmxAsyncUpload: typeof JsonApiResource;
TmxAsyncDownload: typeof JsonApiResourceDownload;
TmxAsyncUpload: typeof JsonApiResourceUpload;
ResourceStringsRevision: typeof JsonApiResource;

organizations: typeof JsonApiResource;
users: typeof JsonApiResource;
languages: typeof JsonApiResource;
projects: typeof JsonApiResource;
project_webhooks: typeof JsonApiResource;
resources: typeof JsonApiResource;
resources: typeof JsonApiResourceResource;
resource_strings: typeof JsonApiResource;
resource_strings_async_downloads: typeof JsonApiResource;
resource_strings_async_uploads: typeof JsonApiResource;
resource_strings_async_downloads: typeof JsonApiResourceDownload;
resource_strings_async_uploads: typeof JsonApiResourceUpload;
resource_string_comments: typeof JsonApiResource;
i18n_formats: typeof JsonApiResource;
context_screenshot_maps: typeof JsonApiResource;
context_screenshots: typeof JsonApiResource;
organization_activity_reports_async_downloads: typeof JsonApiResource;
project_activity_reports_async_downloads: typeof JsonApiResource;
resource_activity_reports_async_downloads: typeof JsonApiResource;
team_activity_reports_async_downloads: typeof JsonApiResource;
organization_activity_reports_async_downloads: typeof JsonApiResourceDownload;
project_activity_reports_async_downloads: typeof JsonApiResourceDownload;
resource_activity_reports_async_downloads: typeof JsonApiResourceDownload;
team_activity_reports_async_downloads: typeof JsonApiResourceDownload;
resource_language_stats: typeof JsonApiResource;
resource_translations: typeof JsonApiResource;
resource_translations_async_downloads: typeof JsonApiResource;
resource_translations_async_uploads: typeof JsonApiResource;
resource_translations_async_downloads: typeof JsonApiResourceDownload;
resource_translations_async_uploads: typeof JsonApiResourceUpload;
team_memberships: typeof JsonApiResource;
teams: typeof JsonApiResource;
tmx_async_downloads: typeof JsonApiResource;
tmx_async_uploads: typeof JsonApiResource;
tmx_async_downloads: typeof JsonApiResourceDownload;
tmx_async_uploads: typeof JsonApiResourceUpload;
resource_strings_revisions: typeof JsonApiResource;
}

Expand Down
Loading