Skip to content

Commit

Permalink
Merge pull request #1887 from ResearchHub/publish
Browse files Browse the repository at this point in the history
Checkout integration w/Stripe
  • Loading branch information
yattias authored Nov 20, 2024
2 parents 2267936 + b77fdb2 commit d721e06
Show file tree
Hide file tree
Showing 18 changed files with 1,610 additions and 153 deletions.
14 changes: 14 additions & 0 deletions components/Document/api/createPaperAPI.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import { ID } from "~/config/types/root_types";
import API from "~/config/api";

type DeclarationType =
| "ACCEPT_TERMS_AND_CONDITIONS"
| "AUTHORIZE_CC_BY_4_0"
| "CONFIRM_AUTHORS_RIGHTS"
| "CONFIRM_ORIGINALITY_AND_COMPLIANCE";

interface Declaration {
declaration_type: DeclarationType;
accepted: boolean;
}

export interface createPaperProps {
title: string;
abstract: string;
Expand All @@ -14,6 +25,7 @@ export interface createPaperProps {
pdfUrl: string;
previousPaperId?: ID;
changeDescription: string;
declarations?: Declaration[];
}

export const createPaperAPI = ({
Expand All @@ -24,6 +36,7 @@ export const createPaperAPI = ({
pdfUrl,
previousPaperId,
changeDescription,
declarations,
}: createPaperProps): Promise<any> => {
const url = `${API.BASE_URL}paper/create_researchhub_paper/`;

Expand All @@ -37,6 +50,7 @@ export const createPaperAPI = ({
pdf_url: pdfUrl,
previous_paper_id: previousPaperId,
change_description: changeDescription,
...(declarations ? { declarations } : {}),
})
)
.then((response) => {
Expand Down
54 changes: 0 additions & 54 deletions components/Document/lib/PaperVersion/PaperVersionIntroStep.tsx

This file was deleted.

Loading

0 comments on commit d721e06

Please sign in to comment.