@nikolaymatrosov/sourcecraft-sdk 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +7 -0
- package/README.md +369 -0
- package/dist/apis/CIApi.d.ts +85 -0
- package/dist/apis/CIApi.d.ts.map +1 -0
- package/dist/apis/CIApi.js +156 -0
- package/dist/apis/CIApi.js.map +1 -0
- package/dist/apis/IssuesApi.d.ts +352 -0
- package/dist/apis/IssuesApi.d.ts.map +1 -0
- package/dist/apis/IssuesApi.js +523 -0
- package/dist/apis/IssuesApi.js.map +1 -0
- package/dist/apis/IssuesAttachmentsApi.d.ts +246 -0
- package/dist/apis/IssuesAttachmentsApi.d.ts.map +1 -0
- package/dist/apis/IssuesAttachmentsApi.js +375 -0
- package/dist/apis/IssuesAttachmentsApi.js.map +1 -0
- package/dist/apis/IssuesCommentsApi.d.ts +241 -0
- package/dist/apis/IssuesCommentsApi.d.ts.map +1 -0
- package/dist/apis/IssuesCommentsApi.js +357 -0
- package/dist/apis/IssuesCommentsApi.js.map +1 -0
- package/dist/apis/IssuesCommentsAttachmentsApi.d.ts +143 -0
- package/dist/apis/IssuesCommentsAttachmentsApi.d.ts.map +1 -0
- package/dist/apis/IssuesCommentsAttachmentsApi.js +228 -0
- package/dist/apis/IssuesCommentsAttachmentsApi.js.map +1 -0
- package/dist/apis/IssuesCommentsReactionsApi.d.ts +85 -0
- package/dist/apis/IssuesCommentsReactionsApi.d.ts.map +1 -0
- package/dist/apis/IssuesCommentsReactionsApi.js +138 -0
- package/dist/apis/IssuesCommentsReactionsApi.js.map +1 -0
- package/dist/apis/IssuesLabelsApi.d.ts +283 -0
- package/dist/apis/IssuesLabelsApi.d.ts.map +1 -0
- package/dist/apis/IssuesLabelsApi.js +418 -0
- package/dist/apis/IssuesLabelsApi.js.map +1 -0
- package/dist/apis/IssuesLinkedIssuesApi.d.ts +192 -0
- package/dist/apis/IssuesLinkedIssuesApi.d.ts.map +1 -0
- package/dist/apis/IssuesLinkedIssuesApi.js +285 -0
- package/dist/apis/IssuesLinkedIssuesApi.js.map +1 -0
- package/dist/apis/IssuesLinkedPRsApi.d.ts +217 -0
- package/dist/apis/IssuesLinkedPRsApi.d.ts.map +1 -0
- package/dist/apis/IssuesLinkedPRsApi.js +324 -0
- package/dist/apis/IssuesLinkedPRsApi.js.map +1 -0
- package/dist/apis/IssuesStatusesApi.d.ts +50 -0
- package/dist/apis/IssuesStatusesApi.d.ts.map +1 -0
- package/dist/apis/IssuesStatusesApi.js +89 -0
- package/dist/apis/IssuesStatusesApi.js.map +1 -0
- package/dist/apis/OrganizationApi.d.ts +85 -0
- package/dist/apis/OrganizationApi.d.ts.map +1 -0
- package/dist/apis/OrganizationApi.js +139 -0
- package/dist/apis/OrganizationApi.js.map +1 -0
- package/dist/apis/RepositoryApi.d.ts +669 -0
- package/dist/apis/RepositoryApi.d.ts.map +1 -0
- package/dist/apis/RepositoryApi.js +1013 -0
- package/dist/apis/RepositoryApi.js.map +1 -0
- package/dist/apis/RepositoryLabelsApi.d.ts +319 -0
- package/dist/apis/RepositoryLabelsApi.d.ts.map +1 -0
- package/dist/apis/RepositoryLabelsApi.js +480 -0
- package/dist/apis/RepositoryLabelsApi.js.map +1 -0
- package/dist/apis/RepositoryMilestonesApi.d.ts +319 -0
- package/dist/apis/RepositoryMilestonesApi.d.ts.map +1 -0
- package/dist/apis/RepositoryMilestonesApi.js +482 -0
- package/dist/apis/RepositoryMilestonesApi.js.map +1 -0
- package/dist/apis/RepositoryPullRequestApi.d.ts +513 -0
- package/dist/apis/RepositoryPullRequestApi.d.ts.map +1 -0
- package/dist/apis/RepositoryPullRequestApi.js +756 -0
- package/dist/apis/RepositoryPullRequestApi.js.map +1 -0
- package/dist/apis/RepositoryPullRequestCommentsApi.d.ts +191 -0
- package/dist/apis/RepositoryPullRequestCommentsApi.d.ts.map +1 -0
- package/dist/apis/RepositoryPullRequestCommentsApi.js +297 -0
- package/dist/apis/RepositoryPullRequestCommentsApi.js.map +1 -0
- package/dist/apis/RepositoryPullRequestReviewersApi.d.ts +275 -0
- package/dist/apis/RepositoryPullRequestReviewersApi.d.ts.map +1 -0
- package/dist/apis/RepositoryPullRequestReviewersApi.js +426 -0
- package/dist/apis/RepositoryPullRequestReviewersApi.js.map +1 -0
- package/dist/apis/RolesApi.d.ts +197 -0
- package/dist/apis/RolesApi.d.ts.map +1 -0
- package/dist/apis/RolesApi.js +336 -0
- package/dist/apis/RolesApi.js.map +1 -0
- package/dist/apis/UserPullRequestApi.d.ts +119 -0
- package/dist/apis/UserPullRequestApi.d.ts.map +1 -0
- package/dist/apis/UserPullRequestApi.js +174 -0
- package/dist/apis/UserPullRequestApi.js.map +1 -0
- package/dist/apis/index.d.ts +20 -0
- package/dist/apis/index.d.ts.map +1 -0
- package/dist/apis/index.js +60 -0
- package/dist/apis/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/models/AddRepoRolesBody.d.ts +34 -0
- package/dist/models/AddRepoRolesBody.d.ts.map +1 -0
- package/dist/models/AddRepoRolesBody.js +54 -0
- package/dist/models/AddRepoRolesBody.js.map +1 -0
- package/dist/models/AddRepoRolesResponse.d.ts +41 -0
- package/dist/models/AddRepoRolesResponse.d.ts.map +1 -0
- package/dist/models/AddRepoRolesResponse.js +56 -0
- package/dist/models/AddRepoRolesResponse.js.map +1 -0
- package/dist/models/Anchor.d.ts +47 -0
- package/dist/models/Anchor.d.ts.map +1 -0
- package/dist/models/Anchor.js +55 -0
- package/dist/models/Anchor.js.map +1 -0
- package/dist/models/ApiErrorResponse.d.ts +53 -0
- package/dist/models/ApiErrorResponse.d.ts.map +1 -0
- package/dist/models/ApiErrorResponse.js +55 -0
- package/dist/models/ApiErrorResponse.js.map +1 -0
- package/dist/models/Attachment.d.ts +58 -0
- package/dist/models/Attachment.d.ts.map +1 -0
- package/dist/models/Attachment.js +58 -0
- package/dist/models/Attachment.js.map +1 -0
- package/dist/models/AttachmentDownloadable.d.ts +64 -0
- package/dist/models/AttachmentDownloadable.d.ts.map +1 -0
- package/dist/models/AttachmentDownloadable.js +60 -0
- package/dist/models/AttachmentDownloadable.js.map +1 -0
- package/dist/models/AttachmentEmbedded.d.ts +33 -0
- package/dist/models/AttachmentEmbedded.d.ts.map +1 -0
- package/dist/models/AttachmentEmbedded.js +49 -0
- package/dist/models/AttachmentEmbedded.js.map +1 -0
- package/dist/models/AttachmentsResponse.d.ts +34 -0
- package/dist/models/AttachmentsResponse.d.ts.map +1 -0
- package/dist/models/AttachmentsResponse.js +54 -0
- package/dist/models/AttachmentsResponse.js.map +1 -0
- package/dist/models/AutoAssignBody.d.ts +33 -0
- package/dist/models/AutoAssignBody.d.ts.map +1 -0
- package/dist/models/AutoAssignBody.js +49 -0
- package/dist/models/AutoAssignBody.js.map +1 -0
- package/dist/models/AutoAssignResponse.d.ts +34 -0
- package/dist/models/AutoAssignResponse.d.ts.map +1 -0
- package/dist/models/AutoAssignResponse.js +54 -0
- package/dist/models/AutoAssignResponse.js.map +1 -0
- package/dist/models/AutoAssignResponseReviewerDelta.d.ts +41 -0
- package/dist/models/AutoAssignResponseReviewerDelta.d.ts.map +1 -0
- package/dist/models/AutoAssignResponseReviewerDelta.js +53 -0
- package/dist/models/AutoAssignResponseReviewerDelta.js.map +1 -0
- package/dist/models/Branch.d.ts +40 -0
- package/dist/models/Branch.d.ts.map +1 -0
- package/dist/models/Branch.js +52 -0
- package/dist/models/Branch.js.map +1 -0
- package/dist/models/CloneURL.d.ts +39 -0
- package/dist/models/CloneURL.d.ts.map +1 -0
- package/dist/models/CloneURL.js +51 -0
- package/dist/models/CloneURL.js.map +1 -0
- package/dist/models/Commit.d.ts +39 -0
- package/dist/models/Commit.d.ts.map +1 -0
- package/dist/models/Commit.js +51 -0
- package/dist/models/Commit.js.map +1 -0
- package/dist/models/CreateIssueBody.d.ts +107 -0
- package/dist/models/CreateIssueBody.d.ts.map +1 -0
- package/dist/models/CreateIssueBody.js +77 -0
- package/dist/models/CreateIssueBody.js.map +1 -0
- package/dist/models/CreateIssueCommentBody.d.ts +39 -0
- package/dist/models/CreateIssueCommentBody.d.ts.map +1 -0
- package/dist/models/CreateIssueCommentBody.js +51 -0
- package/dist/models/CreateIssueCommentBody.js.map +1 -0
- package/dist/models/CreateLabelBody.d.ts +45 -0
- package/dist/models/CreateLabelBody.d.ts.map +1 -0
- package/dist/models/CreateLabelBody.js +55 -0
- package/dist/models/CreateLabelBody.js.map +1 -0
- package/dist/models/CreateLinkBody.d.ts +46 -0
- package/dist/models/CreateLinkBody.d.ts.map +1 -0
- package/dist/models/CreateLinkBody.js +54 -0
- package/dist/models/CreateLinkBody.js.map +1 -0
- package/dist/models/CreateMilestoneBody.d.ts +57 -0
- package/dist/models/CreateMilestoneBody.d.ts.map +1 -0
- package/dist/models/CreateMilestoneBody.js +59 -0
- package/dist/models/CreateMilestoneBody.js.map +1 -0
- package/dist/models/CreatePullRequestBody.d.ts +69 -0
- package/dist/models/CreatePullRequestBody.d.ts.map +1 -0
- package/dist/models/CreatePullRequestBody.js +61 -0
- package/dist/models/CreatePullRequestBody.js.map +1 -0
- package/dist/models/CreatePullRequestCommentBody.d.ts +64 -0
- package/dist/models/CreatePullRequestCommentBody.d.ts.map +1 -0
- package/dist/models/CreatePullRequestCommentBody.js +60 -0
- package/dist/models/CreatePullRequestCommentBody.js.map +1 -0
- package/dist/models/CreateRepositoryBody.d.ts +66 -0
- package/dist/models/CreateRepositoryBody.d.ts.map +1 -0
- package/dist/models/CreateRepositoryBody.js +70 -0
- package/dist/models/CreateRepositoryBody.js.map +1 -0
- package/dist/models/DeltaAction.d.ts +26 -0
- package/dist/models/DeltaAction.d.ts.map +1 -0
- package/dist/models/DeltaAction.js +52 -0
- package/dist/models/DeltaAction.js.map +1 -0
- package/dist/models/DiffPos.d.ts +52 -0
- package/dist/models/DiffPos.d.ts.map +1 -0
- package/dist/models/DiffPos.js +56 -0
- package/dist/models/DiffPos.js.map +1 -0
- package/dist/models/FileType.d.ts +28 -0
- package/dist/models/FileType.d.ts.map +1 -0
- package/dist/models/FileType.js +54 -0
- package/dist/models/FileType.js.map +1 -0
- package/dist/models/ForkRepositoryBody.d.ts +51 -0
- package/dist/models/ForkRepositoryBody.d.ts.map +1 -0
- package/dist/models/ForkRepositoryBody.js +55 -0
- package/dist/models/ForkRepositoryBody.js.map +1 -0
- package/dist/models/Hunk.d.ts +57 -0
- package/dist/models/Hunk.d.ts.map +1 -0
- package/dist/models/Hunk.js +57 -0
- package/dist/models/Hunk.js.map +1 -0
- package/dist/models/Image.d.ts +33 -0
- package/dist/models/Image.d.ts.map +1 -0
- package/dist/models/Image.js +49 -0
- package/dist/models/Image.js.map +1 -0
- package/dist/models/InitSettings.d.ts +57 -0
- package/dist/models/InitSettings.d.ts.map +1 -0
- package/dist/models/InitSettings.js +57 -0
- package/dist/models/InitSettings.js.map +1 -0
- package/dist/models/InputValue.d.ts +39 -0
- package/dist/models/InputValue.d.ts.map +1 -0
- package/dist/models/InputValue.js +51 -0
- package/dist/models/InputValue.js.map +1 -0
- package/dist/models/Issue.d.ts +142 -0
- package/dist/models/Issue.d.ts.map +1 -0
- package/dist/models/Issue.js +100 -0
- package/dist/models/Issue.js.map +1 -0
- package/dist/models/IssueComment.d.ts +87 -0
- package/dist/models/IssueComment.d.ts.map +1 -0
- package/dist/models/IssueComment.js +78 -0
- package/dist/models/IssueComment.js.map +1 -0
- package/dist/models/IssueCommentEmbedded.d.ts +33 -0
- package/dist/models/IssueCommentEmbedded.d.ts.map +1 -0
- package/dist/models/IssueCommentEmbedded.js +49 -0
- package/dist/models/IssueCommentEmbedded.js.map +1 -0
- package/dist/models/IssueEmbedded.d.ts +39 -0
- package/dist/models/IssueEmbedded.d.ts.map +1 -0
- package/dist/models/IssueEmbedded.js +51 -0
- package/dist/models/IssueEmbedded.js.map +1 -0
- package/dist/models/IssueLabelsResponse.d.ts +34 -0
- package/dist/models/IssueLabelsResponse.d.ts.map +1 -0
- package/dist/models/IssueLabelsResponse.js +54 -0
- package/dist/models/IssueLabelsResponse.js.map +1 -0
- package/dist/models/IssueLink.d.ts +78 -0
- package/dist/models/IssueLink.d.ts.map +1 -0
- package/dist/models/IssueLink.js +66 -0
- package/dist/models/IssueLink.js.map +1 -0
- package/dist/models/IssueLinkLinkType.d.ts +31 -0
- package/dist/models/IssueLinkLinkType.d.ts.map +1 -0
- package/dist/models/IssueLinkLinkType.js +57 -0
- package/dist/models/IssueLinkLinkType.js.map +1 -0
- package/dist/models/IssueLinkedPRsResponse.d.ts +34 -0
- package/dist/models/IssueLinkedPRsResponse.d.ts.map +1 -0
- package/dist/models/IssueLinkedPRsResponse.js +54 -0
- package/dist/models/IssueLinkedPRsResponse.js.map +1 -0
- package/dist/models/IssueStatus.d.ts +52 -0
- package/dist/models/IssueStatus.d.ts.map +1 -0
- package/dist/models/IssueStatus.js +56 -0
- package/dist/models/IssueStatus.js.map +1 -0
- package/dist/models/IssueVisibility.d.ts +26 -0
- package/dist/models/IssueVisibility.d.ts.map +1 -0
- package/dist/models/IssueVisibility.js +52 -0
- package/dist/models/IssueVisibility.js.map +1 -0
- package/dist/models/LabelEmbedded.d.ts +51 -0
- package/dist/models/LabelEmbedded.d.ts.map +1 -0
- package/dist/models/LabelEmbedded.js +55 -0
- package/dist/models/LabelEmbedded.js.map +1 -0
- package/dist/models/Language.d.ts +39 -0
- package/dist/models/Language.d.ts.map +1 -0
- package/dist/models/Language.js +51 -0
- package/dist/models/Language.js.map +1 -0
- package/dist/models/Link.d.ts +40 -0
- package/dist/models/Link.d.ts.map +1 -0
- package/dist/models/Link.js +52 -0
- package/dist/models/Link.js.map +1 -0
- package/dist/models/LinkLinkType.d.ts +28 -0
- package/dist/models/LinkLinkType.d.ts.map +1 -0
- package/dist/models/LinkLinkType.js +54 -0
- package/dist/models/LinkLinkType.js.map +1 -0
- package/dist/models/ListBranchesResponse.d.ts +41 -0
- package/dist/models/ListBranchesResponse.d.ts.map +1 -0
- package/dist/models/ListBranchesResponse.js +56 -0
- package/dist/models/ListBranchesResponse.js.map +1 -0
- package/dist/models/ListIssueCommentsResponse.d.ts +40 -0
- package/dist/models/ListIssueCommentsResponse.d.ts.map +1 -0
- package/dist/models/ListIssueCommentsResponse.js +56 -0
- package/dist/models/ListIssueCommentsResponse.js.map +1 -0
- package/dist/models/ListIssueStatusesResponse.d.ts +40 -0
- package/dist/models/ListIssueStatusesResponse.d.ts.map +1 -0
- package/dist/models/ListIssueStatusesResponse.js +56 -0
- package/dist/models/ListIssueStatusesResponse.js.map +1 -0
- package/dist/models/ListIssuesAssignedToAuthenticatedUserResponse.d.ts +40 -0
- package/dist/models/ListIssuesAssignedToAuthenticatedUserResponse.d.ts.map +1 -0
- package/dist/models/ListIssuesAssignedToAuthenticatedUserResponse.js +52 -0
- package/dist/models/ListIssuesAssignedToAuthenticatedUserResponse.js.map +1 -0
- package/dist/models/ListLabelsForRepositoryResponse.d.ts +40 -0
- package/dist/models/ListLabelsForRepositoryResponse.d.ts.map +1 -0
- package/dist/models/ListLabelsForRepositoryResponse.js +52 -0
- package/dist/models/ListLabelsForRepositoryResponse.js.map +1 -0
- package/dist/models/ListLinksResponse.d.ts +40 -0
- package/dist/models/ListLinksResponse.d.ts.map +1 -0
- package/dist/models/ListLinksResponse.js +56 -0
- package/dist/models/ListLinksResponse.js.map +1 -0
- package/dist/models/ListMilestonesForRepositoryResponse.d.ts +40 -0
- package/dist/models/ListMilestonesForRepositoryResponse.d.ts.map +1 -0
- package/dist/models/ListMilestonesForRepositoryResponse.js +56 -0
- package/dist/models/ListMilestonesForRepositoryResponse.js.map +1 -0
- package/dist/models/ListOrganizationRepositoriesResponse.d.ts +41 -0
- package/dist/models/ListOrganizationRepositoriesResponse.d.ts.map +1 -0
- package/dist/models/ListOrganizationRepositoriesResponse.js +56 -0
- package/dist/models/ListOrganizationRepositoriesResponse.js.map +1 -0
- package/dist/models/ListPullRequestCommentsResponse.d.ts +40 -0
- package/dist/models/ListPullRequestCommentsResponse.d.ts.map +1 -0
- package/dist/models/ListPullRequestCommentsResponse.js +56 -0
- package/dist/models/ListPullRequestCommentsResponse.js.map +1 -0
- package/dist/models/ListRepoRolesResponse.d.ts +41 -0
- package/dist/models/ListRepoRolesResponse.d.ts.map +1 -0
- package/dist/models/ListRepoRolesResponse.js +56 -0
- package/dist/models/ListRepoRolesResponse.js.map +1 -0
- package/dist/models/ListRepositoryIssuesResponse.d.ts +41 -0
- package/dist/models/ListRepositoryIssuesResponse.d.ts.map +1 -0
- package/dist/models/ListRepositoryIssuesResponse.js +52 -0
- package/dist/models/ListRepositoryIssuesResponse.js.map +1 -0
- package/dist/models/ListRepositoryPullRequestsResponse.d.ts +41 -0
- package/dist/models/ListRepositoryPullRequestsResponse.d.ts.map +1 -0
- package/dist/models/ListRepositoryPullRequestsResponse.js +56 -0
- package/dist/models/ListRepositoryPullRequestsResponse.js.map +1 -0
- package/dist/models/ListReviewersResponse.d.ts +41 -0
- package/dist/models/ListReviewersResponse.d.ts.map +1 -0
- package/dist/models/ListReviewersResponse.js +56 -0
- package/dist/models/ListReviewersResponse.js.map +1 -0
- package/dist/models/ListTagsResponse.d.ts +41 -0
- package/dist/models/ListTagsResponse.d.ts.map +1 -0
- package/dist/models/ListTagsResponse.js +52 -0
- package/dist/models/ListTagsResponse.js.map +1 -0
- package/dist/models/ListTreeResponse.d.ts +41 -0
- package/dist/models/ListTreeResponse.d.ts.map +1 -0
- package/dist/models/ListTreeResponse.js +56 -0
- package/dist/models/ListTreeResponse.js.map +1 -0
- package/dist/models/MergeInfo.d.ts +59 -0
- package/dist/models/MergeInfo.d.ts.map +1 -0
- package/dist/models/MergeInfo.js +61 -0
- package/dist/models/MergeInfo.js.map +1 -0
- package/dist/models/MergeParameters.d.ts +45 -0
- package/dist/models/MergeParameters.d.ts.map +1 -0
- package/dist/models/MergeParameters.js +53 -0
- package/dist/models/MergeParameters.js.map +1 -0
- package/dist/models/Milestone.d.ts +95 -0
- package/dist/models/Milestone.d.ts.map +1 -0
- package/dist/models/Milestone.js +71 -0
- package/dist/models/Milestone.js.map +1 -0
- package/dist/models/MilestoneEmbedded.d.ts +39 -0
- package/dist/models/MilestoneEmbedded.d.ts.map +1 -0
- package/dist/models/MilestoneEmbedded.js +51 -0
- package/dist/models/MilestoneEmbedded.js.map +1 -0
- package/dist/models/MilestoneStatus.d.ts +26 -0
- package/dist/models/MilestoneStatus.d.ts.map +1 -0
- package/dist/models/MilestoneStatus.js +52 -0
- package/dist/models/MilestoneStatus.js.map +1 -0
- package/dist/models/ModifyLabelCollectionRequest.d.ts +39 -0
- package/dist/models/ModifyLabelCollectionRequest.d.ts.map +1 -0
- package/dist/models/ModifyLabelCollectionRequest.js +51 -0
- package/dist/models/ModifyLabelCollectionRequest.js.map +1 -0
- package/dist/models/ModifyPullRequestCollectionRequest.d.ts +39 -0
- package/dist/models/ModifyPullRequestCollectionRequest.d.ts.map +1 -0
- package/dist/models/ModifyPullRequestCollectionRequest.js +51 -0
- package/dist/models/ModifyPullRequestCollectionRequest.js.map +1 -0
- package/dist/models/ModifyReactionBody.d.ts +34 -0
- package/dist/models/ModifyReactionBody.d.ts.map +1 -0
- package/dist/models/ModifyReactionBody.js +50 -0
- package/dist/models/ModifyReactionBody.js.map +1 -0
- package/dist/models/OrganizationEmbedded.d.ts +39 -0
- package/dist/models/OrganizationEmbedded.d.ts.map +1 -0
- package/dist/models/OrganizationEmbedded.js +51 -0
- package/dist/models/OrganizationEmbedded.js.map +1 -0
- package/dist/models/PRReviewer.d.ts +53 -0
- package/dist/models/PRReviewer.d.ts.map +1 -0
- package/dist/models/PRReviewer.js +59 -0
- package/dist/models/PRReviewer.js.map +1 -0
- package/dist/models/Priority.d.ts +29 -0
- package/dist/models/Priority.d.ts.map +1 -0
- package/dist/models/Priority.js +55 -0
- package/dist/models/Priority.js.map +1 -0
- package/dist/models/PullRequest.d.ts +109 -0
- package/dist/models/PullRequest.d.ts.map +1 -0
- package/dist/models/PullRequest.js +77 -0
- package/dist/models/PullRequest.js.map +1 -0
- package/dist/models/PullRequestComment.d.ts +129 -0
- package/dist/models/PullRequestComment.d.ts.map +1 -0
- package/dist/models/PullRequestComment.js +88 -0
- package/dist/models/PullRequestComment.js.map +1 -0
- package/dist/models/PullRequestCommentType.d.ts +26 -0
- package/dist/models/PullRequestCommentType.d.ts.map +1 -0
- package/dist/models/PullRequestCommentType.js +52 -0
- package/dist/models/PullRequestCommentType.js.map +1 -0
- package/dist/models/PullRequestEmbedded.d.ts +39 -0
- package/dist/models/PullRequestEmbedded.d.ts.map +1 -0
- package/dist/models/PullRequestEmbedded.js +51 -0
- package/dist/models/PullRequestEmbedded.js.map +1 -0
- package/dist/models/PullRequestStatus.d.ts +29 -0
- package/dist/models/PullRequestStatus.d.ts.map +1 -0
- package/dist/models/PullRequestStatus.js +55 -0
- package/dist/models/PullRequestStatus.js.map +1 -0
- package/dist/models/Reaction.d.ts +50 -0
- package/dist/models/Reaction.d.ts.map +1 -0
- package/dist/models/Reaction.js +76 -0
- package/dist/models/Reaction.js.map +1 -0
- package/dist/models/ReactionCount.d.ts +39 -0
- package/dist/models/ReactionCount.d.ts.map +1 -0
- package/dist/models/ReactionCount.js +51 -0
- package/dist/models/ReactionCount.js.map +1 -0
- package/dist/models/Reactions.d.ts +36 -0
- package/dist/models/Reactions.d.ts.map +1 -0
- package/dist/models/Reactions.js +55 -0
- package/dist/models/Reactions.js.map +1 -0
- package/dist/models/RemoveRepoRolesBody.d.ts +34 -0
- package/dist/models/RemoveRepoRolesBody.d.ts.map +1 -0
- package/dist/models/RemoveRepoRolesBody.js +54 -0
- package/dist/models/RemoveRepoRolesBody.js.map +1 -0
- package/dist/models/RemoveRepoRolesResponse.d.ts +41 -0
- package/dist/models/RemoveRepoRolesResponse.d.ts.map +1 -0
- package/dist/models/RemoveRepoRolesResponse.js +56 -0
- package/dist/models/RemoveRepoRolesResponse.js.map +1 -0
- package/dist/models/RepoRole.d.ts +29 -0
- package/dist/models/RepoRole.d.ts.map +1 -0
- package/dist/models/RepoRole.js +55 -0
- package/dist/models/RepoRole.js.map +1 -0
- package/dist/models/RepoTemplate.d.ts +27 -0
- package/dist/models/RepoTemplate.d.ts.map +1 -0
- package/dist/models/RepoTemplate.js +53 -0
- package/dist/models/RepoTemplate.js.map +1 -0
- package/dist/models/Repository.d.ts +132 -0
- package/dist/models/Repository.d.ts.map +1 -0
- package/dist/models/Repository.js +94 -0
- package/dist/models/Repository.js.map +1 -0
- package/dist/models/RepositoryCounters.d.ts +57 -0
- package/dist/models/RepositoryCounters.d.ts.map +1 -0
- package/dist/models/RepositoryCounters.js +57 -0
- package/dist/models/RepositoryCounters.js.map +1 -0
- package/dist/models/RepositoryEmbedded.d.ts +39 -0
- package/dist/models/RepositoryEmbedded.d.ts.map +1 -0
- package/dist/models/RepositoryEmbedded.js +51 -0
- package/dist/models/RepositoryEmbedded.js.map +1 -0
- package/dist/models/RepositoryVisibility.d.ts +27 -0
- package/dist/models/RepositoryVisibility.d.ts.map +1 -0
- package/dist/models/RepositoryVisibility.js +53 -0
- package/dist/models/RepositoryVisibility.js.map +1 -0
- package/dist/models/ReviewDecision.d.ts +28 -0
- package/dist/models/ReviewDecision.d.ts.map +1 -0
- package/dist/models/ReviewDecision.js +54 -0
- package/dist/models/ReviewDecision.js.map +1 -0
- package/dist/models/Role.d.ts +27 -0
- package/dist/models/Role.d.ts.map +1 -0
- package/dist/models/Role.js +53 -0
- package/dist/models/Role.js.map +1 -0
- package/dist/models/RunCIBody.d.ts +46 -0
- package/dist/models/RunCIBody.d.ts.map +1 -0
- package/dist/models/RunCIBody.js +54 -0
- package/dist/models/RunCIBody.js.map +1 -0
- package/dist/models/RunCIWorkflowResponse.d.ts +40 -0
- package/dist/models/RunCIWorkflowResponse.d.ts.map +1 -0
- package/dist/models/RunCIWorkflowResponse.js +54 -0
- package/dist/models/RunCIWorkflowResponse.js.map +1 -0
- package/dist/models/SetDecisionBody.d.ts +34 -0
- package/dist/models/SetDecisionBody.d.ts.map +1 -0
- package/dist/models/SetDecisionBody.js +52 -0
- package/dist/models/SetDecisionBody.js.map +1 -0
- package/dist/models/SetDecisionResponse.d.ts +40 -0
- package/dist/models/SetDecisionResponse.d.ts.map +1 -0
- package/dist/models/SetDecisionResponse.js +54 -0
- package/dist/models/SetDecisionResponse.js.map +1 -0
- package/dist/models/ShortAnchor.d.ts +40 -0
- package/dist/models/ShortAnchor.d.ts.map +1 -0
- package/dist/models/ShortAnchor.js +52 -0
- package/dist/models/ShortAnchor.js.map +1 -0
- package/dist/models/Side.d.ts +26 -0
- package/dist/models/Side.d.ts.map +1 -0
- package/dist/models/Side.js +52 -0
- package/dist/models/Side.js.map +1 -0
- package/dist/models/StatusType.d.ts +29 -0
- package/dist/models/StatusType.d.ts.map +1 -0
- package/dist/models/StatusType.js +55 -0
- package/dist/models/StatusType.js.map +1 -0
- package/dist/models/Subject.d.ts +40 -0
- package/dist/models/Subject.d.ts.map +1 -0
- package/dist/models/Subject.js +52 -0
- package/dist/models/Subject.js.map +1 -0
- package/dist/models/SubjectRole.d.ts +41 -0
- package/dist/models/SubjectRole.d.ts.map +1 -0
- package/dist/models/SubjectRole.js +53 -0
- package/dist/models/SubjectRole.js.map +1 -0
- package/dist/models/SubjectType.d.ts +25 -0
- package/dist/models/SubjectType.d.ts.map +1 -0
- package/dist/models/SubjectType.js +51 -0
- package/dist/models/SubjectType.js.map +1 -0
- package/dist/models/TemplatingOptions.d.ts +33 -0
- package/dist/models/TemplatingOptions.d.ts.map +1 -0
- package/dist/models/TemplatingOptions.js +49 -0
- package/dist/models/TemplatingOptions.js.map +1 -0
- package/dist/models/TreeEntry.d.ts +46 -0
- package/dist/models/TreeEntry.d.ts.map +1 -0
- package/dist/models/TreeEntry.js +54 -0
- package/dist/models/TreeEntry.js.map +1 -0
- package/dist/models/TreeEntryType.d.ts +29 -0
- package/dist/models/TreeEntryType.d.ts.map +1 -0
- package/dist/models/TreeEntryType.js +55 -0
- package/dist/models/TreeEntryType.js.map +1 -0
- package/dist/models/TriggerStatus.d.ts +27 -0
- package/dist/models/TriggerStatus.d.ts.map +1 -0
- package/dist/models/TriggerStatus.js +53 -0
- package/dist/models/TriggerStatus.js.map +1 -0
- package/dist/models/UpdateIssueBody.d.ts +77 -0
- package/dist/models/UpdateIssueBody.d.ts.map +1 -0
- package/dist/models/UpdateIssueBody.js +65 -0
- package/dist/models/UpdateIssueBody.js.map +1 -0
- package/dist/models/UpdateIssueCommentBody.d.ts +33 -0
- package/dist/models/UpdateIssueCommentBody.d.ts.map +1 -0
- package/dist/models/UpdateIssueCommentBody.js +49 -0
- package/dist/models/UpdateIssueCommentBody.js.map +1 -0
- package/dist/models/UpdateLabelBody.d.ts +45 -0
- package/dist/models/UpdateLabelBody.d.ts.map +1 -0
- package/dist/models/UpdateLabelBody.js +53 -0
- package/dist/models/UpdateLabelBody.js.map +1 -0
- package/dist/models/UpdateMilestoneBody.d.ts +64 -0
- package/dist/models/UpdateMilestoneBody.d.ts.map +1 -0
- package/dist/models/UpdateMilestoneBody.js +60 -0
- package/dist/models/UpdateMilestoneBody.js.map +1 -0
- package/dist/models/UpdatePullRequestBody.d.ts +39 -0
- package/dist/models/UpdatePullRequestBody.d.ts.map +1 -0
- package/dist/models/UpdatePullRequestBody.js +51 -0
- package/dist/models/UpdatePullRequestBody.js.map +1 -0
- package/dist/models/UpdateRepositoryBody.d.ts +60 -0
- package/dist/models/UpdateRepositoryBody.d.ts.map +1 -0
- package/dist/models/UpdateRepositoryBody.js +62 -0
- package/dist/models/UpdateRepositoryBody.js.map +1 -0
- package/dist/models/UpdateReviewersBody.d.ts +40 -0
- package/dist/models/UpdateReviewersBody.d.ts.map +1 -0
- package/dist/models/UpdateReviewersBody.js +56 -0
- package/dist/models/UpdateReviewersBody.js.map +1 -0
- package/dist/models/UpdateReviewersResponse.d.ts +34 -0
- package/dist/models/UpdateReviewersResponse.d.ts.map +1 -0
- package/dist/models/UpdateReviewersResponse.js +54 -0
- package/dist/models/UpdateReviewersResponse.js.map +1 -0
- package/dist/models/UserEmbedded.d.ts +39 -0
- package/dist/models/UserEmbedded.d.ts.map +1 -0
- package/dist/models/UserEmbedded.js +51 -0
- package/dist/models/UserEmbedded.js.map +1 -0
- package/dist/models/V1Label.d.ts +76 -0
- package/dist/models/V1Label.d.ts.map +1 -0
- package/dist/models/V1Label.js +64 -0
- package/dist/models/V1Label.js.map +1 -0
- package/dist/models/V1ReviewerDelta.d.ts +40 -0
- package/dist/models/V1ReviewerDelta.d.ts.map +1 -0
- package/dist/models/V1ReviewerDelta.js +52 -0
- package/dist/models/V1ReviewerDelta.js.map +1 -0
- package/dist/models/V1Tag.d.ts +52 -0
- package/dist/models/V1Tag.d.ts.map +1 -0
- package/dist/models/V1Tag.js +56 -0
- package/dist/models/V1Tag.js.map +1 -0
- package/dist/models/WorkflowInput.d.ts +34 -0
- package/dist/models/WorkflowInput.d.ts.map +1 -0
- package/dist/models/WorkflowInput.js +54 -0
- package/dist/models/WorkflowInput.js.map +1 -0
- package/dist/models/index.d.ts +116 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +134 -0
- package/dist/models/index.js.map +1 -0
- package/dist/runtime.d.ts +179 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +325 -0
- package/dist/runtime.js.map +1 -0
- package/package.json +56 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2025 Nikolay Matrosov
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
# SourceCraft SDK
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@nikolaymatrosov/sourcecraft-sdk)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
A TypeScript/JavaScript SDK for interacting with the SourceCraft API - a platform for managing source code repositories, issues, pull requests, and CI/CD operations.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- **Type-Safe**: Full TypeScript support with comprehensive type definitions
|
|
11
|
+
- **Auto-Generated**: Built from OpenAPI specifications for accuracy and consistency
|
|
12
|
+
- **Zero Dependencies**: Uses native fetch API, no external runtime dependencies
|
|
13
|
+
- **Comprehensive API Coverage**: 19 API classes covering all SourceCraft operations
|
|
14
|
+
- **Modern**: Supports Node.js 20.x and 24.x
|
|
15
|
+
- **Well Documented**: Includes detailed examples and inline documentation
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @nikolaymatrosov/sourcecraft-sdk
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { Configuration, RepositoryApi } from '@nikolaymatrosov/sourcecraft-sdk';
|
|
27
|
+
|
|
28
|
+
// Configure the SDK
|
|
29
|
+
const config = new Configuration({
|
|
30
|
+
basePath: 'https://api.sourcecraft.tech',
|
|
31
|
+
accessToken: process.env.SOURCECRAFT_TOKEN,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Create API client
|
|
35
|
+
const repositoryApi = new RepositoryApi(config);
|
|
36
|
+
|
|
37
|
+
// List repositories
|
|
38
|
+
const repos = await repositoryApi.listRepositories({
|
|
39
|
+
pageSize: 10,
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
console.log(repos);
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Authentication
|
|
46
|
+
|
|
47
|
+
SourceCraft SDK requires an access token for authentication. You can provide it in several ways:
|
|
48
|
+
|
|
49
|
+
### Environment Variable (Recommended)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
export SOURCECRAFT_TOKEN="your-token-here"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
const config = new Configuration({
|
|
57
|
+
basePath: 'https://api.sourcecraft.tech',
|
|
58
|
+
accessToken: process.env.SOURCECRAFT_TOKEN,
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Direct Configuration
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
const config = new Configuration({
|
|
66
|
+
basePath: 'https://api.sourcecraft.tech',
|
|
67
|
+
accessToken: 'your-token-here',
|
|
68
|
+
});
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Async Token Provider (for token refresh)
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
const config = new Configuration({
|
|
75
|
+
basePath: 'https://api.sourcecraft.tech',
|
|
76
|
+
accessToken: async () => {
|
|
77
|
+
// Fetch or refresh token
|
|
78
|
+
return await getTokenFromSomewhere();
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## API Coverage
|
|
84
|
+
|
|
85
|
+
The SDK provides comprehensive coverage of SourceCraft APIs:
|
|
86
|
+
|
|
87
|
+
### Repository Management
|
|
88
|
+
|
|
89
|
+
- `RepositoryApi` - Create, read, update, delete repositories
|
|
90
|
+
- `RepositoryLabelsApi` - Manage repository labels
|
|
91
|
+
- `RepositoryMilestonesApi` - Manage milestones
|
|
92
|
+
- `RepositoryPullRequestApi` - Pull request operations
|
|
93
|
+
- `RepositoryPullRequestCommentsApi` - PR comments
|
|
94
|
+
- `RepositoryPullRequestReviewersApi` - PR reviewers
|
|
95
|
+
|
|
96
|
+
### Issues Management
|
|
97
|
+
|
|
98
|
+
- `IssuesApi` - Issue lifecycle management
|
|
99
|
+
- `IssuesCommentsApi` - Issue comments
|
|
100
|
+
- `IssuesLabelsApi` - Issue labels
|
|
101
|
+
- `IssuesAttachmentsApi` - File attachments
|
|
102
|
+
- `IssuesCommentsReactionsApi` - Emoji reactions
|
|
103
|
+
- `IssuesLinkedIssuesApi` - Link issues together
|
|
104
|
+
- `IssuesLinkedPRsApi` - Link issues to pull requests
|
|
105
|
+
- `IssuesStatusesApi` - Issue status management
|
|
106
|
+
|
|
107
|
+
### Organization & Access
|
|
108
|
+
|
|
109
|
+
- `OrganizationApi` - Organization management
|
|
110
|
+
- `RolesApi` - Role-based access control
|
|
111
|
+
|
|
112
|
+
### CI/CD
|
|
113
|
+
|
|
114
|
+
- `CIApi` - CI/CD pipeline operations
|
|
115
|
+
|
|
116
|
+
### User Operations
|
|
117
|
+
|
|
118
|
+
- `UserPullRequestApi` - User-specific PR operations
|
|
119
|
+
|
|
120
|
+
## Usage Examples
|
|
121
|
+
|
|
122
|
+
### Creating a Repository
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
import { Configuration, RepositoryApi } from '@nikolaymatrosov/sourcecraft-sdk';
|
|
126
|
+
|
|
127
|
+
const config = new Configuration({
|
|
128
|
+
basePath: 'https://api.sourcecraft.tech',
|
|
129
|
+
accessToken: process.env.SOURCECRAFT_TOKEN,
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
const repoApi = new RepositoryApi(config);
|
|
133
|
+
|
|
134
|
+
const newRepo = await repoApi.createRepository({
|
|
135
|
+
createRepositoryRequest: {
|
|
136
|
+
name: 'my-new-repo',
|
|
137
|
+
description: 'A new repository',
|
|
138
|
+
visibility: 'public',
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
console.log(`Created repository: ${newRepo.name}`);
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Managing Issues
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
import { Configuration, IssuesApi } from '@nikolaymatrosov/sourcecraft-sdk';
|
|
149
|
+
|
|
150
|
+
const config = new Configuration({
|
|
151
|
+
basePath: 'https://api.sourcecraft.tech',
|
|
152
|
+
accessToken: process.env.SOURCECRAFT_TOKEN,
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
const issuesApi = new IssuesApi(config);
|
|
156
|
+
|
|
157
|
+
// Create an issue
|
|
158
|
+
const issue = await issuesApi.createIssue({
|
|
159
|
+
owner: 'myorg',
|
|
160
|
+
repo: 'my-repo',
|
|
161
|
+
createIssueRequest: {
|
|
162
|
+
title: 'Bug: Login not working',
|
|
163
|
+
body: 'Users cannot log in with valid credentials',
|
|
164
|
+
labels: ['bug', 'high-priority'],
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
console.log(`Created issue #${issue.number}`);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Working with Pull Requests
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
import { Configuration, RepositoryPullRequestApi } from '@nikolaymatrosov/sourcecraft-sdk';
|
|
175
|
+
|
|
176
|
+
const config = new Configuration({
|
|
177
|
+
basePath: 'https://api.sourcecraft.tech',
|
|
178
|
+
accessToken: process.env.SOURCECRAFT_TOKEN,
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
const prApi = new RepositoryPullRequestApi(config);
|
|
182
|
+
|
|
183
|
+
// Create a pull request
|
|
184
|
+
const pr = await prApi.createPullRequest({
|
|
185
|
+
owner: 'myorg',
|
|
186
|
+
repo: 'my-repo',
|
|
187
|
+
createPullRequestRequest: {
|
|
188
|
+
title: 'Add new feature',
|
|
189
|
+
head: 'feature-branch',
|
|
190
|
+
base: 'main',
|
|
191
|
+
body: 'This PR adds a new feature',
|
|
192
|
+
},
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
console.log(`Created PR #${pr.number}`);
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Error Handling
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
try {
|
|
202
|
+
const repo = await repoApi.getRepository({
|
|
203
|
+
owner: 'myorg',
|
|
204
|
+
repo: 'my-repo',
|
|
205
|
+
});
|
|
206
|
+
console.log(repo);
|
|
207
|
+
} catch (error) {
|
|
208
|
+
console.error('Error fetching repository:', error);
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Examples Directory
|
|
213
|
+
|
|
214
|
+
The [examples](examples/) directory contains comprehensive usage examples:
|
|
215
|
+
|
|
216
|
+
1. **[01-basic-setup.ts](examples/01-basic-setup.ts)** - Configuration patterns and authentication
|
|
217
|
+
2. **[02-repository-operations.ts](examples/02-repository-operations.ts)** - Repository CRUD, forking, branches, tags
|
|
218
|
+
3. **[03-issues-management.ts](examples/03-issues-management.ts)** - Issues, comments, labels, reactions, attachments
|
|
219
|
+
4. **[04-pull-requests.ts](examples/04-pull-requests.ts)** - PR creation, reviewers, merging, comments
|
|
220
|
+
|
|
221
|
+
### Running Examples
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# Set up environment
|
|
225
|
+
cp examples/.env.example examples/.env
|
|
226
|
+
# Edit examples/.env and add your SOURCECRAFT_TOKEN
|
|
227
|
+
|
|
228
|
+
# Method 1: Build and run
|
|
229
|
+
npm run build:examples
|
|
230
|
+
node examples/dist/01-basic-setup.js
|
|
231
|
+
|
|
232
|
+
# Method 2: Direct TypeScript execution
|
|
233
|
+
npx ts-node -P examples/tsconfig.json examples/01-basic-setup.ts
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Development
|
|
237
|
+
|
|
238
|
+
### Build Commands
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
# Install dependencies
|
|
242
|
+
npm install
|
|
243
|
+
|
|
244
|
+
# Full build (prepare spec, generate SDK, format, compile)
|
|
245
|
+
npm run build
|
|
246
|
+
|
|
247
|
+
# TypeScript compilation only
|
|
248
|
+
npm run build:ts
|
|
249
|
+
|
|
250
|
+
# Watch mode for development
|
|
251
|
+
npm run build:watch
|
|
252
|
+
|
|
253
|
+
# Build examples
|
|
254
|
+
npm run build:examples
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Code Quality
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Run linter
|
|
261
|
+
npm run lint
|
|
262
|
+
|
|
263
|
+
# Fix linting issues
|
|
264
|
+
npm run lint:fix
|
|
265
|
+
|
|
266
|
+
# Format code
|
|
267
|
+
npm run format
|
|
268
|
+
|
|
269
|
+
# Check formatting
|
|
270
|
+
npm run format:check
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### SDK Generation
|
|
274
|
+
|
|
275
|
+
The SDK is auto-generated from OpenAPI specifications. To regenerate:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# Convert Swagger 2.0 to OpenAPI 3.0 and fix issues
|
|
279
|
+
npm run prepare-spec
|
|
280
|
+
|
|
281
|
+
# Generate SDK from OpenAPI spec
|
|
282
|
+
npm run generate-sdk
|
|
283
|
+
|
|
284
|
+
# Full build
|
|
285
|
+
npm run build
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Project Structure
|
|
289
|
+
|
|
290
|
+
```
|
|
291
|
+
sourcecraft-sdk/
|
|
292
|
+
├── src/ # Auto-generated SDK source (don't edit manually)
|
|
293
|
+
│ ├── apis/ # 19 API classes
|
|
294
|
+
│ ├── models/ # TypeScript models
|
|
295
|
+
│ └── runtime.ts # Base runtime/configuration
|
|
296
|
+
├── examples/ # Usage examples
|
|
297
|
+
│ ├── 01-basic-setup.ts
|
|
298
|
+
│ ├── 02-repository-operations.ts
|
|
299
|
+
│ ├── 03-issues-management.ts
|
|
300
|
+
│ ├── 04-pull-requests.ts
|
|
301
|
+
│ └── .env.example # Environment template
|
|
302
|
+
├── spec/ # OpenAPI specifications
|
|
303
|
+
│ ├── swagger.json # Source Swagger 2.0 spec
|
|
304
|
+
│ └── openapi.yaml # Converted OpenAPI 3.0 spec
|
|
305
|
+
├── scripts/ # Build scripts
|
|
306
|
+
├── dist/ # Compiled output
|
|
307
|
+
└── .github/workflows/ # CI/CD pipelines
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## SDK Generation Process
|
|
311
|
+
|
|
312
|
+
This SDK is automatically generated from OpenAPI specifications:
|
|
313
|
+
|
|
314
|
+
1. **Source**: Swagger 2.0 specification in `spec/swagger.json`
|
|
315
|
+
2. **Conversion**: Converted to OpenAPI 3.0 format
|
|
316
|
+
3. **Fixing**: Automated fixes applied via `scripts/fix-openapi.js`
|
|
317
|
+
4. **Generation**: SDK generated using `openapi-generator-cli` with TypeScript-Fetch template
|
|
318
|
+
5. **Formatting**: Code formatted with Prettier and ESLint
|
|
319
|
+
|
|
320
|
+
**Important**: Do not edit files in `src/` directory manually. Regenerate the SDK using `npm run build` instead.
|
|
321
|
+
|
|
322
|
+
## CI/CD
|
|
323
|
+
|
|
324
|
+
This project uses GitHub Actions for continuous integration and deployment:
|
|
325
|
+
|
|
326
|
+
- **CI Workflow**: Runs on PRs and pushes to main
|
|
327
|
+
- Tests on Node 20.x and 24.x
|
|
328
|
+
- Runs linter and format checks
|
|
329
|
+
- Builds SDK and examples
|
|
330
|
+
|
|
331
|
+
- **Publish Workflow**: Runs on GitHub releases
|
|
332
|
+
- Publishes to npm with provenance
|
|
333
|
+
|
|
334
|
+
## Contributing
|
|
335
|
+
|
|
336
|
+
1. Fork the repository
|
|
337
|
+
2. Create a feature branch
|
|
338
|
+
3. Make your changes
|
|
339
|
+
4. Run tests: `npm run lint && npm run build`
|
|
340
|
+
5. Submit a pull request
|
|
341
|
+
|
|
342
|
+
## Requirements
|
|
343
|
+
|
|
344
|
+
- Node.js 20.x or 24.x (see [.nvmrc](.nvmrc))
|
|
345
|
+
- npm or yarn
|
|
346
|
+
|
|
347
|
+
## License
|
|
348
|
+
|
|
349
|
+
MIT License - see [LICENSE](LICENSE) file for details
|
|
350
|
+
|
|
351
|
+
## Author
|
|
352
|
+
|
|
353
|
+
**Nikolay Matrosov**
|
|
354
|
+
|
|
355
|
+
- Email: <nikolay.matrosov@gmail.com>
|
|
356
|
+
- Package: [@nikolaymatrosov/sourcecraft-sdk](https://www.npmjs.com/package/@nikolaymatrosov/sourcecraft-sdk)
|
|
357
|
+
|
|
358
|
+
## Links
|
|
359
|
+
|
|
360
|
+
- [SourceCraft API Documentation](https://api.sourcecraft.tech)
|
|
361
|
+
- [API Contact](mailto:info@sourcecraft.dev)
|
|
362
|
+
- [npm Package](https://www.npmjs.com/package/@nikolaymatrosov/sourcecraft-sdk)
|
|
363
|
+
|
|
364
|
+
## Support
|
|
365
|
+
|
|
366
|
+
For issues and questions:
|
|
367
|
+
|
|
368
|
+
- Open an issue on GitHub
|
|
369
|
+
- Contact: <info@sourcecraft.dev>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SourceCraft API
|
|
3
|
+
* Bleeding edge of Public REST API of SourceCraft
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
* Contact: info@sourcecraft.dev
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from "../runtime";
|
|
13
|
+
import type { RunCIBody } from "../models/index";
|
|
14
|
+
export interface RunWorkflowRequest {
|
|
15
|
+
orgSlug: string;
|
|
16
|
+
repoSlug: string;
|
|
17
|
+
workflowName: string;
|
|
18
|
+
runCIBody: RunCIBody;
|
|
19
|
+
}
|
|
20
|
+
export interface RunWorkflowByIDRequest {
|
|
21
|
+
repoId: string;
|
|
22
|
+
workflowName: string;
|
|
23
|
+
runCIBody: RunCIBody;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* CIApi - interface
|
|
27
|
+
*
|
|
28
|
+
* @export
|
|
29
|
+
* @interface CIApiInterface
|
|
30
|
+
*/
|
|
31
|
+
export interface CIApiInterface {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Run Workflow in Repository
|
|
35
|
+
* @param {string} orgSlug
|
|
36
|
+
* @param {string} repoSlug
|
|
37
|
+
* @param {string} workflowName
|
|
38
|
+
* @param {RunCIBody} runCIBody
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
* @memberof CIApiInterface
|
|
42
|
+
*/
|
|
43
|
+
runWorkflowRaw(requestParameters: RunWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
|
|
44
|
+
/**
|
|
45
|
+
* Run Workflow in Repository
|
|
46
|
+
*/
|
|
47
|
+
runWorkflow(requestParameters: RunWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @summary Run Workflow in Repository (By Repo ID)
|
|
51
|
+
* @param {string} repoId
|
|
52
|
+
* @param {string} workflowName
|
|
53
|
+
* @param {RunCIBody} runCIBody
|
|
54
|
+
* @param {*} [options] Override http request option.
|
|
55
|
+
* @throws {RequiredError}
|
|
56
|
+
* @memberof CIApiInterface
|
|
57
|
+
*/
|
|
58
|
+
runWorkflowByIDRaw(requestParameters: RunWorkflowByIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
|
|
59
|
+
/**
|
|
60
|
+
* Run Workflow in Repository (By Repo ID)
|
|
61
|
+
*/
|
|
62
|
+
runWorkflowByID(requestParameters: RunWorkflowByIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
export declare class CIApi extends runtime.BaseAPI implements CIApiInterface {
|
|
68
|
+
/**
|
|
69
|
+
* Run Workflow in Repository
|
|
70
|
+
*/
|
|
71
|
+
runWorkflowRaw(requestParameters: RunWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
|
|
72
|
+
/**
|
|
73
|
+
* Run Workflow in Repository
|
|
74
|
+
*/
|
|
75
|
+
runWorkflow(requestParameters: RunWorkflowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
|
|
76
|
+
/**
|
|
77
|
+
* Run Workflow in Repository (By Repo ID)
|
|
78
|
+
*/
|
|
79
|
+
runWorkflowByIDRaw(requestParameters: RunWorkflowByIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
|
|
80
|
+
/**
|
|
81
|
+
* Run Workflow in Repository (By Repo ID)
|
|
82
|
+
*/
|
|
83
|
+
runWorkflowByID(requestParameters: RunWorkflowByIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=CIApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CIApi.d.ts","sourceRoot":"","sources":["../../src/apis/CIApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAoB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQnE,MAAM,WAAW,kBAAkB;IAC/B,OA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,kBAAkB,EACrC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GAC3D,OAAO,CAAC,GAAG,CAAC;IAKf;;OAEG;IACG,kBAAkB,CACpB,iBAAiB,EAAE,sBAAsB,EACzC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GAC3D,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAiEpC;;OAEG;IACG,eAAe,CACjB,iBAAiB,EAAE,sBAAsB,EACzC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GAC3D,OAAO,CAAC,GAAG,CAAC;CAIlB"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* SourceCraft API
|
|
6
|
+
* Bleeding edge of Public REST API of SourceCraft
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.0.1
|
|
9
|
+
* Contact: info@sourcecraft.dev
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.CIApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class CIApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Run Workflow in Repository
|
|
58
|
+
*/
|
|
59
|
+
async runWorkflowRaw(requestParameters, initOverrides) {
|
|
60
|
+
if (requestParameters["orgSlug"] == null) {
|
|
61
|
+
throw new runtime.RequiredError("orgSlug", 'Required parameter "orgSlug" was null or undefined when calling runWorkflow().');
|
|
62
|
+
}
|
|
63
|
+
if (requestParameters["repoSlug"] == null) {
|
|
64
|
+
throw new runtime.RequiredError("repoSlug", 'Required parameter "repoSlug" was null or undefined when calling runWorkflow().');
|
|
65
|
+
}
|
|
66
|
+
if (requestParameters["workflowName"] == null) {
|
|
67
|
+
throw new runtime.RequiredError("workflowName", 'Required parameter "workflowName" was null or undefined when calling runWorkflow().');
|
|
68
|
+
}
|
|
69
|
+
if (requestParameters["runCIBody"] == null) {
|
|
70
|
+
throw new runtime.RequiredError("runCIBody", 'Required parameter "runCIBody" was null or undefined when calling runWorkflow().');
|
|
71
|
+
}
|
|
72
|
+
const queryParameters = {};
|
|
73
|
+
const headerParameters = {};
|
|
74
|
+
headerParameters["Content-Type"] = "application/json";
|
|
75
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
76
|
+
const token = this.configuration.accessToken;
|
|
77
|
+
const tokenString = await token("bearerAuth", []);
|
|
78
|
+
if (tokenString) {
|
|
79
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
let urlPath = `/{org_slug}/{repo_slug}/ci_workflows/{workflow_name}/trigger`;
|
|
83
|
+
urlPath = urlPath.replace(`{${"org_slug"}}`, encodeURIComponent(String(requestParameters["orgSlug"])));
|
|
84
|
+
urlPath = urlPath.replace(`{${"repo_slug"}}`, encodeURIComponent(String(requestParameters["repoSlug"])));
|
|
85
|
+
urlPath = urlPath.replace(`{${"workflow_name"}}`, encodeURIComponent(String(requestParameters["workflowName"])));
|
|
86
|
+
const response = await this.request({
|
|
87
|
+
path: urlPath,
|
|
88
|
+
method: "POST",
|
|
89
|
+
headers: headerParameters,
|
|
90
|
+
query: queryParameters,
|
|
91
|
+
body: (0, index_1.RunCIBodyToJSON)(requestParameters["runCIBody"]),
|
|
92
|
+
}, initOverrides);
|
|
93
|
+
if (this.isJsonMime(response.headers.get("content-type"))) {
|
|
94
|
+
return new runtime.JSONApiResponse(response);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
return new runtime.TextApiResponse(response);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Run Workflow in Repository
|
|
102
|
+
*/
|
|
103
|
+
async runWorkflow(requestParameters, initOverrides) {
|
|
104
|
+
const response = await this.runWorkflowRaw(requestParameters, initOverrides);
|
|
105
|
+
return await response.value();
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Run Workflow in Repository (By Repo ID)
|
|
109
|
+
*/
|
|
110
|
+
async runWorkflowByIDRaw(requestParameters, initOverrides) {
|
|
111
|
+
if (requestParameters["repoId"] == null) {
|
|
112
|
+
throw new runtime.RequiredError("repoId", 'Required parameter "repoId" was null or undefined when calling runWorkflowByID().');
|
|
113
|
+
}
|
|
114
|
+
if (requestParameters["workflowName"] == null) {
|
|
115
|
+
throw new runtime.RequiredError("workflowName", 'Required parameter "workflowName" was null or undefined when calling runWorkflowByID().');
|
|
116
|
+
}
|
|
117
|
+
if (requestParameters["runCIBody"] == null) {
|
|
118
|
+
throw new runtime.RequiredError("runCIBody", 'Required parameter "runCIBody" was null or undefined when calling runWorkflowByID().');
|
|
119
|
+
}
|
|
120
|
+
const queryParameters = {};
|
|
121
|
+
const headerParameters = {};
|
|
122
|
+
headerParameters["Content-Type"] = "application/json";
|
|
123
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
124
|
+
const token = this.configuration.accessToken;
|
|
125
|
+
const tokenString = await token("bearerAuth", []);
|
|
126
|
+
if (tokenString) {
|
|
127
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
let urlPath = `/repos/id:{repo_id}/ci_workflows/{workflow_name}/trigger`;
|
|
131
|
+
urlPath = urlPath.replace(`{${"repo_id"}}`, encodeURIComponent(String(requestParameters["repoId"])));
|
|
132
|
+
urlPath = urlPath.replace(`{${"workflow_name"}}`, encodeURIComponent(String(requestParameters["workflowName"])));
|
|
133
|
+
const response = await this.request({
|
|
134
|
+
path: urlPath,
|
|
135
|
+
method: "POST",
|
|
136
|
+
headers: headerParameters,
|
|
137
|
+
query: queryParameters,
|
|
138
|
+
body: (0, index_1.RunCIBodyToJSON)(requestParameters["runCIBody"]),
|
|
139
|
+
}, initOverrides);
|
|
140
|
+
if (this.isJsonMime(response.headers.get("content-type"))) {
|
|
141
|
+
return new runtime.JSONApiResponse(response);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
return new runtime.TextApiResponse(response);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Run Workflow in Repository (By Repo ID)
|
|
149
|
+
*/
|
|
150
|
+
async runWorkflowByID(requestParameters, initOverrides) {
|
|
151
|
+
const response = await this.runWorkflowByIDRaw(requestParameters, initOverrides);
|
|
152
|
+
return await response.value();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
exports.CIApi = CIApi;
|
|
156
|
+
//# sourceMappingURL=CIApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CIApi.js","sourceRoot":"","sources":["../../src/apis/CIApi.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,2CAKyB;AAsEzB;;GAEG;AACH,MAAa,KAAM,SAAQ,OAAO,CAAC,OAAO;IACtC;;OAEG;IACH,KAAK,CAAC,cAAc,CAChB,iBAAqC,EACrC,aAA0D;QAE1D,IAAI,iBAAiB,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC;YACvC,MAAM,IAAI,OAAO,CAAC,aAAa,CAC3B,SAAS,EACT,gFAAgF,CACnF,CAAC;QACN,CAAC;QAED,IAAI,iBAAiB,CAAC,UAAU,CAAC,IAAI,IAAI,EAAE,CAAC;YACxC,MAAM,IAAI,OAAO,CAAC,aAAa,CAC3B,UAAU,EACV,iFAAiF,CACpF,CAAC;QACN,CAAC;QAED,IAAI,iBAAiB,CAAC,cAAc,CAAC,IAAI,IAAI,EAAE,CAAC;YAC5C,MAAM,IAAI,OAAO,CAAC,aAAa,CAC3B,cA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