Skip to content

Commit

Permalink
rework types, closes #443
Browse files Browse the repository at this point in the history
  • Loading branch information
bodrovis committed Mar 25, 2024
1 parent 7b0f774 commit 2e8be4b
Show file tree
Hide file tree
Showing 301 changed files with 1,995 additions and 1,331 deletions.
2 changes: 1 addition & 1 deletion dist/collections/base_collection.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HttpMethod } from "../types/http_method.js";
import type { HttpMethod } from "../types/http_method.js";
import { ApiRequest } from "../http_client/base.js";
import { ApiError } from "../models/api_error.js";
import { PaginatedResult } from "../models/paginated_result.js";
Expand Down
17 changes: 2 additions & 15 deletions dist/collections/branches.d.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
import { BaseCollection } from "./base_collection.js";
import { Branch } from "../models/branch.js";
import { PaginatedResult } from "../interfaces/paginated_result.js";
import { ProjectWithPagination } from "../interfaces/project_with_pagination.js";
import { ProjectOnly } from "../interfaces/project_only.js";
import { BranchParams } from "../types/branch_params.js";
import { MergeBranchParams } from "../types/merge_branch_params.js";
type BranchDeleted = {
project_id: string;
branch_deleted: boolean;
};
type BranchMerged = {
project_id: string;
branch_merged: boolean;
branch: Branch;
target_branch: Branch;
};
import type { ProjectWithPagination, ProjectOnly } from "../types/common_get_params.js";
import type { BranchParams, MergeBranchParams, BranchDeleted, BranchMerged } from "../types/branches.js";
export declare class Branches extends BaseCollection {
protected static rootElementName: string;
protected static rootElementNameSingular: string;
Expand All @@ -27,4 +15,3 @@ export declare class Branches extends BaseCollection {
delete(branch_id: string | number, request_params: ProjectOnly): Promise<BranchDeleted>;
merge(branch_id: string | number, request_params: ProjectOnly, body?: MergeBranchParams): Promise<BranchMerged>;
}
export {};
2 changes: 1 addition & 1 deletion dist/collections/branches.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 3 additions & 18 deletions dist/collections/comments.d.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
import { BaseCollection } from "./base_collection.js";
import { Comment } from "../models/comment.js";
import { PaginatedResult } from "../interfaces/paginated_result.js";
import { ProjectWithPagination } from "../interfaces/project_with_pagination.js";
import { ProjectOnly } from "../interfaces/project_only.js";
interface ParamsWithPagination extends ProjectWithPagination {
key_id: number | string;
}
interface ProjectAndKey extends ProjectOnly {
key_id: number | string;
}
type CommentData = {
comment: string;
};
type CommentDeleted = {
project_id: string;
comment_deleted: boolean;
branch?: string;
};
import type { ProjectWithPagination } from "../types/common_get_params.js";
import type { CommentData, CommentDeleted, KeyProjectPagination, ProjectAndKey } from "../types/comments.js";
export declare class Comments extends BaseCollection {
protected static rootElementName: string;
protected static rootElementNameSingular: string;
protected static prefixURI: string;
protected static elementClass: typeof Comment;
list(request_params: ParamsWithPagination): Promise<PaginatedResult<Comment>>;
list(request_params: KeyProjectPagination): Promise<PaginatedResult<Comment>>;
create(comment_params: CommentData | CommentData[], request_params: ProjectAndKey): Promise<Comment[]>;
get(comment_id: string | number, request_params: ProjectAndKey): Promise<Comment>;
delete(comment_id: string | number, request_params: ProjectAndKey): Promise<CommentDeleted>;
list_project_comments(params: ProjectWithPagination): Promise<PaginatedResult<Comment>>;
}
export {};
2 changes: 1 addition & 1 deletion dist/collections/comments.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions dist/collections/contributors.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import { BaseCollection } from "./base_collection.js";
import { Contributor } from "../models/contributor.js";
import { ProjectWithPagination } from "../interfaces/project_with_pagination.js";
import { PaginatedResult } from "../interfaces/paginated_result.js";
import { ProjectOnly } from "../interfaces/project_only.js";
import { ContributorCreateData } from "../types/contributor_create_data.js";
import { ContributorUpdateData } from "../types/contributor_update_data.js";
type ContributorDeleted = {
project_id: string;
contributor_deleted: boolean;
branch?: string;
};
import type { ProjectWithPagination, ProjectOnly } from "../types/common_get_params.js";
import type { ContributorCreateData, ContributorUpdateData, ContributorDeleted } from "../types/contributors.js";
export declare class Contributors extends BaseCollection {
protected static rootElementName: string;
protected static rootElementNameSingular: string;
Expand All @@ -21,4 +14,3 @@ export declare class Contributors extends BaseCollection {
update(contributor_id: string | number, contributor_params: ContributorUpdateData, request_params: ProjectOnly): Promise<Contributor>;
delete(contributor_id: string | number, request_params: ProjectOnly): Promise<ContributorDeleted>;
}
export {};
2 changes: 1 addition & 1 deletion dist/collections/contributors.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 2 additions & 13 deletions dist/collections/files.d.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
import { BaseCollection } from "./base_collection.js";
import { File } from "../models/file.js";
import { QueuedProcess } from "../models/queued_process.js";
import { UploadFileParams } from "../interfaces/upload_file_params.js";
import { DownloadFileParams } from "../interfaces/download_file_params.js";
import { ProjectWithPagination } from "../interfaces/project_with_pagination.js";
import { PaginatedResult } from "../interfaces/paginated_result.js";
import { ProjectOnly } from "../interfaces/project_only.js";
import { DownloadBundle } from "../types/download_bundle.js";
interface ListFileParams extends ProjectWithPagination {
filter_filename?: string;
}
type FileDeleted = {
project_id: string;
file_deleted: boolean;
};
import type { ProjectOnly } from "../types/common_get_params.js";
import type { DownloadBundle, FileDeleted, DownloadFileParams, UploadFileParams, ListFileParams } from "../types/files.js";
export declare class Files extends BaseCollection {
protected static rootElementName: string;
protected static prefixURI: string;
Expand All @@ -25,4 +15,3 @@ export declare class Files extends BaseCollection {
download(project_id: string, download: DownloadFileParams): Promise<DownloadBundle>;
delete(file_id: string | number, request_params: ProjectOnly): Promise<FileDeleted>;
}
export {};
2 changes: 1 addition & 1 deletion dist/collections/files.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 2 additions & 19 deletions dist/collections/keys.d.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
import { BaseCollection } from "./base_collection.js";
import { Key } from "../models/key.js";
import { KeyParamsWithPagination } from "../interfaces/key_params_with_pagination.js";
import { PaginatedResult } from "../interfaces/paginated_result.js";
import { ProjectOnly } from "../interfaces/project_only.js";
import { CreateKeyParams } from "../types/create_key_params.js";
import { UpdateKeyData } from "../types/update_key_data.js";
import { BulkUpdateKeyParams } from "../types/bulk_update_key_params.js";
import { BulkResult } from "../interfaces/bulk_result.js";
import { GetKeyParams } from "../interfaces/get_key_params.js";
type KeyDeleted = {
project_id: string;
key_removed: boolean;
keys_locked?: number;
branch?: string;
};
type KeysBulkDeleted = {
project_id: string;
keys_removed: boolean;
keys_locked: number;
branch?: string;
};
import type { ProjectOnly } from "../types/common_get_params.js";
import type { CreateKeyParams, UpdateKeyData, BulkUpdateKeyParams, KeyDeleted, KeysBulkDeleted, KeyParamsWithPagination, GetKeyParams } from "../types/keys.js";
export declare class Keys extends BaseCollection {
protected static rootElementName: string;
protected static rootElementNameSingular: string;
Expand All @@ -33,4 +17,3 @@ export declare class Keys extends BaseCollection {
bulk_update(key_params: BulkUpdateKeyParams, request_params: ProjectOnly): Promise<BulkResult<Key>>;
bulk_delete(key_ids: number[] | string[], request_params: ProjectOnly): Promise<KeysBulkDeleted>;
}
export {};
2 changes: 1 addition & 1 deletion dist/collections/keys.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 2 additions & 11 deletions dist/collections/languages.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
import { Language } from "../models/language.js";
import { BaseCollection } from "./base_collection.js";
import { PaginatedResult } from "../interfaces/paginated_result.js";
import { ProjectWithPagination } from "../interfaces/project_with_pagination.js";
import { ProjectOnly } from "../interfaces/project_only.js";
import { BulkResult } from "../interfaces/bulk_result.js";
import { PaginationParams } from "../interfaces/pagination_params.js";
import { CreateLanguageParams } from "../types/create_language_params.js";
import { UpdateLanguageParams } from "../types/update_language_params.js";
type LanguageDeleted = {
project_id: string;
language_deleted: boolean;
branch?: string;
};
import type { ProjectWithPagination, ProjectOnly, PaginationParams } from "../types/common_get_params.js";
import type { CreateLanguageParams, UpdateLanguageParams, LanguageDeleted } from "../types/languages.js";
export declare class Languages extends BaseCollection {
protected static rootElementName: string;
protected static rootElementNameSingular: string;
Expand All @@ -24,4 +16,3 @@ export declare class Languages extends BaseCollection {
update(lang_id: string | number, lang_params: UpdateLanguageParams, request_params: ProjectOnly): Promise<Language>;
delete(lang_id: string | number, request_params: ProjectOnly): Promise<LanguageDeleted>;
}
export {};
Loading

0 comments on commit 2e8be4b

Please sign in to comment.