diff --git a/.env.example b/.env.example
new file mode 100644
index 0000000..cea9a39
--- /dev/null
+++ b/.env.example
@@ -0,0 +1 @@
+REACT_APP_API_URL=http://localhost:8000
\ No newline at end of file
diff --git a/README.md b/README.md
index 897dc83..1bbb36e 100644
--- a/README.md
+++ b/README.md
@@ -1,44 +1,3 @@
-This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
+# Gitcom frontend
-## Available Scripts
-
-In the project directory, you can run:
-
-### `npm start`
-
-Runs the app in the development mode.
-Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
-
-The page will reload if you make edits.
-You will also see any lint errors in the console.
-
-### `npm test`
-
-Launches the test runner in the interactive watch mode.
-See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
-
-### `npm run build`
-
-Builds the app for production to the `build` folder.
-It correctly bundles React in production mode and optimizes the build for the best performance.
-
-The build is minified and the filenames include the hashes.
-Your app is ready to be deployed!
-
-See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
-
-### `npm run eject`
-
-**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
-
-If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
-
-Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
-
-You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
-
-## Learn More
-
-You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
-
-To learn React, check out the [React documentation](https://reactjs.org/).
+ This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License .
diff --git a/package.json b/package.json
index ee26183..bca5afe 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "gitcom-front",
- "version": "0.9.0",
+ "version": "0.10.0",
"private": true,
"dependencies": {
"@azure/ms-rest-js": "^2.0.1",
diff --git a/public/index.html b/public/index.html
index 358777d..c0c268c 100644
--- a/public/index.html
+++ b/public/index.html
@@ -4,6 +4,8 @@
+
+
diff --git a/public/robots.txt b/public/robots.txt
index 14267e9..2c294ec 100644
--- a/public/robots.txt
+++ b/public/robots.txt
@@ -1,2 +1,3 @@
User-agent: *
-Allow: /
\ No newline at end of file
+Allow: /
+SITEMAP: https://gitcom.org/sitemap.xml
\ No newline at end of file
diff --git a/public/sitemap.xml b/public/sitemap.xml
new file mode 100644
index 0000000..b177238
--- /dev/null
+++ b/public/sitemap.xml
@@ -0,0 +1,20 @@
+
+
+
+
+ https://gitcom.org/
+ 2019-12-02T01:47:20+00:00
+ 1.00
+
+
+ https://gitcom.org/login
+ 2019-12-02T01:47:20+00:00
+ 0.80
+
+
+
+
\ No newline at end of file
diff --git a/src/Routes.tsx b/src/Routes.tsx
index 7c91028..e01b322 100644
--- a/src/Routes.tsx
+++ b/src/Routes.tsx
@@ -11,11 +11,18 @@ import LoginWithGitLabLayout from "./layouts/auth/external/gitlab/logInWith/Logi
import LoginWithGitHubLayout from "./layouts/auth/external/github/loginWith/LoginWithGitHubLayout";
import ExternalRepoLayout from "./layouts/repos/external/default/ExternalRepoLayout";
import ProjectImportLayout from "./layouts/import/project/ProjectImportLayout";
-import ProjectPage from "./layouts/entity/project/page/ProjectPage";
+import ProjectPage from "./layouts/entity/project/view/ProjectPage";
import BoardPage from "./layouts/entity/board/page/BoardPage";
import SubscriptionLayout from "./layouts/account/subscription/SubscriptionLayout";
import LibraryLayout from "./layouts/account/library/LibraryLayout";
import EditProjectLayout from "./layouts/entity/project/edit/EditProjectLayout";
+import ProjectPricingLayout from "./layouts/entity/project/pricing/view/ProjectPricingLayout";
+import RegisterLayout from "./layouts/auth/register/RegisterLayout";
+import ConfirmEmailLayout from "./layouts/auth/confirmEmail/ConfirmEmailLayout";
+import NotFoundLayout from "./layouts/404/NotFoundLayout";
+import HelpLayout from "./layouts/help/HelpLayout";
+import EditProjectPricingLayout from "./layouts/entity/project/pricing/edit/EditProjectPricingLayout";
+import WithdrawalsLayout from "./layouts/account/withdrawals/WithdrawalsLayout";
class Routes extends React.Component {
render() {
@@ -23,7 +30,16 @@ class Routes extends React.Component {
+
+ {/* Auth */}
+
+
+
+
+
+ {/* Home */}
+
@@ -31,6 +47,7 @@ class Routes extends React.Component {
+
@@ -49,7 +66,12 @@ class Routes extends React.Component {
+
+
+
+
+
);
diff --git a/src/app.css b/src/app.css
index 6cba1c1..75d96b9 100644
--- a/src/app.css
+++ b/src/app.css
@@ -126,6 +126,10 @@ p, b {
cursor: pointer;
}
+.select-padding > div {
+ padding: 0 25px;
+}
+
@media only screen and (min-width: 767px) {
.desktop-zero-height {
height: 0;
diff --git a/src/classes/dataStore/app.tsx b/src/classes/dataStore/app.tsx
index a63732a..cc9e82a 100644
--- a/src/classes/dataStore/app.tsx
+++ b/src/classes/dataStore/app.tsx
@@ -10,7 +10,7 @@ class App {
authorizedUser: UserModel|null = null;
constructor(props: any) {
- this.apiClient = new SupportHubApi({
+ this.apiClient = new SupportHubApi('Card', {
baseUri: window.AppConfig.api_url
});
diff --git a/src/classes/notification/errorHandler/errorHandler.ts b/src/classes/notification/errorHandler/errorHandler.ts
index e93382c..eda00c4 100644
--- a/src/classes/notification/errorHandler/errorHandler.ts
+++ b/src/classes/notification/errorHandler/errorHandler.ts
@@ -1,15 +1,23 @@
import {notification} from "antd";
export function handleApiError(response: any): void {
- // TODO: only in dev mode
- console.error('RAW error response:');
- console.error(response);
+ if (process.env.NODE_ENV === "development") {
+ console.error('RAW error response:');
+ console.error(response);
+ }
if (!response) {
showUnknownError();
return;
}
let json: any;
try {
+ if (response.status === 401) {
+ notification['error']({
+ message: 'Unauthorized, please log in again',
+ description: ''
+ });
+ return;
+ }
if (response.status === 404) {
notification['error']({
message: 'Not found',
@@ -17,7 +25,21 @@ export function handleApiError(response: any): void {
});
return;
}
- json = JSON.parse(response);
+ json = JSON.parse(response.body);
+ if (response.status === 403) {
+ notification['error']({
+ message: 'Not allowed',
+ description: json.errors[0].message
+ });
+ return;
+ }
+ if (response.status === 422) {
+ notification['error']({
+ message: 'Submitted form is invalid, please try again',
+ description: json.errors[0].message
+ });
+ return;
+ }
} catch (e) {
showUnknownError(e);
return;
@@ -32,7 +54,6 @@ export function handleApiError(response: any): void {
export function showUnknownError(err: any = null) {
if (err) {
- // TODO: only in dev mode
console.error(err);
}
console.error('Unknown error, we\'re already working on it :)');
diff --git a/src/classes/utils/http/retryRequest.ts b/src/classes/utils/http/retryRequest.ts
new file mode 100644
index 0000000..5ff8654
--- /dev/null
+++ b/src/classes/utils/http/retryRequest.ts
@@ -0,0 +1,18 @@
+export function retryRequest(funcToExec: any, getTargetRef: any, targetValue: any, retryCount: number = 7) {
+ let execCount = 0;
+ executeFunc(funcToExec, execCount, getTargetRef, targetValue, retryCount);
+}
+
+function executeFunc(funcToExec: any, execCount: number, getTargetRef: any, targetValue: any, retryCount: number) {
+ try {
+ if (execCount < retryCount && getTargetRef() !== targetValue) {
+ setTimeout(() => {
+ funcToExec();
+ executeFunc(funcToExec, execCount, getTargetRef, targetValue, retryCount);
+ }, 500 + (500 * execCount));
+ execCount++;
+ }
+ } catch (e) {
+ // ignored
+ }
+}
diff --git a/src/client/bindings.ts b/src/client/bindings.ts
index 9325ed8..e7ee678 100644
--- a/src/client/bindings.ts
+++ b/src/client/bindings.ts
@@ -1,4 +1,4 @@
-import {CurrencyType, CurrencyType1, CurrencyType3, EntityType, EntityType1, UserBalance} from "./models";
+import {CurrencyType, CurrencyType1, CurrencyType3, EntityType} from "./models";
export class ProjectModel {
guid?: string;
@@ -7,6 +7,7 @@ export class ProjectModel {
repository_guid?: string;
creator_guid?: string;
base_uri?: string;
+ stars_count?: number;
created_at?: string;
updated_at?: string;
}
@@ -82,7 +83,7 @@ export class InvoiceModel {
* Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card', 'BacklogItem',
* 'UserBalance'
*/
- entity_type?: EntityType1;
+ entity_type?: EntityType;
amount?: number;
status?: string;
/**
@@ -131,3 +132,27 @@ export class LibraryItem {
created_at?: string;
}
+export class ProjectProduct {
+ guid?: string;
+ name?: string;
+ description?: string;
+ /**
+ * url to view product info (optional)
+ */
+ url?: string;
+ project_guid?: string;
+ usd_price?: number;
+ duration_hours?: number;
+ users_count?: number;
+ created_at?: string;
+ updated_at?: string;
+}
+
+export interface WithdrawalRequest {
+ guid?: string;
+ user_guid?: string;
+ amount?: number;
+ address?: string;
+ paid?: boolean;
+ created_at?: string;
+}
diff --git a/src/client/models/index.ts b/src/client/models/index.ts
index db996d3..485c1a3 100644
--- a/src/client/models/index.ts
+++ b/src/client/models/index.ts
@@ -47,6 +47,7 @@ export interface Project {
repositoryGuid?: string;
creatorGuid?: string;
baseUri?: string;
+ starsCount?: number;
createdAt?: string;
updatedAt?: string;
}
@@ -133,7 +134,7 @@ export interface FundingBalance {
entityGuid?: string;
/**
* Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card', 'BacklogItem',
- * 'UserBalance', 'User'
+ * 'UserBalance', 'User', 'ProjectProductPurchase', 'BoardColumn'
*/
entityType?: EntityType;
amount?: number;
@@ -166,7 +167,7 @@ export interface Invoice {
entityGuid?: string;
/**
* Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card', 'BacklogItem',
- * 'UserBalance', 'User'
+ * 'UserBalance', 'User', 'ProjectProductPurchase', 'BoardColumn'
*/
entityType?: EntityType1;
amount?: number;
@@ -216,6 +217,39 @@ export interface LibraryItem {
createdAt?: string;
}
+/**
+ * An interface representing ProjectProduct.
+ */
+export interface ProjectProduct {
+ guid?: string;
+ name?: string;
+ description?: string;
+ /**
+ * url to view product info (optional)
+ */
+ url?: string;
+ projectGuid?: string;
+ usdPrice?: number;
+ durationHours?: number;
+ createdAt?: string;
+ updatedAt?: string;
+}
+
+/**
+ * An interface representing WithdrawalRequest.
+ */
+export interface WithdrawalRequest {
+ guid?: string;
+ userGuid?: string;
+ amount?: number;
+ /**
+ * Users email for PayPal or cryptocurrency address
+ */
+ address?: string;
+ paid?: boolean;
+ createdAt?: string;
+}
+
/**
* An interface representing GetLoginOKResponseData.
*/
@@ -230,6 +264,34 @@ export interface GetLoginOKResponse {
data?: GetLoginOKResponseData;
}
+/**
+ * An interface representing PostRegisterOKResponseData.
+ */
+export interface PostRegisterOKResponseData {
+ response?: string;
+}
+
+/**
+ * An interface representing PostRegisterOKResponse.
+ */
+export interface PostRegisterOKResponse {
+ data?: PostRegisterOKResponseData;
+}
+
+/**
+ * An interface representing PostConfirmEmailOKResponseData.
+ */
+export interface PostConfirmEmailOKResponseData {
+ token?: string;
+}
+
+/**
+ * An interface representing PostConfirmEmailOKResponse.
+ */
+export interface PostConfirmEmailOKResponse {
+ data?: PostConfirmEmailOKResponseData;
+}
+
/**
* An interface representing GetGitHubLoginLinkOKResponseData.
*/
@@ -369,6 +431,20 @@ export interface PostImportRepositoryOKResponse {
data?: PostImportRepositoryOKResponseData;
}
+/**
+ * An interface representing GetRepoOKResponseData.
+ */
+export interface GetRepoOKResponseData {
+ repository?: Repository;
+}
+
+/**
+ * An interface representing GetRepoOKResponse.
+ */
+export interface GetRepoOKResponse {
+ data?: GetRepoOKResponseData;
+}
+
/**
* An interface representing GetProjectOKResponseData.
*/
@@ -467,6 +543,34 @@ export interface GetProjectByAliasOKResponse {
data?: GetProjectByAliasOKResponseData;
}
+/**
+ * An interface representing CreateCardCreatedResponseData.
+ */
+export interface CreateCardCreatedResponseData {
+ card?: Card;
+}
+
+/**
+ * An interface representing CreateCardCreatedResponse.
+ */
+export interface CreateCardCreatedResponse {
+ data?: CreateCardCreatedResponseData;
+}
+
+/**
+ * An interface representing EditCardOKResponseData.
+ */
+export interface EditCardOKResponseData {
+ card?: Card;
+}
+
+/**
+ * An interface representing EditCardOKResponse.
+ */
+export interface EditCardOKResponse {
+ data?: EditCardOKResponseData;
+}
+
/**
* An interface representing GetCardWorkOKResponseData.
*/
@@ -691,6 +795,27 @@ export interface RemoveProjectFromMyLibraryOKResponse {
data?: RemoveProjectFromMyLibraryOKResponseData;
}
+/**
+ * An interface representing GetMyLibraryProjectStatusOKResponseDataStatus.
+ */
+export interface GetMyLibraryProjectStatusOKResponseDataStatus {
+ inLibrary?: boolean;
+}
+
+/**
+ * An interface representing GetMyLibraryProjectStatusOKResponseData.
+ */
+export interface GetMyLibraryProjectStatusOKResponseData {
+ status?: GetMyLibraryProjectStatusOKResponseDataStatus;
+}
+
+/**
+ * An interface representing GetMyLibraryProjectStatusOKResponse.
+ */
+export interface GetMyLibraryProjectStatusOKResponse {
+ data?: GetMyLibraryProjectStatusOKResponseData;
+}
+
/**
* An interface representing GetMeOKResponseData.
*/
@@ -789,10 +914,85 @@ export interface GetRandomProjectsOKResponse {
data?: GetRandomProjectsOKResponseData;
}
+/**
+ * An interface representing GetProjectProductsOKResponseData.
+ */
+export interface GetProjectProductsOKResponseData {
+ products?: ProjectProduct[];
+}
+
+/**
+ * An interface representing GetProjectProductsOKResponse.
+ */
+export interface GetProjectProductsOKResponse {
+ data?: GetProjectProductsOKResponseData;
+}
+
+/**
+ * An interface representing PostProjectProductCreatedResponseData.
+ */
+export interface PostProjectProductCreatedResponseData {
+ product?: ProjectProduct;
+}
+
+/**
+ * An interface representing PostProjectProductCreatedResponse.
+ */
+export interface PostProjectProductCreatedResponse {
+ data?: PostProjectProductCreatedResponseData;
+}
+
+/**
+ * An interface representing DeleteProjectProductOKResponseData.
+ */
+export interface DeleteProjectProductOKResponseData {
+ product?: ProjectProduct;
+}
+
+/**
+ * An interface representing DeleteProjectProductOKResponse.
+ */
+export interface DeleteProjectProductOKResponse {
+ data?: DeleteProjectProductOKResponseData;
+}
+
+/**
+ * An interface representing GetMyWithdrawalRequestsOKResponseData.
+ */
+export interface GetMyWithdrawalRequestsOKResponseData {
+ withdrawRequests?: WithdrawalRequest[];
+}
+
+/**
+ * An interface representing GetMyWithdrawalRequestsOKResponse.
+ */
+export interface GetMyWithdrawalRequestsOKResponse {
+ data?: GetMyWithdrawalRequestsOKResponseData;
+}
+
+/**
+ * An interface representing PostWithdrawalRequestCreatedResponseData.
+ */
+export interface PostWithdrawalRequestCreatedResponseData {
+ withdrawRequest?: WithdrawalRequest;
+}
+
+/**
+ * An interface representing PostWithdrawalRequestCreatedResponse.
+ */
+export interface PostWithdrawalRequestCreatedResponse {
+ data?: PostWithdrawalRequestCreatedResponseData;
+}
+
/**
* An interface representing SupportHubApiOptions.
*/
export interface SupportHubApiOptions extends ServiceClientOptions {
+ /**
+ * Possible values include: 'Usd', 'BitCoin', 'Ethereum', 'Erc20Token', 'Waves', 'WavesToken',
+ * 'LiteCoin'
+ */
+ currencyType?: CurrencyType4;
baseUri?: string;
}
@@ -804,6 +1004,13 @@ export interface SupportHubApiGetLoginOptionalParams extends msRest.RequestOptio
password?: string;
}
+/**
+ * Optional Parameters.
+ */
+export interface SupportHubApiPostRegisterOptionalParams extends msRest.RequestOptionsBase {
+ referralKey?: string;
+}
+
/**
* Optional Parameters.
*/
@@ -834,6 +1041,31 @@ export interface SupportHubApiEditProjectOptionalParams extends msRest.RequestOp
description?: string;
}
+/**
+ * Optional Parameters.
+ */
+export interface SupportHubApiCreateCardOptionalParams extends msRest.RequestOptionsBase {
+ description?: string;
+ columnOrder?: number;
+}
+
+/**
+ * Optional Parameters.
+ */
+export interface SupportHubApiEditCardOptionalParams extends msRest.RequestOptionsBase {
+ name?: string;
+ description?: string;
+ columnOrder?: number;
+ columnGuid?: string;
+}
+
+/**
+ * Optional Parameters.
+ */
+export interface SupportHubApiPostProjectProductOptionalParams extends msRest.RequestOptionsBase {
+ durationHours?: number;
+}
+
/**
* Defines values for ServiceType.
* Possible values include: 'GitHub', 'GitLab'
@@ -845,11 +1077,11 @@ export type ServiceType = 'GitHub' | 'GitLab';
/**
* Defines values for EntityType.
* Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card', 'BacklogItem',
- * 'UserBalance', 'User'
+ * 'UserBalance', 'User', 'ProjectProductPurchase', 'BoardColumn'
* @readonly
* @enum {string}
*/
-export type EntityType = 'ProjectCategory' | 'Project' | 'Board' | 'Card' | 'BacklogItem' | 'UserBalance' | 'User';
+export type EntityType = 'ProjectCategory' | 'Project' | 'Board' | 'Card' | 'BacklogItem' | 'UserBalance' | 'User' | 'ProjectProductPurchase' | 'BoardColumn';
/**
* Defines values for CurrencyType.
@@ -872,11 +1104,11 @@ export type CurrencyType1 = 'Usd' | 'BitCoin' | 'Ethereum' | 'Erc20Token' | 'Wav
/**
* Defines values for EntityType1.
* Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card', 'BacklogItem',
- * 'UserBalance', 'User'
+ * 'UserBalance', 'User', 'ProjectProductPurchase', 'BoardColumn'
* @readonly
* @enum {string}
*/
-export type EntityType1 = 'ProjectCategory' | 'Project' | 'Board' | 'Card' | 'BacklogItem' | 'UserBalance' | 'User';
+export type EntityType1 = 'ProjectCategory' | 'Project' | 'Board' | 'Card' | 'BacklogItem' | 'UserBalance' | 'User' | 'ProjectProductPurchase' | 'BoardColumn';
/**
* Defines values for CurrencyType2.
@@ -896,6 +1128,15 @@ export type CurrencyType2 = 'Usd' | 'BitCoin' | 'Ethereum' | 'Erc20Token' | 'Wav
*/
export type CurrencyType3 = 'Usd' | 'BitCoin' | 'Ethereum' | 'Erc20Token' | 'Waves' | 'WavesToken' | 'LiteCoin';
+/**
+ * Defines values for CurrencyType4.
+ * Possible values include: 'Usd', 'BitCoin', 'Ethereum', 'Erc20Token', 'Waves', 'WavesToken',
+ * 'LiteCoin'
+ * @readonly
+ * @enum {string}
+ */
+export type CurrencyType4 = 'Usd' | 'BitCoin' | 'Ethereum' | 'Erc20Token' | 'Waves' | 'WavesToken' | 'LiteCoin';
+
/**
* Defines values for ServiceType1.
* Possible values include: 'GitHub', 'GitLab'
@@ -907,37 +1148,47 @@ export type ServiceType1 = 'GitHub' | 'GitLab';
/**
* Defines values for EntityType2.
* Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card', 'BacklogItem',
- * 'UserBalance', 'User'
+ * 'UserBalance', 'User', 'ProjectProductPurchase', 'BoardColumn'
* @readonly
* @enum {string}
*/
-export type EntityType2 = 'ProjectCategory' | 'Project' | 'Board' | 'Card' | 'BacklogItem' | 'UserBalance' | 'User';
+export type EntityType2 = 'ProjectCategory' | 'Project' | 'Board' | 'Card' | 'BacklogItem' | 'UserBalance' | 'User' | 'ProjectProductPurchase' | 'BoardColumn';
/**
* Defines values for EntityType3.
* Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card', 'BacklogItem',
- * 'UserBalance', 'User'
+ * 'UserBalance', 'User', 'ProjectProductPurchase', 'BoardColumn'
* @readonly
* @enum {string}
*/
-export type EntityType3 = 'ProjectCategory' | 'Project' | 'Board' | 'Card' | 'BacklogItem' | 'UserBalance' | 'User';
+export type EntityType3 = 'ProjectCategory' | 'Project' | 'Board' | 'Card' | 'BacklogItem' | 'UserBalance' | 'User' | 'ProjectProductPurchase' | 'BoardColumn';
/**
- * Defines values for CurrencyType4.
+ * Defines values for CurrencyType5.
* Possible values include: 'Usd', 'BitCoin', 'Ethereum', 'Erc20Token', 'Waves', 'WavesToken',
* 'LiteCoin'
* @readonly
* @enum {string}
*/
-export type CurrencyType4 = 'Usd' | 'BitCoin' | 'Ethereum' | 'Erc20Token' | 'Waves' | 'WavesToken' | 'LiteCoin';
+export type CurrencyType5 = 'Usd' | 'BitCoin' | 'Ethereum' | 'Erc20Token' | 'Waves' | 'WavesToken' | 'LiteCoin';
/**
* Defines values for EntityType4.
- * Possible values include: 'Project', 'Board', 'BoardColumn', 'Card'
+ * Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card', 'BacklogItem',
+ * 'UserBalance', 'User', 'ProjectProductPurchase', 'BoardColumn'
+ * @readonly
+ * @enum {string}
+ */
+export type EntityType4 = 'ProjectCategory' | 'Project' | 'Board' | 'Card' | 'BacklogItem' | 'UserBalance' | 'User' | 'ProjectProductPurchase' | 'BoardColumn';
+
+/**
+ * Defines values for CurrencyType6.
+ * Possible values include: 'Usd', 'BitCoin', 'Ethereum', 'Erc20Token', 'Waves', 'WavesToken',
+ * 'LiteCoin'
* @readonly
* @enum {string}
*/
-export type EntityType4 = 'Project' | 'Board' | 'BoardColumn' | 'Card';
+export type CurrencyType6 = 'Usd' | 'BitCoin' | 'Ethereum' | 'Erc20Token' | 'Waves' | 'WavesToken' | 'LiteCoin';
/**
* Contains response data for the getLogin operation.
@@ -959,6 +1210,46 @@ export type GetLoginResponse = GetLoginOKResponse & {
};
};
+/**
+ * Contains response data for the postRegister operation.
+ */
+export type PostRegisterResponse = PostRegisterOKResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PostRegisterOKResponse;
+ };
+};
+
+/**
+ * Contains response data for the postConfirmEmail operation.
+ */
+export type PostConfirmEmailResponse = PostConfirmEmailOKResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PostConfirmEmailOKResponse;
+ };
+};
+
/**
* Contains response data for the getGitHubLoginLink operation.
*/
@@ -1099,6 +1390,26 @@ export type PostImportRepositoryResponse = PostImportRepositoryOKResponse & {
};
};
+/**
+ * Contains response data for the getRepo operation.
+ */
+export type GetRepoResponse = GetRepoOKResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: GetRepoOKResponse;
+ };
+};
+
/**
* Contains response data for the getProject operation.
*/
@@ -1239,6 +1550,46 @@ export type GetProjectByAliasResponse = GetProjectByAliasOKResponse & {
};
};
+/**
+ * Contains response data for the createCard operation.
+ */
+export type CreateCardResponse = CreateCardCreatedResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: CreateCardCreatedResponse;
+ };
+};
+
+/**
+ * Contains response data for the editCard operation.
+ */
+export type EditCardResponse = EditCardOKResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: EditCardOKResponse;
+ };
+};
+
/**
* Contains response data for the getCardWork operation.
*/
@@ -1559,6 +1910,26 @@ export type RemoveProjectFromMyLibraryResponse = RemoveProjectFromMyLibraryOKRes
};
};
+/**
+ * Contains response data for the getMyLibraryProjectStatus operation.
+ */
+export type GetMyLibraryProjectStatusResponse = GetMyLibraryProjectStatusOKResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: GetMyLibraryProjectStatusOKResponse;
+ };
+};
+
/**
* Contains response data for the getMe operation.
*/
@@ -1698,3 +2069,103 @@ export type GetRandomProjectsResponse = GetRandomProjectsOKResponse & {
parsedBody: GetRandomProjectsOKResponse;
};
};
+
+/**
+ * Contains response data for the getProjectProducts operation.
+ */
+export type GetProjectProductsResponse = GetProjectProductsOKResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: GetProjectProductsOKResponse;
+ };
+};
+
+/**
+ * Contains response data for the postProjectProduct operation.
+ */
+export type PostProjectProductResponse = PostProjectProductCreatedResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PostProjectProductCreatedResponse;
+ };
+};
+
+/**
+ * Contains response data for the deleteProjectProduct operation.
+ */
+export type DeleteProjectProductResponse = DeleteProjectProductOKResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: DeleteProjectProductOKResponse;
+ };
+};
+
+/**
+ * Contains response data for the getMyWithdrawalRequests operation.
+ */
+export type GetMyWithdrawalRequestsResponse = GetMyWithdrawalRequestsOKResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: GetMyWithdrawalRequestsOKResponse;
+ };
+};
+
+/**
+ * Contains response data for the postWithdrawalRequest operation.
+ */
+export type PostWithdrawalRequestResponse = PostWithdrawalRequestCreatedResponse & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: PostWithdrawalRequestCreatedResponse;
+ };
+};
diff --git a/src/client/models/mappers.ts b/src/client/models/mappers.ts
index cf2cfd0..3a61976 100644
--- a/src/client/models/mappers.ts
+++ b/src/client/models/mappers.ts
@@ -139,6 +139,12 @@ export const Project: msRest.CompositeMapper = {
name: "String"
}
},
+ starsCount: {
+ serializedName: "stars_count",
+ type: {
+ name: "Number"
+ }
+ },
createdAt: {
serializedName: "created_at",
type: {
@@ -692,6 +698,116 @@ export const LibraryItem: msRest.CompositeMapper = {
}
};
+export const ProjectProduct: msRest.CompositeMapper = {
+ serializedName: "ProjectProduct",
+ type: {
+ name: "Composite",
+ className: "ProjectProduct",
+ modelProperties: {
+ guid: {
+ serializedName: "guid",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ description: {
+ serializedName: "description",
+ type: {
+ name: "String"
+ }
+ },
+ url: {
+ serializedName: "url",
+ type: {
+ name: "String"
+ }
+ },
+ projectGuid: {
+ serializedName: "project_guid",
+ type: {
+ name: "String"
+ }
+ },
+ usdPrice: {
+ serializedName: "usd_price",
+ type: {
+ name: "Number"
+ }
+ },
+ durationHours: {
+ serializedName: "duration_hours",
+ type: {
+ name: "Number"
+ }
+ },
+ createdAt: {
+ serializedName: "created_at",
+ type: {
+ name: "String"
+ }
+ },
+ updatedAt: {
+ serializedName: "updated_at",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const WithdrawalRequest: msRest.CompositeMapper = {
+ serializedName: "WithdrawalRequest",
+ type: {
+ name: "Composite",
+ className: "WithdrawalRequest",
+ modelProperties: {
+ guid: {
+ serializedName: "guid",
+ type: {
+ name: "String"
+ }
+ },
+ userGuid: {
+ serializedName: "user_guid",
+ type: {
+ name: "String"
+ }
+ },
+ amount: {
+ serializedName: "amount",
+ type: {
+ name: "Number"
+ }
+ },
+ address: {
+ serializedName: "address",
+ type: {
+ name: "String"
+ }
+ },
+ paid: {
+ serializedName: "paid",
+ type: {
+ name: "Boolean"
+ }
+ },
+ createdAt: {
+ serializedName: "created_at",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
export const GetLoginOKResponseData: msRest.CompositeMapper = {
serializedName: "GetLoginOKResponse_data",
type: {
@@ -725,6 +841,72 @@ export const GetLoginOKResponse: msRest.CompositeMapper = {
}
};
+export const PostRegisterOKResponseData: msRest.CompositeMapper = {
+ serializedName: "PostRegisterOKResponse_data",
+ type: {
+ name: "Composite",
+ className: "PostRegisterOKResponseData",
+ modelProperties: {
+ response: {
+ serializedName: "response",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const PostRegisterOKResponse: msRest.CompositeMapper = {
+ serializedName: "PostRegisterOKResponse",
+ type: {
+ name: "Composite",
+ className: "PostRegisterOKResponse",
+ modelProperties: {
+ data: {
+ serializedName: "data",
+ type: {
+ name: "Composite",
+ className: "PostRegisterOKResponseData"
+ }
+ }
+ }
+ }
+};
+
+export const PostConfirmEmailOKResponseData: msRest.CompositeMapper = {
+ serializedName: "PostConfirmEmailOKResponse_data",
+ type: {
+ name: "Composite",
+ className: "PostConfirmEmailOKResponseData",
+ modelProperties: {
+ token: {
+ serializedName: "token",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
+export const PostConfirmEmailOKResponse: msRest.CompositeMapper = {
+ serializedName: "PostConfirmEmailOKResponse",
+ type: {
+ name: "Composite",
+ className: "PostConfirmEmailOKResponse",
+ modelProperties: {
+ data: {
+ serializedName: "data",
+ type: {
+ name: "Composite",
+ className: "PostConfirmEmailOKResponseData"
+ }
+ }
+ }
+ }
+};
+
export const GetGitHubLoginLinkOKResponseData: msRest.CompositeMapper = {
serializedName: "GetGitHubLoginLinkOKResponse_data",
type: {
@@ -1085,6 +1267,40 @@ export const PostImportRepositoryOKResponse: msRest.CompositeMapper = {
}
};
+export const GetRepoOKResponseData: msRest.CompositeMapper = {
+ serializedName: "GetRepoOKResponse_data",
+ type: {
+ name: "Composite",
+ className: "GetRepoOKResponseData",
+ modelProperties: {
+ repository: {
+ serializedName: "repository",
+ type: {
+ name: "Composite",
+ className: "Repository"
+ }
+ }
+ }
+ }
+};
+
+export const GetRepoOKResponse: msRest.CompositeMapper = {
+ serializedName: "GetRepoOKResponse",
+ type: {
+ name: "Composite",
+ className: "GetRepoOKResponse",
+ modelProperties: {
+ data: {
+ serializedName: "data",
+ type: {
+ name: "Composite",
+ className: "GetRepoOKResponseData"
+ }
+ }
+ }
+ }
+};
+
export const GetProjectOKResponseData: msRest.CompositeMapper = {
serializedName: "GetProjectOKResponse_data",
type: {
@@ -1338,6 +1554,74 @@ export const GetProjectByAliasOKResponse: msRest.CompositeMapper = {
}
};
+export const CreateCardCreatedResponseData: msRest.CompositeMapper = {
+ serializedName: "CreateCardCreatedResponse_data",
+ type: {
+ name: "Composite",
+ className: "CreateCardCreatedResponseData",
+ modelProperties: {
+ card: {
+ serializedName: "card",
+ type: {
+ name: "Composite",
+ className: "Card"
+ }
+ }
+ }
+ }
+};
+
+export const CreateCardCreatedResponse: msRest.CompositeMapper = {
+ serializedName: "CreateCardCreatedResponse",
+ type: {
+ name: "Composite",
+ className: "CreateCardCreatedResponse",
+ modelProperties: {
+ data: {
+ serializedName: "data",
+ type: {
+ name: "Composite",
+ className: "CreateCardCreatedResponseData"
+ }
+ }
+ }
+ }
+};
+
+export const EditCardOKResponseData: msRest.CompositeMapper = {
+ serializedName: "EditCardOKResponse_data",
+ type: {
+ name: "Composite",
+ className: "EditCardOKResponseData",
+ modelProperties: {
+ card: {
+ serializedName: "card",
+ type: {
+ name: "Composite",
+ className: "Card"
+ }
+ }
+ }
+ }
+};
+
+export const EditCardOKResponse: msRest.CompositeMapper = {
+ serializedName: "EditCardOKResponse",
+ type: {
+ name: "Composite",
+ className: "EditCardOKResponse",
+ modelProperties: {
+ data: {
+ serializedName: "data",
+ type: {
+ name: "Composite",
+ className: "EditCardOKResponseData"
+ }
+ }
+ }
+ }
+};
+
export const GetCardWorkOKResponseData: msRest.CompositeMapper = {
serializedName: "GetCardWorkOKResponse_data",
type: {
@@ -1912,6 +2196,56 @@ export const RemoveProjectFromMyLibraryOKResponse: msRest.CompositeMapper = {
}
};
+export const GetMyLibraryProjectStatusOKResponseDataStatus: msRest.CompositeMapper = {
+ serializedName: "GetMyLibraryProjectStatusOKResponse_data_status",
+ type: {
+ name: "Composite",
+ className: "GetMyLibraryProjectStatusOKResponseDataStatus",
+ modelProperties: {
+ inLibrary: {
+ serializedName: "in_library",
+ type: {
+ name: "Boolean"
+ }
+ }
+ }
+ }
+};
+
+export const GetMyLibraryProjectStatusOKResponseData: msRest.CompositeMapper = {
+ serializedName: "GetMyLibraryProjectStatusOKResponse_data",
+ type: {
+ name: "Composite",
+ className: "GetMyLibraryProjectStatusOKResponseData",
+ modelProperties: {
+ status: {
+ serializedName: "status",
+ type: {
+ name: "Composite",
+ className: "GetMyLibraryProjectStatusOKResponseDataStatus"
+ }
+ }
+ }
+ }
+};
+
+export const GetMyLibraryProjectStatusOKResponse: msRest.CompositeMapper = {
+ serializedName: "GetMyLibraryProjectStatusOKResponse",
+ type: {
+ name: "Composite",
+ className: "GetMyLibraryProjectStatusOKResponse",
+ modelProperties: {
+ data: {
+ serializedName: "data",
+ type: {
+ name: "Composite",
+ className: "GetMyLibraryProjectStatusOKResponseData"
+ }
+ }
+ }
+ }
+};
+
export const GetMeOKResponseData: msRest.CompositeMapper = {
serializedName: "GetMeOKResponse_data",
type: {
@@ -2171,3 +2505,183 @@ export const GetRandomProjectsOKResponse: msRest.CompositeMapper = {
}
}
};
+
+export const GetProjectProductsOKResponseData: msRest.CompositeMapper = {
+ serializedName: "GetProjectProductsOKResponse_data",
+ type: {
+ name: "Composite",
+ className: "GetProjectProductsOKResponseData",
+ modelProperties: {
+ products: {
+ serializedName: "products",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "ProjectProduct"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const GetProjectProductsOKResponse: msRest.CompositeMapper = {
+ serializedName: "GetProjectProductsOKResponse",
+ type: {
+ name: "Composite",
+ className: "GetProjectProductsOKResponse",
+ modelProperties: {
+ data: {
+ serializedName: "data",
+ type: {
+ name: "Composite",
+ className: "GetProjectProductsOKResponseData"
+ }
+ }
+ }
+ }
+};
+
+export const PostProjectProductCreatedResponseData: msRest.CompositeMapper = {
+ serializedName: "PostProjectProductCreatedResponse_data",
+ type: {
+ name: "Composite",
+ className: "PostProjectProductCreatedResponseData",
+ modelProperties: {
+ product: {
+ serializedName: "product",
+ type: {
+ name: "Composite",
+ className: "ProjectProduct"
+ }
+ }
+ }
+ }
+};
+
+export const PostProjectProductCreatedResponse: msRest.CompositeMapper = {
+ serializedName: "PostProjectProductCreatedResponse",
+ type: {
+ name: "Composite",
+ className: "PostProjectProductCreatedResponse",
+ modelProperties: {
+ data: {
+ serializedName: "data",
+ type: {
+ name: "Composite",
+ className: "PostProjectProductCreatedResponseData"
+ }
+ }
+ }
+ }
+};
+
+export const DeleteProjectProductOKResponseData: msRest.CompositeMapper = {
+ serializedName: "DeleteProjectProductOKResponse_data",
+ type: {
+ name: "Composite",
+ className: "DeleteProjectProductOKResponseData",
+ modelProperties: {
+ product: {
+ serializedName: "product",
+ type: {
+ name: "Composite",
+ className: "ProjectProduct"
+ }
+ }
+ }
+ }
+};
+
+export const DeleteProjectProductOKResponse: msRest.CompositeMapper = {
+ serializedName: "DeleteProjectProductOKResponse",
+ type: {
+ name: "Composite",
+ className: "DeleteProjectProductOKResponse",
+ modelProperties: {
+ data: {
+ serializedName: "data",
+ type: {
+ name: "Composite",
+ className: "DeleteProjectProductOKResponseData"
+ }
+ }
+ }
+ }
+};
+
+export const GetMyWithdrawalRequestsOKResponseData: msRest.CompositeMapper = {
+ serializedName: "GetMyWithdrawalRequestsOKResponse_data",
+ type: {
+ name: "Composite",
+ className: "GetMyWithdrawalRequestsOKResponseData",
+ modelProperties: {
+ withdrawRequests: {
+ serializedName: "withdraw_requests",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "WithdrawalRequest"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
+export const GetMyWithdrawalRequestsOKResponse: msRest.CompositeMapper = {
+ serializedName: "GetMyWithdrawalRequestsOKResponse",
+ type: {
+ name: "Composite",
+ className: "GetMyWithdrawalRequestsOKResponse",
+ modelProperties: {
+ data: {
+ serializedName: "data",
+ type: {
+ name: "Composite",
+ className: "GetMyWithdrawalRequestsOKResponseData"
+ }
+ }
+ }
+ }
+};
+
+export const PostWithdrawalRequestCreatedResponseData: msRest.CompositeMapper = {
+ serializedName: "PostWithdrawalRequestCreatedResponse_data",
+ type: {
+ name: "Composite",
+ className: "PostWithdrawalRequestCreatedResponseData",
+ modelProperties: {
+ withdrawRequest: {
+ serializedName: "withdraw_request",
+ type: {
+ name: "Composite",
+ className: "WithdrawalRequest"
+ }
+ }
+ }
+ }
+};
+
+export const PostWithdrawalRequestCreatedResponse: msRest.CompositeMapper = {
+ serializedName: "PostWithdrawalRequestCreatedResponse",
+ type: {
+ name: "Composite",
+ className: "PostWithdrawalRequestCreatedResponse",
+ modelProperties: {
+ data: {
+ serializedName: "data",
+ type: {
+ name: "Composite",
+ className: "PostWithdrawalRequestCreatedResponseData"
+ }
+ }
+ }
+ }
+};
diff --git a/src/client/models/parameters.ts b/src/client/models/parameters.ts
index fc0f609..be73951 100644
--- a/src/client/models/parameters.ts
+++ b/src/client/models/parameters.ts
@@ -18,6 +18,16 @@ export const accessToken: msRest.OperationQueryParameter = {
}
}
};
+export const address: msRest.OperationQueryParameter = {
+ parameterPath: "address",
+ mapper: {
+ required: true,
+ serializedName: "address",
+ type: {
+ name: "String"
+ }
+ }
+};
export const alias: msRest.OperationQueryParameter = {
parameterPath: "alias",
mapper: {
@@ -80,7 +90,7 @@ export const code: msRest.OperationQueryParameter = {
}
}
};
-export const columnGuid: msRest.OperationQueryParameter = {
+export const columnGuid0: msRest.OperationQueryParameter = {
parameterPath: "columnGuid",
mapper: {
required: true,
@@ -90,6 +100,40 @@ export const columnGuid: msRest.OperationQueryParameter = {
}
}
};
+export const columnGuid1: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "columnGuid"
+ ],
+ mapper: {
+ serializedName: "column_guid",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const columnOrder: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "columnOrder"
+ ],
+ mapper: {
+ serializedName: "column_order",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const confirmationKey: msRest.OperationQueryParameter = {
+ parameterPath: "confirmationKey",
+ mapper: {
+ required: true,
+ serializedName: "confirmation_key",
+ type: {
+ name: "String"
+ }
+ }
+};
export const currencyType: msRest.OperationQueryParameter = {
parameterPath: "currencyType",
mapper: {
@@ -100,7 +144,7 @@ export const currencyType: msRest.OperationQueryParameter = {
}
}
};
-export const description: msRest.OperationQueryParameter = {
+export const description0: msRest.OperationQueryParameter = {
parameterPath: [
"options",
"description"
@@ -112,7 +156,29 @@ export const description: msRest.OperationQueryParameter = {
}
}
};
-export const email: msRest.OperationQueryParameter = {
+export const description1: msRest.OperationQueryParameter = {
+ parameterPath: "description",
+ mapper: {
+ required: true,
+ serializedName: "description",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const durationHours: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "durationHours"
+ ],
+ mapper: {
+ serializedName: "duration_hours",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const email0: msRest.OperationQueryParameter = {
parameterPath: [
"options",
"email"
@@ -124,6 +190,16 @@ export const email: msRest.OperationQueryParameter = {
}
}
};
+export const email1: msRest.OperationQueryParameter = {
+ parameterPath: "email",
+ mapper: {
+ required: true,
+ serializedName: "email",
+ type: {
+ name: "String"
+ }
+ }
+};
export const entityGuid: msRest.OperationQueryParameter = {
parameterPath: "entityGuid",
mapper: {
@@ -184,6 +260,38 @@ export const key: msRest.OperationQueryParameter = {
}
}
};
+export const login: msRest.OperationQueryParameter = {
+ parameterPath: "login",
+ mapper: {
+ required: true,
+ serializedName: "login",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const name0: msRest.OperationQueryParameter = {
+ parameterPath: "name",
+ mapper: {
+ required: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const name1: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "name"
+ ],
+ mapper: {
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ }
+};
export const originId: msRest.OperationQueryParameter = {
parameterPath: "originId",
mapper: {
@@ -204,7 +312,7 @@ export const owner: msRest.OperationQueryParameter = {
}
}
};
-export const password: msRest.OperationQueryParameter = {
+export const password0: msRest.OperationQueryParameter = {
parameterPath: [
"options",
"password"
@@ -216,6 +324,26 @@ export const password: msRest.OperationQueryParameter = {
}
}
};
+export const password1: msRest.OperationQueryParameter = {
+ parameterPath: "password",
+ mapper: {
+ required: true,
+ serializedName: "password",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const productGuid: msRest.OperationQueryParameter = {
+ parameterPath: "productGuid",
+ mapper: {
+ required: true,
+ serializedName: "product_guid",
+ type: {
+ name: "String"
+ }
+ }
+};
export const projectGuid: msRest.OperationQueryParameter = {
parameterPath: "projectGuid",
mapper: {
@@ -236,6 +364,28 @@ export const proof: msRest.OperationQueryParameter = {
}
}
};
+export const referralKey: msRest.OperationQueryParameter = {
+ parameterPath: [
+ "options",
+ "referralKey"
+ ],
+ mapper: {
+ serializedName: "referral_key",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const repoGuid: msRest.OperationQueryParameter = {
+ parameterPath: "repoGuid",
+ mapper: {
+ required: true,
+ serializedName: "repo_guid",
+ type: {
+ name: "String"
+ }
+ }
+};
export const serviceType: msRest.OperationQueryParameter = {
parameterPath: "serviceType",
mapper: {
@@ -256,6 +406,36 @@ export const status: msRest.OperationQueryParameter = {
}
}
};
+export const url: msRest.OperationQueryParameter = {
+ parameterPath: "url",
+ mapper: {
+ required: true,
+ serializedName: "url",
+ type: {
+ name: "String"
+ }
+ }
+};
+export const usdPrice: msRest.OperationQueryParameter = {
+ parameterPath: "usdPrice",
+ mapper: {
+ required: true,
+ serializedName: "usd_price",
+ type: {
+ name: "Number"
+ }
+ }
+};
+export const useUrl: msRest.OperationQueryParameter = {
+ parameterPath: "useUrl",
+ mapper: {
+ required: true,
+ serializedName: "use_url",
+ type: {
+ name: "String"
+ }
+ }
+};
export const value: msRest.OperationQueryParameter = {
parameterPath: "value",
mapper: {
diff --git a/src/client/supportHubApi.ts b/src/client/supportHubApi.ts
index ec5c3c5..1d38a58 100644
--- a/src/client/supportHubApi.ts
+++ b/src/client/supportHubApi.ts
@@ -13,10 +13,12 @@ import { SupportHubApiContext } from "./supportHubApiContext";
class SupportHubApi extends SupportHubApiContext {
/**
* Initializes a new instance of the SupportHubApi class.
+ * @param entityType Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card',
+ * 'BacklogItem', 'UserBalance', 'User', 'ProjectProductPurchase', 'BoardColumn'
* @param [options] The parameter options
*/
- constructor(options?: Models.SupportHubApiOptions) {
- super(options);
+ constructor(entityType: string, options?: Models.SupportHubApiOptions) {
+ super(entityType, options);
}
/**
@@ -42,6 +44,68 @@ class SupportHubApi extends SupportHubApiContext {
callback) as Promise;
}
+ /**
+ * @param login
+ * @param email
+ * @param password
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ postRegister(login: string, email: string, password: string, options?: Models.SupportHubApiPostRegisterOptionalParams): Promise;
+ /**
+ * @param login
+ * @param email
+ * @param password
+ * @param callback The callback
+ */
+ postRegister(login: string, email: string, password: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param login
+ * @param email
+ * @param password
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ postRegister(login: string, email: string, password: string, options: Models.SupportHubApiPostRegisterOptionalParams, callback: msRest.ServiceCallback): void;
+ postRegister(login: string, email: string, password: string, options?: Models.SupportHubApiPostRegisterOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ login,
+ email,
+ password,
+ options
+ },
+ postRegisterOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * @param confirmationKey
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ postConfirmEmail(confirmationKey: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param confirmationKey
+ * @param callback The callback
+ */
+ postConfirmEmail(confirmationKey: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param confirmationKey
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ postConfirmEmail(confirmationKey: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ postConfirmEmail(confirmationKey: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ confirmationKey,
+ options
+ },
+ postConfirmEmailOperationSpec,
+ callback) as Promise;
+ }
+
/**
* Returns github login link
* @param [options] The optional parameters
@@ -227,6 +291,33 @@ class SupportHubApi extends SupportHubApiContext {
callback) as Promise;
}
+ /**
+ * @param repoGuid Repository Guid
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getRepo(repoGuid: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param repoGuid Repository Guid
+ * @param callback The callback
+ */
+ getRepo(repoGuid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param repoGuid Repository Guid
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getRepo(repoGuid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getRepo(repoGuid: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ repoGuid,
+ options
+ },
+ getRepoOperationSpec,
+ callback) as Promise;
+ }
+
/**
* @param projectGuid Project Guid
* @param [options] The optional parameters
@@ -424,6 +515,72 @@ class SupportHubApi extends SupportHubApiContext {
callback) as Promise;
}
+ /**
+ * @param apiToken
+ * @param columnGuid
+ * @param name
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ createCard(apiToken: string, columnGuid: string, name: string, options?: Models.SupportHubApiCreateCardOptionalParams): Promise;
+ /**
+ * @param apiToken
+ * @param columnGuid
+ * @param name
+ * @param callback The callback
+ */
+ createCard(apiToken: string, columnGuid: string, name: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param apiToken
+ * @param columnGuid
+ * @param name
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ createCard(apiToken: string, columnGuid: string, name: string, options: Models.SupportHubApiCreateCardOptionalParams, callback: msRest.ServiceCallback): void;
+ createCard(apiToken: string, columnGuid: string, name: string, options?: Models.SupportHubApiCreateCardOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ apiToken,
+ columnGuid,
+ name,
+ options
+ },
+ createCardOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * @param apiToken
+ * @param cardGuid
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ editCard(apiToken: string, cardGuid: string, options?: Models.SupportHubApiEditCardOptionalParams): Promise;
+ /**
+ * @param apiToken
+ * @param cardGuid
+ * @param callback The callback
+ */
+ editCard(apiToken: string, cardGuid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param apiToken
+ * @param cardGuid
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ editCard(apiToken: string, cardGuid: string, options: Models.SupportHubApiEditCardOptionalParams, callback: msRest.ServiceCallback): void;
+ editCard(apiToken: string, cardGuid: string, options?: Models.SupportHubApiEditCardOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ apiToken,
+ cardGuid,
+ options
+ },
+ editCardOperationSpec,
+ callback) as Promise;
+ }
+
/**
* @param cardGuid
* @param [options] The optional parameters
@@ -453,32 +610,25 @@ class SupportHubApi extends SupportHubApiContext {
/**
* @param entityGuid
- * @param entityType Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card',
- * 'BacklogItem', 'UserBalance', 'User'
* @param [options] The optional parameters
* @returns Promise
*/
- getEntityFundingBalances(entityGuid: string, entityType: Models.EntityType2, options?: msRest.RequestOptionsBase): Promise;
+ getEntityFundingBalances(entityGuid: string, options?: msRest.RequestOptionsBase): Promise;
/**
* @param entityGuid
- * @param entityType Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card',
- * 'BacklogItem', 'UserBalance', 'User'
* @param callback The callback
*/
- getEntityFundingBalances(entityGuid: string, entityType: Models.EntityType2, callback: msRest.ServiceCallback): void;
+ getEntityFundingBalances(entityGuid: string, callback: msRest.ServiceCallback): void;
/**
* @param entityGuid
- * @param entityType Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card',
- * 'BacklogItem', 'UserBalance', 'User'
* @param options The optional parameters
* @param callback The callback
*/
- getEntityFundingBalances(entityGuid: string, entityType: Models.EntityType2, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- getEntityFundingBalances(entityGuid: string, entityType: Models.EntityType2, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ getEntityFundingBalances(entityGuid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getEntityFundingBalances(entityGuid: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
return this.sendOperationRequest(
{
entityGuid,
- entityType,
options
},
getEntityFundingBalancesOperationSpec,
@@ -581,44 +731,37 @@ class SupportHubApi extends SupportHubApiContext {
/**
* @param apiToken JWT token
* @param entityGuid
- * @param entityType Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card',
- * 'BacklogItem', 'UserBalance', 'User'
* @param amount
* @param currencyType Possible values include: 'Usd', 'BitCoin', 'Ethereum', 'Erc20Token',
* 'Waves', 'WavesToken', 'LiteCoin'
* @param [options] The optional parameters
* @returns Promise
*/
- postInvoice(apiToken: string, entityGuid: string, entityType: Models.EntityType3, amount: number, currencyType: Models.CurrencyType4, options?: msRest.RequestOptionsBase): Promise;
+ postInvoice(apiToken: string, entityGuid: string, amount: number, currencyType: Models.CurrencyType5, options?: msRest.RequestOptionsBase): Promise;
/**
* @param apiToken JWT token
* @param entityGuid
- * @param entityType Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card',
- * 'BacklogItem', 'UserBalance', 'User'
* @param amount
* @param currencyType Possible values include: 'Usd', 'BitCoin', 'Ethereum', 'Erc20Token',
* 'Waves', 'WavesToken', 'LiteCoin'
* @param callback The callback
*/
- postInvoice(apiToken: string, entityGuid: string, entityType: Models.EntityType3, amount: number, currencyType: Models.CurrencyType4, callback: msRest.ServiceCallback): void;
+ postInvoice(apiToken: string, entityGuid: string, amount: number, currencyType: Models.CurrencyType5, callback: msRest.ServiceCallback): void;
/**
* @param apiToken JWT token
* @param entityGuid
- * @param entityType Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card',
- * 'BacklogItem', 'UserBalance', 'User'
* @param amount
* @param currencyType Possible values include: 'Usd', 'BitCoin', 'Ethereum', 'Erc20Token',
* 'Waves', 'WavesToken', 'LiteCoin'
* @param options The optional parameters
* @param callback The callback
*/
- postInvoice(apiToken: string, entityGuid: string, entityType: Models.EntityType3, amount: number, currencyType: Models.CurrencyType4, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- postInvoice(apiToken: string, entityGuid: string, entityType: Models.EntityType3, amount: number, currencyType: Models.CurrencyType4, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ postInvoice(apiToken: string, entityGuid: string, amount: number, currencyType: Models.CurrencyType5, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ postInvoice(apiToken: string, entityGuid: string, amount: number, currencyType: Models.CurrencyType5, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
return this.sendOperationRequest(
{
apiToken,
entityGuid,
- entityType,
amount,
currencyType,
options
@@ -929,6 +1072,37 @@ class SupportHubApi extends SupportHubApiContext {
callback) as Promise;
}
+ /**
+ * @param apiToken
+ * @param projectGuid
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getMyLibraryProjectStatus(apiToken: string, projectGuid: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param apiToken
+ * @param projectGuid
+ * @param callback The callback
+ */
+ getMyLibraryProjectStatus(apiToken: string, projectGuid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param apiToken
+ * @param projectGuid
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getMyLibraryProjectStatus(apiToken: string, projectGuid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getMyLibraryProjectStatus(apiToken: string, projectGuid: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ apiToken,
+ projectGuid,
+ options
+ },
+ getMyLibraryProjectStatusOperationSpec,
+ callback) as Promise;
+ }
+
/**
* @param apiToken JWT token
* @param [options] The optional parameters
@@ -1036,32 +1210,28 @@ class SupportHubApi extends SupportHubApiContext {
/**
* @param apiToken JWT token
* @param entityGuid
- * @param entityType Possible values include: 'Project', 'Board', 'BoardColumn', 'Card'
* @param [options] The optional parameters
* @returns Promise
*/
- getMyEntityPermissions(apiToken: string, entityGuid: string, entityType: Models.EntityType4, options?: msRest.RequestOptionsBase): Promise;
+ getMyEntityPermissions(apiToken: string, entityGuid: string, options?: msRest.RequestOptionsBase): Promise;
/**
* @param apiToken JWT token
* @param entityGuid
- * @param entityType Possible values include: 'Project', 'Board', 'BoardColumn', 'Card'
* @param callback The callback
*/
- getMyEntityPermissions(apiToken: string, entityGuid: string, entityType: Models.EntityType4, callback: msRest.ServiceCallback): void;
+ getMyEntityPermissions(apiToken: string, entityGuid: string, callback: msRest.ServiceCallback): void;
/**
* @param apiToken JWT token
* @param entityGuid
- * @param entityType Possible values include: 'Project', 'Board', 'BoardColumn', 'Card'
* @param options The optional parameters
* @param callback The callback
*/
- getMyEntityPermissions(apiToken: string, entityGuid: string, entityType: Models.EntityType4, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- getMyEntityPermissions(apiToken: string, entityGuid: string, entityType: Models.EntityType4, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ getMyEntityPermissions(apiToken: string, entityGuid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getMyEntityPermissions(apiToken: string, entityGuid: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
return this.sendOperationRequest(
{
apiToken,
entityGuid,
- entityType,
options
},
getMyEntityPermissionsOperationSpec,
@@ -1113,6 +1283,184 @@ class SupportHubApi extends SupportHubApiContext {
getRandomProjectsOperationSpec,
callback) as Promise;
}
+
+ /**
+ * @param projectGuid
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getProjectProducts(projectGuid: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param projectGuid
+ * @param callback The callback
+ */
+ getProjectProducts(projectGuid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param projectGuid
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getProjectProducts(projectGuid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getProjectProducts(projectGuid: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ projectGuid,
+ options
+ },
+ getProjectProductsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * @param apiToken JWT token
+ * @param projectGuid
+ * @param name
+ * @param description
+ * @param usdPrice
+ * @param url
+ * @param useUrl
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ postProjectProduct(apiToken: string, projectGuid: string, name: string, description: string, usdPrice: number, url: string, useUrl: string, options?: Models.SupportHubApiPostProjectProductOptionalParams): Promise;
+ /**
+ * @param apiToken JWT token
+ * @param projectGuid
+ * @param name
+ * @param description
+ * @param usdPrice
+ * @param url
+ * @param useUrl
+ * @param callback The callback
+ */
+ postProjectProduct(apiToken: string, projectGuid: string, name: string, description: string, usdPrice: number, url: string, useUrl: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param apiToken JWT token
+ * @param projectGuid
+ * @param name
+ * @param description
+ * @param usdPrice
+ * @param url
+ * @param useUrl
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ postProjectProduct(apiToken: string, projectGuid: string, name: string, description: string, usdPrice: number, url: string, useUrl: string, options: Models.SupportHubApiPostProjectProductOptionalParams, callback: msRest.ServiceCallback): void;
+ postProjectProduct(apiToken: string, projectGuid: string, name: string, description: string, usdPrice: number, url: string, useUrl: string, options?: Models.SupportHubApiPostProjectProductOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ apiToken,
+ projectGuid,
+ name,
+ description,
+ usdPrice,
+ url,
+ useUrl,
+ options
+ },
+ postProjectProductOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * @param apiToken JWT token
+ * @param productGuid
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ deleteProjectProduct(apiToken: string, productGuid: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param apiToken JWT token
+ * @param productGuid
+ * @param callback The callback
+ */
+ deleteProjectProduct(apiToken: string, productGuid: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param apiToken JWT token
+ * @param productGuid
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ deleteProjectProduct(apiToken: string, productGuid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ deleteProjectProduct(apiToken: string, productGuid: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ apiToken,
+ productGuid,
+ options
+ },
+ deleteProjectProductOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * @param apiToken JWT token
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ getMyWithdrawalRequests(apiToken: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param apiToken JWT token
+ * @param callback The callback
+ */
+ getMyWithdrawalRequests(apiToken: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param apiToken JWT token
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ getMyWithdrawalRequests(apiToken: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ getMyWithdrawalRequests(apiToken: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ apiToken,
+ options
+ },
+ getMyWithdrawalRequestsOperationSpec,
+ callback) as Promise;
+ }
+
+ /**
+ * @param apiToken JWT token
+ * @param amount
+ * @param address
+ * @param currencyType Possible values include: 'Usd', 'BitCoin', 'Ethereum', 'Erc20Token',
+ * 'Waves', 'WavesToken', 'LiteCoin'
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ postWithdrawalRequest(apiToken: string, amount: number, address: string, currencyType: Models.CurrencyType6, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param apiToken JWT token
+ * @param amount
+ * @param address
+ * @param currencyType Possible values include: 'Usd', 'BitCoin', 'Ethereum', 'Erc20Token',
+ * 'Waves', 'WavesToken', 'LiteCoin'
+ * @param callback The callback
+ */
+ postWithdrawalRequest(apiToken: string, amount: number, address: string, currencyType: Models.CurrencyType6, callback: msRest.ServiceCallback): void;
+ /**
+ * @param apiToken JWT token
+ * @param amount
+ * @param address
+ * @param currencyType Possible values include: 'Usd', 'BitCoin', 'Ethereum', 'Erc20Token',
+ * 'Waves', 'WavesToken', 'LiteCoin'
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ postWithdrawalRequest(apiToken: string, amount: number, address: string, currencyType: Models.CurrencyType6, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ postWithdrawalRequest(apiToken: string, amount: number, address: string, currencyType: Models.CurrencyType6, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.sendOperationRequest(
+ {
+ apiToken,
+ amount,
+ address,
+ currencyType,
+ options
+ },
+ postWithdrawalRequestOperationSpec,
+ callback) as Promise;
+ }
}
// Operation Specifications
@@ -1121,8 +1469,8 @@ const getLoginOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "api/v1/login",
queryParameters: [
- Parameters.email,
- Parameters.password
+ Parameters.email0,
+ Parameters.password0
],
responses: {
200: {
@@ -1133,6 +1481,39 @@ const getLoginOperationSpec: msRest.OperationSpec = {
serializer
};
+const postRegisterOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "api/v1/register",
+ queryParameters: [
+ Parameters.login,
+ Parameters.email1,
+ Parameters.password1,
+ Parameters.referralKey
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.PostRegisterOKResponse
+ },
+ default: {}
+ },
+ serializer
+};
+
+const postConfirmEmailOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "api/v1/register/confirm_email",
+ queryParameters: [
+ Parameters.confirmationKey
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.PostConfirmEmailOKResponse
+ },
+ default: {}
+ },
+ serializer
+};
+
const getGitHubLoginLinkOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "api/v1/auth/github/login_link/get",
@@ -1234,6 +1615,21 @@ const postImportRepositoryOperationSpec: msRest.OperationSpec = {
serializer
};
+const getRepoOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "api/v1/repository/get",
+ queryParameters: [
+ Parameters.repoGuid
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.GetRepoOKResponse
+ },
+ default: {}
+ },
+ serializer
+};
+
const getProjectOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "api/v1/project/get",
@@ -1255,7 +1651,7 @@ const editProjectOperationSpec: msRest.OperationSpec = {
queryParameters: [
Parameters.apiToken,
Parameters.projectGuid,
- Parameters.description
+ Parameters.description0
],
responses: {
200: {
@@ -1315,7 +1711,7 @@ const getColumnCardsOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "api/v1/board_column/cards/get",
queryParameters: [
- Parameters.columnGuid
+ Parameters.columnGuid0
],
responses: {
200: {
@@ -1342,6 +1738,45 @@ const getProjectByAliasOperationSpec: msRest.OperationSpec = {
serializer
};
+const createCardOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "api/v1/card/create",
+ queryParameters: [
+ Parameters.apiToken,
+ Parameters.columnGuid0,
+ Parameters.name0,
+ Parameters.description0,
+ Parameters.columnOrder
+ ],
+ responses: {
+ 201: {
+ bodyMapper: Mappers.CreateCardCreatedResponse
+ },
+ default: {}
+ },
+ serializer
+};
+
+const editCardOperationSpec: msRest.OperationSpec = {
+ httpMethod: "PATCH",
+ path: "api/v1/card/edit",
+ queryParameters: [
+ Parameters.apiToken,
+ Parameters.cardGuid,
+ Parameters.name1,
+ Parameters.description0,
+ Parameters.columnOrder,
+ Parameters.columnGuid1
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.EditCardOKResponse
+ },
+ default: {}
+ },
+ serializer
+};
+
const getCardWorkOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "api/v1/card/work/get",
@@ -1598,6 +2033,22 @@ const removeProjectFromMyLibraryOperationSpec: msRest.OperationSpec = {
serializer
};
+const getMyLibraryProjectStatusOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "api/v1/me/library/project/status/get",
+ queryParameters: [
+ Parameters.apiToken,
+ Parameters.projectGuid
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.GetMyLibraryProjectStatusOKResponse
+ },
+ default: {}
+ },
+ serializer
+};
+
const getMeOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "api/v1/me/get",
@@ -1696,6 +2147,92 @@ const getRandomProjectsOperationSpec: msRest.OperationSpec = {
serializer
};
+const getProjectProductsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "api/v1/project/products/get",
+ queryParameters: [
+ Parameters.projectGuid
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.GetProjectProductsOKResponse
+ },
+ default: {}
+ },
+ serializer
+};
+
+const postProjectProductOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "api/v1/project/product/new",
+ queryParameters: [
+ Parameters.apiToken,
+ Parameters.projectGuid,
+ Parameters.name0,
+ Parameters.description1,
+ Parameters.usdPrice,
+ Parameters.url,
+ Parameters.useUrl,
+ Parameters.durationHours
+ ],
+ responses: {
+ 201: {
+ bodyMapper: Mappers.PostProjectProductCreatedResponse
+ },
+ default: {}
+ },
+ serializer
+};
+
+const deleteProjectProductOperationSpec: msRest.OperationSpec = {
+ httpMethod: "DELETE",
+ path: "api/v1/project/product/delete",
+ queryParameters: [
+ Parameters.apiToken,
+ Parameters.productGuid
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.DeleteProjectProductOKResponse
+ },
+ default: {}
+ },
+ serializer
+};
+
+const getMyWithdrawalRequestsOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "api/v1/me/withdrawals/get",
+ queryParameters: [
+ Parameters.apiToken
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.GetMyWithdrawalRequestsOKResponse
+ },
+ default: {}
+ },
+ serializer
+};
+
+const postWithdrawalRequestOperationSpec: msRest.OperationSpec = {
+ httpMethod: "POST",
+ path: "api/v1/me/withdrawal/new",
+ queryParameters: [
+ Parameters.apiToken,
+ Parameters.amount,
+ Parameters.address,
+ Parameters.currencyType
+ ],
+ responses: {
+ 201: {
+ bodyMapper: Mappers.PostWithdrawalRequestCreatedResponse
+ },
+ default: {}
+ },
+ serializer
+};
+
export {
SupportHubApi,
SupportHubApiContext,
diff --git a/src/client/supportHubApiContext.ts b/src/client/supportHubApiContext.ts
index 6de629e..b4e48dd 100644
--- a/src/client/supportHubApiContext.ts
+++ b/src/client/supportHubApiContext.ts
@@ -11,12 +11,20 @@ const packageName = "";
const packageVersion = "";
export class SupportHubApiContext extends msRest.ServiceClient {
+ entityType: string;
+ currencyType?: Models.CurrencyType4;
/**
* Initializes a new instance of the SupportHubApiContext class.
+ * @param entityType Possible values include: 'ProjectCategory', 'Project', 'Board', 'Card',
+ * 'BacklogItem', 'UserBalance', 'User', 'ProjectProductPurchase', 'BoardColumn'
* @param [options] The parameter options
*/
- constructor(options?: Models.SupportHubApiOptions) {
+ constructor(entityType: string, options?: Models.SupportHubApiOptions) {
+ if (entityType == undefined) {
+ throw new Error("'entityType' cannot be null.");
+ }
+
if (!options) {
options = {};
}
@@ -28,7 +36,11 @@ export class SupportHubApiContext extends msRest.ServiceClient {
super(undefined, options);
- this.baseUri = options.baseUri || this.baseUri || "http://api.supporthub.com/api/v1";
+ this.baseUri = options.baseUri || this.baseUri || "http://api.gitcom.com/api/v1";
this.requestContentType = "application/json; charset=utf-8";
+ this.entityType = entityType;
+ if (options.currencyType !== null && options.currencyType !== undefined) {
+ this.currencyType = options.currencyType;
+ }
}
}
diff --git a/src/components/check/auth_check/AuthCheck.tsx b/src/components/check/auth_check/AuthCheck.tsx
new file mode 100644
index 0000000..602beb2
--- /dev/null
+++ b/src/components/check/auth_check/AuthCheck.tsx
@@ -0,0 +1,21 @@
+import React from "react";
+
+interface IProps {
+}
+
+interface IState {
+}
+
+class AuthCheck extends React.Component {
+ isAuthorized() {
+ return window.App.isAuthorized();
+ }
+
+ render() {
+ return
+ {this.isAuthorized() ? this.props.children : null}
+
;
+ }
+}
+
+export default AuthCheck;
diff --git a/src/components/check/permission_check/single/PermissionCheck.tsx b/src/components/check/permission_check/single/PermissionCheck.tsx
new file mode 100644
index 0000000..15c9e7f
--- /dev/null
+++ b/src/components/check/permission_check/single/PermissionCheck.tsx
@@ -0,0 +1,79 @@
+import React from "react";
+import {EntityType} from "../../../../client/models";
+import {Icon} from "antd";
+import {retryRequest} from "../../../../classes/utils/http/retryRequest";
+
+interface IProps {
+ entityGuid: string,
+ entityType: EntityType,
+ requiredPermissions: string[],
+}
+
+interface IState {
+ isLoading: boolean,
+ gotPermissions: boolean
+}
+
+class PermissionCheck extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ isLoading: true,
+ gotPermissions: false
+ }
+ }
+
+ componentDidMount(): void {
+ setTimeout(() => {
+ retryRequest(() => {
+ this.getPermissions();
+ }, () => this.state.isLoading, false);
+ }, Math.floor(Math.random() * 1000));
+ }
+
+ getPermissions() {
+ window.App.apiClient.entityType = this.props.entityType;
+ window.App.apiClient.getMyEntityPermissions(window.App.apiToken, this.props.entityGuid)
+ .then((result) =>
+ this.processGotPermissions(result._response))
+ .catch(() => this.processApiError());
+ }
+
+ processApiError() {
+ this.setState({
+ isLoading: false,
+ gotPermissions: false
+ });
+ }
+
+ processGotPermissions(response: any) {
+ let data = JSON.parse(response.bodyAsText).data;
+
+ let gotPermissions = true;
+
+ this.props.requiredPermissions.forEach((permission: string) => {
+ if (!data.permissions.includes(permission)) {
+ gotPermissions = false;
+ }
+ });
+
+ this.setState({
+ isLoading: false,
+ gotPermissions: gotPermissions
+ });
+ }
+
+ render() {
+ if (this.state.isLoading) {
+ return ;
+ }
+ if (!this.state.gotPermissions) {
+ return
;
+ }
+ return
+ {this.props.children}
+
;
+ }
+}
+
+export default PermissionCheck;
diff --git a/src/components/entity/budget/entity/EntityBudgetContent.tsx b/src/components/entity/budget/entity/EntityBudgetContent.tsx
index 25a240a..1f0431f 100644
--- a/src/components/entity/budget/entity/EntityBudgetContent.tsx
+++ b/src/components/entity/budget/entity/EntityBudgetContent.tsx
@@ -31,7 +31,8 @@ class EntityBudgetContent extends React.Component {
}
getData(): void {
- window.App.apiClient.getEntityFundingBalances(this.props.entityGuid, this.props.entityType)
+ window.App.apiClient.entityType = this.props.entityType;
+ window.App.apiClient.getEntityFundingBalances(this.props.entityGuid)
.then((result) =>
this.processResponse(result._response))
.catch((error) => handleApiError(error.response));
diff --git a/src/components/entity/card/action/create/CreateCard.tsx b/src/components/entity/card/action/create/CreateCard.tsx
new file mode 100644
index 0000000..c9c019d
--- /dev/null
+++ b/src/components/entity/card/action/create/CreateCard.tsx
@@ -0,0 +1,107 @@
+import React from "react";
+import {Button, Input, Modal, notification, Row} from "antd";
+import {CardModel, ColumnModel} from "../../../../../client/bindings";
+import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
+
+const { TextArea } = Input;
+
+interface IProps {
+ column: ColumnModel
+}
+
+interface IState {
+ showModal: boolean,
+ newCard: CardModel,
+
+ requestSent: boolean
+}
+
+class CreateCard extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ showModal: false,
+ newCard: new CardModel(),
+
+ requestSent: false
+ }
+ }
+
+ openModal() {
+ this.setState({
+ showModal: true
+ });
+ }
+
+ updateCard(field: string, value: any) {
+ let updatedCard: any = this.state.newCard;
+ updatedCard[field] = value;
+ this.setState({
+ newCard: updatedCard
+ });
+ }
+
+ createCard() {
+ window.App.apiClient.createCard(window.App.apiToken, this.props.column.guid!, this.state.newCard.name!, {
+ description: this.state.newCard.description!
+ })
+ .then((result) =>
+ this.processCardCreated(result._response))
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processCardCreated(response: any) {
+ notification['success']({
+ message: 'Card was created!',
+ description: ''
+ });
+
+ setTimeout(() => {
+ window.location.reload();
+ }, 1000);
+ }
+
+ render() {
+ return
+ Create new card}
+ visible={this.state.showModal}
+ width={window.innerWidth < 1000 ? "90%" : "30%"}
+ onCancel={() => {
+ this.setState({showModal: false})
+ }}
+ footer={null}
+ >
+
+ Name:
+ {
+ this.updateCard("name", e.target.value);
+ }} placeholder="Add new amazing feature" />
+
+ Description:
+
+
+ Create
+
+
+ Add
+
+ }
+}
+
+export default CreateCard;
\ No newline at end of file
diff --git a/src/components/entity/card/action/edit/EditCard.tsx b/src/components/entity/card/action/edit/EditCard.tsx
new file mode 100644
index 0000000..ab77cd6
--- /dev/null
+++ b/src/components/entity/card/action/edit/EditCard.tsx
@@ -0,0 +1,96 @@
+import React from "react";
+import {Button, Input, Modal, notification, Row} from "antd";
+import {CardModel} from "../../../../../client/bindings";
+import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
+
+const { TextArea } = Input;
+
+interface IProps {
+ card: CardModel
+}
+
+interface IState {
+ updatedCard: CardModel
+ showModal: boolean
+}
+
+class EditCard extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ showModal: false,
+ updatedCard: this.props.card
+ }
+ }
+
+ updateCard(field: string, value: any) {
+ let updatedCard: any = this.state.updatedCard;
+ updatedCard[field] = value;
+ this.setState({
+ updatedCard
+ });
+ }
+
+ updateCardRequest() {
+ window.App.apiClient.editCard(window.App.apiToken, this.props.card.guid!, this.state.updatedCard)
+ .then((result) =>
+ this.processCardUpdated(result._response))
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processCardUpdated(response: any) {
+ notification['success']({
+ message: 'Card updated!'
+ });
+ this.setState({showModal: false});
+ }
+
+ render() {
+ return
+ Edit card}
+ visible={this.state.showModal}
+ width={window.innerWidth < 1000 ? "90%" : "30%"}
+ onCancel={() => {
+ this.setState({showModal: false})
+ }}
+ footer={null}
+ >
+
+ Name:
+ {
+ this.updateCard("name", e.target.value);
+ }}
+ placeholder="Add new amazing feature"
+ defaultValue={this.props.card.name}
+ />
+
+ Description:
+
+
+ Update
+
+
+ { this.setState({showModal: true}); }}
+ >Edit
+
;
+ }
+}
+
+export default EditCard;
diff --git a/src/components/entity/card/action/move/MoveCard.tsx b/src/components/entity/card/action/move/MoveCard.tsx
new file mode 100644
index 0000000..e4b302f
--- /dev/null
+++ b/src/components/entity/card/action/move/MoveCard.tsx
@@ -0,0 +1,134 @@
+import {BoardModel, CardModel, ColumnModel} from "../../../../../client/bindings";
+import React from "react";
+import {Button, Icon, notification, Row, Select} from "antd";
+import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
+
+const { Option } = Select;
+
+interface IProps {
+ parentBoard: BoardModel|null,
+ card: CardModel
+}
+
+interface IState {
+ boardColumns: ColumnModel[]|null
+ selectedColumnGuid: string|null,
+
+ isSelected: boolean,
+
+ requestSent: boolean,
+
+ columnsLoaded: boolean,
+ cardMoved: boolean
+}
+
+class MoveCard extends React.Component {
+ public static defaultProps = {
+ parentBoard: null
+ };
+
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ boardColumns: null,
+
+ isSelected: false,
+ columnsLoaded: false,
+ selectedColumnGuid: null,
+
+ requestSent: false,
+
+ cardMoved: true
+ }
+ }
+
+ getBoardColumns(): void {
+ if (!this.props.parentBoard) {
+ console.log('exit!');
+ return;
+ }
+ window.App.apiClient.getBoardColumns(this.props.parentBoard!.guid!)
+ .then((result) =>
+ this.processGetBoardColumns(result._response))
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processGetBoardColumns(response: any) {
+ let json = JSON.parse(response.bodyAsText);
+ this.setState({
+ boardColumns: json.data.board_columns,
+ selectedColumnGuid: json.data.board_columns[0].guid,
+ columnsLoaded: true,
+ });
+ }
+
+ buttonClicked() {
+ this.setState({
+ isSelected: true
+ });
+ this.getBoardColumns();
+ }
+
+ selectColumn(guid: string) {
+ this.setState({
+ selectedColumnGuid: guid
+ });
+ }
+
+ moveCardRequest() {
+ if (!this.state.selectedColumnGuid) {
+ return;
+ }
+ window.App.apiClient.editCard(window.App.apiToken, this.props.card.guid!, {
+ columnGuid: this.state.selectedColumnGuid!
+ })
+ .then((result) =>
+ this.processCardUpdated())
+ .catch((error) => handleApiError(error.response));
+ this.setState({
+ requestSent: true
+ });
+ }
+
+ processCardUpdated() {
+ notification['success']({
+ message: 'Card updated!',
+ description: ''
+ });
+ setTimeout(() => {
+ window.location.reload();
+ }, 1500);
+ }
+
+ render() {
+ if (!this.state.isSelected) {
+ return Move ;
+ }
+ if (!this.state.columnsLoaded || !this.state.boardColumns) {
+ return ;
+ }
+ return
+ Select column:
+
+ {this.state.boardColumns!.map((column: ColumnModel) => {
+ return {column.name} ;
+ })}
+
+ Move
+
;
+ }
+}
+
+export default MoveCard;
diff --git a/src/components/entity/card/single/card/CardCard.tsx b/src/components/entity/card/single/card/CardCard.tsx
index a733f25..718e96b 100644
--- a/src/components/entity/card/single/card/CardCard.tsx
+++ b/src/components/entity/card/single/card/CardCard.tsx
@@ -1,14 +1,19 @@
import React from 'react';
import {Card, Col, Icon, Modal, Popover, Row} from "antd";
-import {CardModel} from "../../../../../client/bindings";
import styles from './styles.module.css';
import EntityBudgetContent from "../../../budget/entity/EntityBudgetContent";
import CardSubmitWorkBlock from "../../../work/single/submit/CardSubmitWorkBlock";
import CardWorkBlock from "../../../work/many/view/CardWorkBlock";
import NewInvoice from "../../../invoice/single/create/NewInvoice";
+import MoveCard from "../../action/move/MoveCard";
+import {BoardModel, CardModel} from "../../../../../client/bindings";
+import PermissionCheck from "../../../../check/permission_check/single/PermissionCheck";
+import EditCard from "../../action/edit/EditCard";
+import AuthCheck from "../../../../check/auth_check/AuthCheck";
interface IProps {
- card: CardModel
+ parentBoard: BoardModel|null,
+ card: CardModel,
}
interface IState {
@@ -17,6 +22,10 @@ interface IState {
}
class CardCard extends React.Component {
+ public static defaultProps = {
+ parentBoard: null
+ };
+
constructor(props: IProps) {
super(props);
this.state = {
@@ -25,10 +34,21 @@ class CardCard extends React.Component {
}
}
+ componentDidMount(): void {
+ let selectedCardGuid = new URL(window.location.href).searchParams.get('card');
+ if (selectedCardGuid === this.props.card.guid) {
+ this.setState(({
+ showModal: true
+ }));
+ }
+ }
+
cardOnClick() {
this.setState({
showModal: !this.state.showModal
});
+ let newUrl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?card=' + this.props.card.guid;
+ window.history.pushState({path:newUrl},'',newUrl);
}
render() {
@@ -54,7 +74,20 @@ class CardCard extends React.Component {
}}
footer={null}
>
- Content
+
+
+ Actions:
+
+
+
+
+
+
+
{card.description ? card.description : "no content"}
@@ -73,8 +106,16 @@ class CardCard extends React.Component {
-
-
+
+
+
+
Submitted work
diff --git a/src/components/entity/column/single/card/ColumnCard.tsx b/src/components/entity/column/single/card/ColumnCard.tsx
index 7cf591b..8ea9ee1 100644
--- a/src/components/entity/column/single/card/ColumnCard.tsx
+++ b/src/components/entity/column/single/card/ColumnCard.tsx
@@ -1,11 +1,15 @@
import React from 'react';
-import {Card, Divider, Icon} from "antd";
-import {CardModel, ColumnModel} from "../../../../../client/bindings";
+import {Card, Divider, Icon, Row} from "antd";
+import {BoardModel, CardModel, ColumnModel} from "../../../../../client/bindings";
import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
import styles from './styles.module.css';
import CardCard from "../../../card/single/card/CardCard";
+import {Link} from "react-router-dom";
+import PermissionCheck from "../../../../check/permission_check/single/PermissionCheck";
+import CreateCard from "../../../card/action/create/CreateCard";
interface IProps {
+ parentBoard: BoardModel|null,
column: ColumnModel
}
@@ -53,17 +57,26 @@ class ColumnCard extends React.Component {
render() {
return (
- {this.props.column.name}
+ {this.props.column.name}
-
{!this.state.isLoaded ?
: null}
{this.state.cards != null && this.state.cards.map((card: CardModel, i: number) => {
return
-
+
+
+
;
})}
+
+
+
+
);
}
diff --git a/src/components/entity/invoice/single/create/NewInvoice.tsx b/src/components/entity/invoice/single/create/NewInvoice.tsx
index 3d109b6..4f38cf9 100644
--- a/src/components/entity/invoice/single/create/NewInvoice.tsx
+++ b/src/components/entity/invoice/single/create/NewInvoice.tsx
@@ -1,15 +1,24 @@
import React, {SyntheticEvent} from "react";
-import {CardModel, InvoiceModel} from "../../../../../client/bindings";
+import {InvoiceModel} from "../../../../../client/bindings";
import {Button, Col, Input, Modal, notification, Row, Select} from "antd";
import CurrencyType from "../../../../../enum/CurrencyType";
import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
import InvoiceContent from "../view/content/InvoiceContent";
import WarningBlock from "../../../../info/payment/WarningBlock/WarningBlock";
+import {EntityType} from "../../../../../client/models";
const { Option } = Select;
interface IProps {
- card: CardModel
+ modalLabel: string,
+ entityGuid: string,
+ entityType: EntityType,
+ buttonLabel: string,
+ buttonIcon: string,
+ defaultAmount: number,
+ defaultCurrency: string|null,
+
+ showAmountField: boolean
}
interface IState {
@@ -23,6 +32,15 @@ interface IState {
}
class NewInvoice extends React.Component {
+ public static defaultProps = {
+ buttonLabel: "Buy",
+ buttonIcon: "dollar",
+ defaultAmount: 0,
+ defaultCurrency: 'Usd',
+
+ showAmountField: true
+ };
+
constructor(props: IProps) {
super(props);
this.state = {
@@ -109,11 +127,16 @@ class NewInvoice extends React.Component {
}
submitInvoice(): void {
- let selectedCurrency : any = CurrencyType[this.state.selectedCurrency!];
- window.App.apiClient.postInvoice(window.App.apiToken, this.props.card.guid!, 'Card', 0.01, selectedCurrency)
+ const selectedCurrency: any = CurrencyType[this.state.selectedCurrency!];
+ window.App.apiClient.entityType = this.props.entityType;
+ window.App.apiClient.postInvoice(
+ window.App.apiToken, this.props.entityGuid, parseFloat(this.state.currencyAmount.toString()), selectedCurrency)
.then((result) =>
this.processPostInvoice(result._response))
- .catch((error) => this.handleApiError(error.response));
+ .catch((error) => {
+ console.error(error);
+ this.handleApiError(error.response)
+ });
}
handleApiError(response: any) {
@@ -149,11 +172,11 @@ class NewInvoice extends React.Component {
}
render() {
- const currencyTypes = this.getCurrencyTypes();
-
return
Invoice}
+ title={
+ Invoice {this.state.invoice && this.state.invoice!.guid ? `#${this.state.invoice.guid}` : null}
+ }
visible={this.state.showInvoiceModal}
width={window.innerWidth < 1000 ? "90%" : "30%"}
onCancel={() => {
@@ -165,7 +188,7 @@ class NewInvoice extends React.Component {
{this.state.invoice ? : null}
Task funding}
+ title={{this.props.modalLabel} }
visible={this.state.showModal}
width={window.innerWidth < 1000 ? "90%" : "30%"}
onCancel={() => {
@@ -186,7 +209,7 @@ class NewInvoice extends React.Component {
}}
onSelect={(value) => this.onCurrencySelected(value)}
>
- {currencyTypes.map((option: any, i: number) => {
+ {this.getCurrencyTypes().map((option: any, i: number) => {
return {option.name} ;
})}
@@ -195,21 +218,27 @@ class NewInvoice extends React.Component {
-
-
- Amount:
-
-
-
-
-
+ {
+ this.props.showAmountField ?
+
+
+ Amount:
+
+
+
+
+
: null
+ }
Support
@@ -217,8 +246,8 @@ class NewInvoice extends React.Component {
-
- Fund this task!
+
+ {this.props.buttonLabel}
;
diff --git a/src/components/entity/invoice/single/view/content/InvoiceContent.tsx b/src/components/entity/invoice/single/view/content/InvoiceContent.tsx
index 579c746..719aea4 100644
--- a/src/components/entity/invoice/single/view/content/InvoiceContent.tsx
+++ b/src/components/entity/invoice/single/view/content/InvoiceContent.tsx
@@ -45,6 +45,12 @@ class InvoiceContent extends React.Component {
processPatchInvoiceResponse(response: any) {
let json = JSON.parse(response.bodyAsText);
+ if (json.data.invoice.status === 'RequiresConfirmation') {
+ notification['success']({
+ message: 'Invoice payment is pending, it could take up to 24 hours to be confirmed, thanks for your patience'
+ });
+ }
+
this.setState({
isLoaded: true,
invoice: json.data.invoice
diff --git a/src/components/entity/my_library/many/MyLibraryItems.tsx b/src/components/entity/my_library/many/MyLibraryItems.tsx
index a7ed034..287f9ac 100644
--- a/src/components/entity/my_library/many/MyLibraryItems.tsx
+++ b/src/components/entity/my_library/many/MyLibraryItems.tsx
@@ -49,7 +49,7 @@ class MyLibraryItems extends React.Component {
{this.state.items.length === 0 ? Your library is empty
: null}
{this.state.items.map((item: LibraryItem, i: number) => {
- return
+ return
;
})}
diff --git a/src/components/entity/my_library/single/action/AddToLibrary.tsx b/src/components/entity/my_library/single/action/AddToLibrary.tsx
new file mode 100644
index 0000000..97e272f
--- /dev/null
+++ b/src/components/entity/my_library/single/action/AddToLibrary.tsx
@@ -0,0 +1,70 @@
+import React from "react";
+import {Button, notification} from "antd";
+import {ProjectModel} from "../../../../../client/bindings";
+import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
+
+interface IProps {
+ project: ProjectModel
+}
+
+interface IState {
+ alreadyAdded: boolean
+}
+
+class AddToLibrary extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ alreadyAdded: false
+ }
+ }
+
+ componentDidMount(): void {
+ this.getLibraryStatus();
+ }
+
+ getLibraryStatus() {
+ window.App.apiClient.getMyLibraryProjectStatus(window.App.apiToken, this.props.project.guid!)
+ .then((res) => this.processLibraryStatus(res._response))
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processLibraryStatus(res: any) {
+ let json = JSON.parse(res.bodyAsText);
+ this.setState({alreadyAdded: json.data.status.in_library})
+ }
+
+ addToMyLibrary() {
+ window.App.apiClient.addProjectToMyLibrary(window.App.apiToken, this.props.project.guid!)
+ .then(() => this.processProjectAdded())
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processProjectAdded() {
+ notification['success']({
+ message: 'Project was added to your library!'
+ });
+ this.setState({
+ alreadyAdded: true
+ });
+ }
+
+ render() {
+ return
+ {this.state.alreadyAdded ?
+ In library :
+ Add to library
+ }
+
;
+ }
+}
+
+export default AddToLibrary;
diff --git a/src/components/entity/my_library/single/card/ItemCard.tsx b/src/components/entity/my_library/single/card/ItemCard.tsx
index ddc95ce..4d6c43d 100644
--- a/src/components/entity/my_library/single/card/ItemCard.tsx
+++ b/src/components/entity/my_library/single/card/ItemCard.tsx
@@ -5,6 +5,7 @@ import {handleApiError} from "../../../../../classes/notification/errorHandler/e
import {Button, notification, Row} from "antd";
import ProjectInfo from "../../../project/single/info/ProjectInfo";
import {Link} from "react-router-dom";
+import {retryRequest} from "../../../../../classes/utils/http/retryRequest";
interface IProps {
item: LibraryItem
@@ -25,7 +26,9 @@ class ItemCard extends React.Component {
}
componentDidMount(): void {
- this.getProject();
+ retryRequest(() => {
+ this.getProject();
+ }, () => this.state.project !== null, true);
}
getProject(): void {
diff --git a/src/components/entity/product/action/delete/DeleteProductButton.tsx b/src/components/entity/product/action/delete/DeleteProductButton.tsx
new file mode 100644
index 0000000..699809a
--- /dev/null
+++ b/src/components/entity/product/action/delete/DeleteProductButton.tsx
@@ -0,0 +1,47 @@
+import React from "react";
+import {ProjectProduct} from "../../../../../client/bindings";
+import {Button, notification, Row} from "antd";
+import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
+
+interface IProps {
+ product: ProjectProduct
+}
+
+interface IState {
+ isLoading: boolean
+}
+
+class DeleteProductButton extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ isLoading: false,
+ }
+ }
+
+ sendDeleteRequest() {
+ window.App.apiClient.deleteProjectProduct(window.App.apiToken, this.props.product.guid!)
+ .then(() => {
+ notification['warning']({
+ message: 'Product was deleted'
+ });
+ setTimeout(() => { window.location.reload(); }, 1500);
+ })
+ .catch((error) => handleApiError(error.response));
+ }
+
+ render() {
+ return
+
+ 0}
+ >Delete
+
+
+ }
+}
+
+export default DeleteProductButton;
diff --git a/src/components/entity/product/action/new/NewProductButton.tsx b/src/components/entity/product/action/new/NewProductButton.tsx
new file mode 100644
index 0000000..24e15be
--- /dev/null
+++ b/src/components/entity/product/action/new/NewProductButton.tsx
@@ -0,0 +1,196 @@
+import React, {SyntheticEvent} from "react";
+import {Button, Col, Input, Modal, notification, Row, Switch} from "antd";
+import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
+
+const { TextArea } = Input;
+
+interface IProps {
+ projectGuid: string
+}
+
+interface IState {
+ showModal: boolean,
+ isLoading: boolean,
+ form: {
+ name: string,
+ description: string,
+ amount: number,
+ url: string,
+ use_url: string,
+ duration_hours: number
+ }
+}
+
+class NewProductButton extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ showModal: false,
+ isLoading: false,
+ form: {
+ name: 'Pro edition',
+ description: 'product description',
+ amount: 0,
+ url: '',
+ use_url: '',
+ duration_hours: 0
+ }
+ }
+ }
+
+ updateForm(field: string, val: string) {
+ let form: any = this.state.form;
+ form[field] = val;
+ this.setState({form});
+ }
+
+ updatedAmount(e: SyntheticEvent) {
+ const target: any = e.target;
+
+ const floatVal = parseFloat(target.value);
+
+ if (floatVal <= 0) return;
+
+ let form = this.state.form;
+ form.amount = floatVal;
+ this.setState({form});
+ }
+
+ createProduct() {
+ let form = this.state.form;
+ window.App.apiClient.postProjectProduct(
+ window.App.apiToken!, this.props.projectGuid, form.name, form.description, form.amount, form.url, form.use_url, {
+ durationHours: this.state.form.duration_hours
+ }
+ )
+ .then(() => {
+ notification['success']({
+ message: 'Product was created successfully!'
+ });
+ this.setState({showModal: false});
+ setTimeout(() => {
+ window.location.reload();
+ }, 1500);
+ })
+ .catch((error) => {
+ try {
+ notification['error']({
+ message: JSON.parse(error.response.body).errors[0].message
+ });
+ } catch (e) {
+ handleApiError(error.response);
+ }
+ });
+ }
+
+ render() {
+ return ;
+ }
+}
+
+export default NewProductButton;
diff --git a/src/components/entity/product/pricing_block/single/PricingBlock.tsx b/src/components/entity/product/pricing_block/single/PricingBlock.tsx
new file mode 100644
index 0000000..56dadb2
--- /dev/null
+++ b/src/components/entity/product/pricing_block/single/PricingBlock.tsx
@@ -0,0 +1,59 @@
+import React from "react";
+import {Button, Card, Divider} from "antd";
+import AuthCheck from "../../../../check/auth_check/AuthCheck";
+import NewInvoice from "../../../invoice/single/create/NewInvoice";
+
+interface IProps {
+ guid: string,
+ title: string,
+ price: number,
+ description: string,
+ url: string|null,
+ subscription: boolean,
+ showActionButton: boolean,
+}
+
+interface IState {
+}
+
+class PricingBlock extends React.Component {
+ public static defaultProps = {
+ url: null,
+ subscription: false,
+ showActionButton: true,
+ };
+
+ getSubscriptionLabel() {
+ return this.props.subscription ? " per month" : null
+ }
+
+ render() {
+ return
+ {this.props.title}
+
+ {
+ this.props.price > 0 ?
+ Price: {this.props.price}$ {this.getSubscriptionLabel()}
:
+ Open source & free
+ }
+ {this.props.description}
+ {
+ this.props.url ?
+ Info
+ : null
+ }
+ { this.props.showActionButton ?
+
+
+ : null
+ }
+ ;
+ }
+}
+
+export default PricingBlock;
\ No newline at end of file
diff --git a/src/components/entity/project/many/cards_list/ProjectCardList.tsx b/src/components/entity/project/many/cards_list/ProjectCardList.tsx
index bd5da1f..d013d6f 100644
--- a/src/components/entity/project/many/cards_list/ProjectCardList.tsx
+++ b/src/components/entity/project/many/cards_list/ProjectCardList.tsx
@@ -1,8 +1,9 @@
import React from "react";
import {ProjectModel} from "../../../../../client/bindings";
import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
-import {Col, Row} from "antd";
+import {Col, Icon, Row} from "antd";
import ProjectCard from "../../single/card/ProjectCard";
+import {retryRequest} from "../../../../../classes/utils/http/retryRequest";
interface IProps {
label: string,
@@ -24,9 +25,9 @@ class ProjectCardList extends React.Component {
}
componentDidMount(): void {
- setTimeout(() => {
+ retryRequest(() => {
this.getProjects();
- }, Math.floor(Math.random() * 1000));
+ }, () => this.state.isLoaded, true);
}
getProjects() {
@@ -59,13 +60,16 @@ class ProjectCardList extends React.Component {
return
{this.props.label}
-
- {projectsList && projectsList.map((project: ProjectModel, i: number) => {
- return
-
- ;
- })}
-
+ { this.state.isLoaded ?
+
+ {projectsList && projectsList.map((project: ProjectModel, i: number) => {
+ return
+
+ ;
+ })}
+
:
+
+ }
;
}
}
diff --git a/src/components/entity/project/single/card/ProjectCard.tsx b/src/components/entity/project/single/card/ProjectCard.tsx
index 2678292..d126f96 100644
--- a/src/components/entity/project/single/card/ProjectCard.tsx
+++ b/src/components/entity/project/single/card/ProjectCard.tsx
@@ -12,10 +12,6 @@ interface IState {
}
class ProjectCard extends React.Component {
- constructor(props: IProps) {
- super(props);
- }
-
render() {
return
diff --git a/src/components/entity/project/single/info/ProjectInfo.tsx b/src/components/entity/project/single/info/ProjectInfo.tsx
index f0f7682..bca8927 100644
--- a/src/components/entity/project/single/info/ProjectInfo.tsx
+++ b/src/components/entity/project/single/info/ProjectInfo.tsx
@@ -1,8 +1,9 @@
import React from 'react';
import {ProjectModel} from "../../../../../client/bindings";
import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
-import {Button, Divider, Icon, Row} from "antd";
+import {Button, Icon, Row} from "antd";
import moment from "moment";
+import {retryRequest} from "../../../../../classes/utils/http/retryRequest";
interface IProps {
guid: string|null,
@@ -36,8 +37,11 @@ class ProjectInfo extends React.Component {
project: this.props.project
});
return;
+ } else {
+ retryRequest(() => {
+ this.getProject();
+ }, () => this.state.isLoaded, true);
}
- this.getProject();
}
getProject() {
@@ -54,6 +58,8 @@ class ProjectInfo extends React.Component {
isLoaded: true,
project: json.data.project
});
+
+ console.log('state UPDATD!');
}
render() {
@@ -66,14 +72,14 @@ class ProjectInfo extends React.Component {
return
{project.name!}
-
+
{project.description!}
-
+
Created: {moment(project.created_at).format('MMMM Do YYYY')}
- ?
+ {project.stars_count}
;
}
diff --git a/src/components/entity/repository/card/ProjectRepoCard.tsx b/src/components/entity/repository/card/ProjectRepoCard.tsx
new file mode 100644
index 0000000..322d9ff
--- /dev/null
+++ b/src/components/entity/repository/card/ProjectRepoCard.tsx
@@ -0,0 +1,20 @@
+import React from "react";
+import {ProjectModel} from "../../../../client/bindings";
+
+interface IProps {
+ project: ProjectModel
+}
+
+interface IState {
+}
+
+class ProjectRepoCard extends React.Component {
+ componentDidMount(): void {
+ }
+
+ render() {
+ return
;
+ }
+}
+
+export default ProjectRepoCard;
\ No newline at end of file
diff --git a/src/components/entity/withdrawal/action/new/NewWithdrawalButton.tsx b/src/components/entity/withdrawal/action/new/NewWithdrawalButton.tsx
new file mode 100644
index 0000000..341a8b4
--- /dev/null
+++ b/src/components/entity/withdrawal/action/new/NewWithdrawalButton.tsx
@@ -0,0 +1,114 @@
+import React from "react";
+import {Button, Col, Input, Modal, notification, Row, Select} from "antd";
+import {CurrencyType} from "../../../../../client/models";
+import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
+
+const { Option } = Select;
+
+interface IProps {
+}
+
+interface IState {
+ showModal: boolean,
+ form: {
+ address: string,
+ amount: number,
+ currency_type: CurrencyType
+ }
+}
+
+class NewWithdrawalButton extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ showModal: false,
+ form: {
+ address: "",
+ amount: 0.01,
+ currency_type: "Usd"
+ }
+ };
+ }
+
+ allowedCurrencyTypes(): string[] {
+ return ["Usd", "BitCoin", "LiteCoin", "Waves", "Ethereum"];
+ }
+
+ updateForm(field: string, val: any) {
+ let form: any = this.state.form;
+ form[field] = val;
+ this.setState({form});
+ }
+
+ sendWithdrawalRequest() {
+ let form = this.state.form;
+ window.App.apiClient.postWithdrawalRequest(window.App.apiToken, form.amount, form.address, form.currency_type)
+ .then(() => {
+ notification['success']({
+ message: 'Withdrawal request was created'
+ });
+ this.setState({showModal: false});
+ setTimeout(() => { window.location.reload(); }, 1500);
+ })
+ .catch((error) => handleApiError(error.response));
+ }
+
+ render() {
+ return
+ New withdrawal request}
+ visible={this.state.showModal}
+ width={window.innerWidth < 1000 ? "90%" : "40%"}
+ onCancel={() => {
+ this.setState({showModal: false})
+ }}
+ footer={null}
+ >
+
+ Withdraw address
+
+ {this.updateForm('address', e.target.value)}}
+ placeholder={"Your paypal email or selected cryptocurrency address"}
+ />
+
+
+
+ Amount
+
+ {this.updateForm('amount', parseFloat(e.target.value))}}
+ defaultValue={'0.01'}
+ />
+
+
+
+ Currency type
+
+ {this.updateForm('currency_type', e)}}
+ >
+ {this.allowedCurrencyTypes().map((allowedValue: string) => {
+ return {allowedValue} ;
+ })}
+
+
+
+
+ Create
+
+
+ {this.setState({showModal: true})}}
+ >New withdrawal
+
+ }
+}
+
+export default NewWithdrawalButton;
diff --git a/src/components/entity/withdrawal/many/meList/MyWithdrawalsList.tsx b/src/components/entity/withdrawal/many/meList/MyWithdrawalsList.tsx
new file mode 100644
index 0000000..5b7cf4b
--- /dev/null
+++ b/src/components/entity/withdrawal/many/meList/MyWithdrawalsList.tsx
@@ -0,0 +1,79 @@
+import React from "react";
+import {WithdrawalRequest} from "../../../../../client/bindings";
+import {Icon, Table} from "antd";
+import {ColumnProps} from "antd/es/table";
+import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
+
+interface IProps {
+}
+
+interface IState {
+ isLoaded: boolean,
+ withdrawals: WithdrawalRequest[]|null
+}
+
+class MyWithdrawalsList extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ isLoaded: false,
+ withdrawals: null
+ }
+ }
+
+ componentDidMount(): void {
+ window.App.apiClient.getMyWithdrawalRequests(window.App.apiToken)
+ .then((res) => {
+ let json = JSON.parse(res._response.bodyAsText);
+ json.data.withdraw_requests = json.data.withdraw_requests.map((item: any) => {
+ item.key = `withdraw_request_${item.guid}`;
+ return item;
+ });
+ this.setState({
+ isLoaded: true,
+ withdrawals: json.data.withdraw_requests
+ });
+ })
+ .catch((error) => handleApiError(error.response));
+ }
+
+ render() {
+ if (!this.state.isLoaded) return ;
+
+ const tableColumns: ColumnProps[] = [
+ {
+ title: 'Id',
+ dataIndex: 'guid'
+ },
+ {
+ title: 'Address',
+ dataIndex: 'address'
+ },
+ {
+ title: 'Currency',
+ dataIndex: 'currency_type'
+ },
+ {
+ title: 'Amount',
+ dataIndex: 'amount'
+ },
+ {
+ title: 'Is paid',
+ dataIndex: 'paid',
+ render: isPaid => isPaid ? 'Paid' : 'Waiting for confirmation',
+ },
+ {
+ title: 'Date',
+ dataIndex: 'created_at',
+ defaultSortOrder: 'descend',
+ sorter: (a: any, b: any) => new Date(a.created_at).getTime() - new Date(b.created_at).getTime(),
+ }
+ ];
+
+ return
+
+
+ }
+}
+
+export default MyWithdrawalsList;
diff --git a/src/components/external/auth/facebookButton/FacebookLoginButton.tsx b/src/components/external/auth/facebookButton/FacebookLoginButton.tsx
index d0fbdef..de445d6 100644
--- a/src/components/external/auth/facebookButton/FacebookLoginButton.tsx
+++ b/src/components/external/auth/facebookButton/FacebookLoginButton.tsx
@@ -1,6 +1,7 @@
import React from "react";
-import FacebookLogin from 'react-facebook-login';
import {Button} from "antd";
+import {handleApiError} from "../../../../classes/notification/errorHandler/errorHandler";
+import { Redirect } from 'react-router';
interface IProps {
classNames: string
@@ -9,6 +10,7 @@ interface IProps {
interface IState {
clicked: boolean,
loading: boolean,
+ redirectHome: boolean,
loggedIn: boolean,
accessToken: string|null
@@ -24,6 +26,7 @@ class FacebookLoginButton extends React.Component {
this.state = {
clicked: false,
loading: false,
+ redirectHome: false,
loggedIn: false,
accessToken: null
@@ -35,9 +38,22 @@ class FacebookLoginButton extends React.Component {
loggedIn: true,
accessToken: data.accessToken
});
- console.log(this.state.accessToken);
+ this.loginViaFacebook();
};
+ loginViaFacebook() {
+ window.App.apiClient.loginViaFacebook(this.state.accessToken!)
+ .then((result) =>
+ this.processFacebookLoginRes(result._response))
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processFacebookLoginRes(res: any) {
+ let json = JSON.parse(res.bodyAsText);
+ window.App.setApiToken(json.data.token);
+ this.setState({redirectHome: true});
+ }
+
buttonClicked() {
this.setState({
clicked: true,
@@ -48,15 +64,19 @@ class FacebookLoginButton extends React.Component {
render() {
let facebookBlock = null;
+ if (this.state.redirectHome) {
+ return ;
+ }
+
if (this.state.clicked) {
facebookBlock =
-
+ {/* */}
;
}
diff --git a/src/components/link/withChecks/PermissionCheckLink.tsx b/src/components/link/withChecks/PermissionCheckLink.tsx
index 8f9e974..bcb2f49 100644
--- a/src/components/link/withChecks/PermissionCheckLink.tsx
+++ b/src/components/link/withChecks/PermissionCheckLink.tsx
@@ -1,13 +1,12 @@
import React from "react";
import {Link} from "react-router-dom";
import {Button, Icon} from "antd";
-import {handleApiError} from "../../../classes/notification/errorHandler/errorHandler";
-import {EntityType4} from "../../../client/models";
+import {EntityType} from "../../../client/models";
interface IProps {
label: string,
entityGuid: string,
- entityType: EntityType4,
+ entityType: EntityType,
requiredPermissions: string[],
icon: string|null,
url: string
@@ -38,7 +37,8 @@ class PermissionCheckLink extends React.Component {
}
getPermissions() {
- window.App.apiClient.getMyEntityPermissions(window.App.apiToken, this.props.entityGuid, this.props.entityType)
+ window.App.apiClient.entityType = this.props.entityType;
+ window.App.apiClient.getMyEntityPermissions(window.App.apiToken, this.props.entityGuid)
.then((result) =>
this.processGotPermissions(result._response))
.catch(() => this.processApiError());
diff --git a/src/components/sidebar/entity/project/view/ProjectViewSidebar.tsx b/src/components/sidebar/entity/project/view/ProjectViewSidebar.tsx
index d498a1f..18f6083 100644
--- a/src/components/sidebar/entity/project/view/ProjectViewSidebar.tsx
+++ b/src/components/sidebar/entity/project/view/ProjectViewSidebar.tsx
@@ -4,15 +4,21 @@ import {Link} from "react-router-dom";
const { Sider } = Layout;
-class ProjectViewSidebar extends React.Component {
+interface IProps {
+}
+
+interface IState {
+}
+
+class ProjectViewSidebar extends React.Component {
static getActiveMenuKeys(): string[] {
- switch (window.location.pathname) {
- case "/home":
- return ["home"];
- case "/account":
- return ["sub1", "account"];
- }
- return [];
+ if (window.location.pathname.includes('/pricing')) return ["pricing"];
+ return ["home"];
+ }
+
+ getPath() {
+ let path = window.location.pathname.split("/");
+ return `/${path[1]}/${path[2]}`;
}
render() {
@@ -24,11 +30,11 @@ class ProjectViewSidebar extends React.Component {
defaultOpenKeys={ProjectViewSidebar.getActiveMenuKeys()}
style={{height: '100%', borderRight: 0}}
>
-
- Team
+
+ Project home
-
- Settings
+
+ Pricing
diff --git a/src/components/sidebar/home/HomeSidebar.tsx b/src/components/sidebar/home/HomeSidebar.tsx
index 0b59bc3..7d0ee6b 100644
--- a/src/components/sidebar/home/HomeSidebar.tsx
+++ b/src/components/sidebar/home/HomeSidebar.tsx
@@ -9,13 +9,15 @@ class HomeSidebar extends React.Component {
static getActiveMenuKeys(): string[] {
switch (window.location.pathname) {
case "/account":
- return ["sub1", "account"];
+ return ["account_sub", "account"];
case "/account/billing":
- return ["sub1", "billing"];
+ return ["account_sub", "billing"];
case "/account/settings":
- return ["sub1", "settings"];
+ return ["account_sub", "settings"];
case "/account/subscription":
- return ["sub1", "subscription"];
+ return ["account_sub", "subscription"];
+ case "/account/withdrawals":
+ return ["account_sub", "withdrawals"];
case "/home/integrations":
return ["integrations"];
@@ -39,7 +41,7 @@ class HomeSidebar extends React.Component {
My library
Account}
className={"text-left"}
>
@@ -52,6 +54,9 @@ class HomeSidebar extends React.Component {
Subscription
+
+ Withdrawals
+
Integrations
diff --git a/src/layouts/404/NotFoundLayout.tsx b/src/layouts/404/NotFoundLayout.tsx
new file mode 100644
index 0000000..d74c1b0
--- /dev/null
+++ b/src/layouts/404/NotFoundLayout.tsx
@@ -0,0 +1,34 @@
+import React from "react";
+import FullContainerPage from "../../components/layout/simple/fullpage/FullContainerPage";
+import {Button, Card, Col, Icon, Row} from "antd";
+import styles from "../auth/login/styles.module.css";
+import {Link} from "react-router-dom";
+
+interface IProps {
+}
+
+interface IState {
+}
+
+class NotFoundLayout extends React.Component {
+ render() {
+ return (
+
+
+
+
+ Page not found
+
+
+ {window.App.isAuthorized() ? "Go to home" : "Go to index page"}
+
+
+
+
+
+
+ );
+ }
+}
+
+export default NotFoundLayout;
diff --git a/src/layouts/account/withdrawals/WithdrawalsLayout.tsx b/src/layouts/account/withdrawals/WithdrawalsLayout.tsx
new file mode 100644
index 0000000..8055732
--- /dev/null
+++ b/src/layouts/account/withdrawals/WithdrawalsLayout.tsx
@@ -0,0 +1,35 @@
+import React from "react";
+import FullPageWithSideBar from "../../../components/layout/simple/fullpagewithsidebar/FullPageWithSidebar";
+import UserBalanceCard from "../../../components/entity/user_balance/single/card/UserBalanceCard";
+import MyWithdrawalsList from "../../../components/entity/withdrawal/many/meList/MyWithdrawalsList";
+import {Row} from "antd";
+import NewWithdrawalButton from "../../../components/entity/withdrawal/action/new/NewWithdrawalButton";
+
+interface IProps {
+}
+
+interface IState {
+}
+
+class WithdrawalsLayout extends React.Component {
+ render() {
+ return
+ Withdrawal requests
+
+ Account balance
+
+
+
+ Note: there are 5% withdrawal fee for all users & developers
+
+
+
+
+
+ Withdrawals list:
+
+
+ }
+}
+
+export default WithdrawalsLayout;
diff --git a/src/layouts/app/AppLayout.tsx b/src/layouts/app/AppLayout.tsx
index 49f72f1..e8c8534 100644
--- a/src/layouts/app/AppLayout.tsx
+++ b/src/layouts/app/AppLayout.tsx
@@ -35,6 +35,7 @@ class AppLayout extends React.Component {
>
Explore
{loginOrHomeLink}
+ Help
{
window.App.isAuthorized() ?
Logout
diff --git a/src/layouts/auth/confirmEmail/ConfirmEmailLayout.tsx b/src/layouts/auth/confirmEmail/ConfirmEmailLayout.tsx
new file mode 100644
index 0000000..4dbc69e
--- /dev/null
+++ b/src/layouts/auth/confirmEmail/ConfirmEmailLayout.tsx
@@ -0,0 +1,89 @@
+import React from "react";
+import FullContainerPage from "../../../components/layout/simple/fullpage/FullContainerPage";
+import {Button, Card, Col, Icon, notification, Row} from "antd";
+import styles from "../login/styles.module.css";
+import {Link} from "react-router-dom";
+import { Redirect } from 'react-router';
+
+interface IProps {
+ match: {
+ params: {
+ confirmation_key: string
+ }
+ }
+}
+
+interface IState {
+ redirectHome: boolean,
+ errorLabel: string|null
+}
+
+class ConfirmEmailLayout extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ redirectHome: false,
+ errorLabel: null
+ }
+ }
+
+ componentDidMount(): void {
+ let confirmationKey = new URL(window.location.href).searchParams.get('confirmation_key') + "";
+ window.App.apiClient.postConfirmEmail(confirmationKey)
+ .then((res) =>
+ this.processConfirmationResponse(res._response))
+ .catch((error) => this.handleConfirmError(error.response));
+ }
+
+ processConfirmationResponse(response: any) {
+ let json = JSON.parse(response.bodyAsText);
+ window.App.setApiToken(json.data!.token!);
+ this.setState({redirectHome: true});
+ }
+
+ handleConfirmError(err: any) {
+ try {
+ let json = JSON.parse(err.body);
+ notification['error']({
+ message: json.errors[0].message
+ });
+ this.setState({errorLabel: json.errors[0].message});
+ } catch (e) {
+ console.error(e);
+ notification['error']({
+ message: 'Unknown error, please try again'
+ });
+ }
+ }
+
+ render() {
+ if (this.state.redirectHome) return ;
+
+ let content =
+
Confirming your email
+
+ ;
+
+ if (this.state.errorLabel) content =
+ Confirmation failed: {this.state.errorLabel}
+
+
+ Go to main page
+
+
;
+
+ return (
+
+
+
+
+ {content}
+
+
+
+
+ );
+ }
+}
+
+export default ConfirmEmailLayout;
\ No newline at end of file
diff --git a/src/layouts/auth/login/LoginLayout.tsx b/src/layouts/auth/login/LoginLayout.tsx
index 6a0408d..a8012ed 100644
--- a/src/layouts/auth/login/LoginLayout.tsx
+++ b/src/layouts/auth/login/LoginLayout.tsx
@@ -5,8 +5,8 @@ import {GetLoginOKResponse} from "../../../client/models";
import styles from './styles.module.css';
import { Redirect } from 'react-router';
import ConnectButton from "../../../components/external/auth/connectButton/ConnectButton";
-import FacebookLoginButton from "../../../components/external/auth/facebookButton/FacebookLoginButton";
import GoogleLoginButton from "../../../components/external/auth/googleButton/GoogleLoginButton";
+import {Link} from "react-router-dom";
const { Title } = Typography;
@@ -132,6 +132,12 @@ class LoginLayout extends React.Component {
>Log in
+
+ Register via email
+
+
+
+ Or login via other services:
{
-
-
-
diff --git a/src/layouts/auth/register/RegisterLayout.tsx b/src/layouts/auth/register/RegisterLayout.tsx
new file mode 100644
index 0000000..e1c3c49
--- /dev/null
+++ b/src/layouts/auth/register/RegisterLayout.tsx
@@ -0,0 +1,151 @@
+import React, {SyntheticEvent} from "react";
+import FullContainerPage from "../../../components/layout/simple/fullpage/FullContainerPage";
+import {Button, Card, Col, Divider, Form, Icon, Input, notification, Row, Typography} from "antd";
+import styles from "../login/styles.module.css";
+import {Link} from "react-router-dom";
+
+const { Title } = Typography;
+
+interface IProps {
+}
+
+interface IState {
+ isLoading: boolean,
+ registrationComplete: boolean,
+ form: {
+ login: string,
+ email: string,
+ password: string
+ }
+}
+
+class RegisterLayout extends React.Component {
+ constructor(props: any) {
+ super(props);
+ this.state = {
+ registrationComplete: false,
+ isLoading: false,
+ form: {
+ login: "",
+ email: "",
+ password: ""
+ }
+ };
+ }
+
+ handleFieldUpdate(e: SyntheticEvent) {
+ let target: any = e.target;
+ let name: string = target.name;
+ let formState = this.state.form;
+ switch (name) {
+ case "login":
+ formState.login = target.value;
+ break;
+ case "email":
+ formState.email = target.value;
+ break;
+ case "password":
+ formState.password = target.value;
+ break;
+ }
+ this.setState({form: formState});
+ }
+
+ handleSubmit(event: any) {
+ event.preventDefault();
+
+ if (this.state.isLoading) {
+ return;
+ }
+
+ const form = this.state.form;
+
+ window.App.apiClient.postRegister(form.login, form.email, form.password)
+ .then(() => this.processRegisterResponse())
+ .catch((error) => this.handleRegisterError(error));
+ }
+
+ processRegisterResponse() {
+ notification['success']({
+ message: 'You almost there! Check your email for confirmation link'
+ });
+ this.setState({registrationComplete: true});
+ }
+
+ handleRegisterError(err: any) {
+ try {
+ let json = JSON.parse(err.response.body);
+ notification['warning']({
+ message: json.errors[0].message
+ });
+ } catch (e) {
+ notification['error']({
+ message: 'Unknown error, please try again'
+ });
+ }
+ }
+
+ render() {
+ let content =
+
+
Login
+
+
+
Register
+
+ }
+ placeholder="Login"
+ onChange={this.handleFieldUpdate.bind(this)}
+ />
+
+
+ }
+ placeholder="Email"
+ onChange={this.handleFieldUpdate.bind(this)}
+ />
+
+
+ }
+ type="password"
+ placeholder="Password"
+ onChange={this.handleFieldUpdate.bind(this)}
+ />
+
+
Register
+
+
;
+
+ if (this.state.registrationComplete) content =
+
+ Registration is almost complete, you just need to confirm your email. We've sent you a confirmation link to {this.state.form.email}
+
+
;
+
+ return (
+
+
+
+
+ {content}
+
+
+
+
+ );
+ }
+}
+
+export default RegisterLayout;
\ No newline at end of file
diff --git a/src/layouts/entity/board/page/BoardPage.tsx b/src/layouts/entity/board/page/BoardPage.tsx
index e49e4bc..9135435 100644
--- a/src/layouts/entity/board/page/BoardPage.tsx
+++ b/src/layouts/entity/board/page/BoardPage.tsx
@@ -101,7 +101,7 @@ class BoardPage extends React.Component {
{this.state.columns != null && this.state.columns.map((column: ColumnModel, i: number) => {
return
-
+
;
})}
diff --git a/src/layouts/entity/project/pricing/edit/EditProjectPricingLayout.tsx b/src/layouts/entity/project/pricing/edit/EditProjectPricingLayout.tsx
new file mode 100644
index 0000000..c15386c
--- /dev/null
+++ b/src/layouts/entity/project/pricing/edit/EditProjectPricingLayout.tsx
@@ -0,0 +1,149 @@
+import React from "react";
+import FullPageWithSideBar from "../../../../../components/layout/simple/fullpagewithsidebar/FullPageWithSidebar";
+import {Button, Col, Divider, Icon, Row} from "antd";
+import PricingBlock from "../../../../../components/entity/product/pricing_block/single/PricingBlock";
+import {ProjectModel, ProjectProduct} from "../../../../../client/bindings";
+import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
+import NewProductButton from "../../../../../components/entity/product/action/new/NewProductButton";
+import DeleteProductButton from "../../../../../components/entity/product/action/delete/DeleteProductButton";
+
+interface IProps {
+ match: {
+ params: {
+ owner: string,
+ alias: string
+ }
+ }
+}
+
+interface IState {
+ isLoaded: boolean,
+ project: ProjectModel|null,
+ products: ProjectProduct[]|null
+}
+
+class EditProjectPricingLayout extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ isLoaded: false,
+ project: null,
+ products: null
+ };
+ }
+
+ componentDidMount(): void {
+ this.getProjectInfo();
+ }
+
+ getProjectInfo(): void {
+ window.App.apiClient.getProjectByAlias(this.props.match.params.owner, this.props.match.params.alias)
+ .then((result) =>
+ this.processGetProjectInfo(result._response))
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processGetProjectInfo(response: any) {
+ let json = JSON.parse(response.bodyAsText);
+
+ this.setState({
+ isLoaded: true,
+ project: json.data.project
+ });
+
+ this.getProducts();
+ }
+
+ getProducts() {
+ window.App.apiClient.getProjectProducts(this.state.project!.guid!)
+ .then((result) =>
+ this.processGetProducts(result._response))
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processGetProducts(response: any) {
+ let json = JSON.parse(response.bodyAsText);
+ this.setState({
+ products: json.data.products
+ });
+ }
+
+ render() {
+ const infoBlock =
+
+
+ There are multiple ways how you can sell your open source product, a few popular business models are:
+
+
+ 1. Open core model (when you have open source product and additional features built on top of it which
+ you're selling)
+ example: Community and Professional edition - it can be single purchase or subscription
+ 2. Sell support (your product can be 100% open source and you can earn money by offering technical support)
+
+ There are much more ways to do that - you can do your own research.
+
+
;
+
+ if (!this.state.isLoaded || !this.state.project) {
+ return
+ Loading project info
+
+ ;
+ }
+
+ let project: ProjectModel = this.state.project;
+
+ return
+ {project.name}
+ {project.description}
+ {infoBlock}
+
+
+
+
+
+
+ {this.state.products ? this.state.products.map((product, i) => {
+ return
+
+
+ 0}
+ showActionButton={false}
+ />
+
+
+ Stats:
+
+ Product owners count: {product.users_count}
+
+
+ Possible actions:
+
+ {product.users_count! > 0 ?
+ You cannot delete product with active users
+
: null}
+
+
+
+
+
+
;
+ }) : null}
+
+ ;
+ }
+}
+
+export default EditProjectPricingLayout;
diff --git a/src/layouts/entity/project/pricing/view/ProjectPricingLayout.tsx b/src/layouts/entity/project/pricing/view/ProjectPricingLayout.tsx
new file mode 100644
index 0000000..2df9308
--- /dev/null
+++ b/src/layouts/entity/project/pricing/view/ProjectPricingLayout.tsx
@@ -0,0 +1,121 @@
+import React from "react";
+import FullPageWithSideBar from "../../../../../components/layout/simple/fullpagewithsidebar/FullPageWithSidebar";
+import {handleApiError} from "../../../../../classes/notification/errorHandler/errorHandler";
+import {ProjectModel, ProjectProduct} from "../../../../../client/bindings";
+import {Button, Col, Icon, Row} from "antd";
+import PricingBlock from "../../../../../components/entity/product/pricing_block/single/PricingBlock";
+import PermissionCheck from "../../../../../components/check/permission_check/single/PermissionCheck";
+import {Link} from "react-router-dom";
+
+interface IProps {
+ match: {
+ params: {
+ owner: string,
+ alias: string
+ }
+ }
+}
+
+interface IState {
+ isLoaded: boolean,
+ project: ProjectModel|null,
+ products: ProjectProduct[]|null
+}
+
+class ProjectPricingLayout extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ isLoaded: false,
+ project: null,
+ products: null
+ };
+ }
+
+ componentDidMount(): void {
+ this.getProjectInfo();
+ }
+
+ getProjectInfo(): void {
+ window.App.apiClient.getProjectByAlias(this.props.match.params.owner, this.props.match.params.alias)
+ .then((result) =>
+ this.processGetProjectInfo(result._response))
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processGetProjectInfo(response: any) {
+ let json = JSON.parse(response.bodyAsText);
+
+ this.setState({
+ isLoaded: true,
+ project: json.data.project
+ });
+
+ this.getProducts();
+ }
+
+ getProducts() {
+ window.App.apiClient.getProjectProducts(this.state.project!.guid!)
+ .then((result) =>
+ this.processGetProducts(result._response))
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processGetProducts(response: any) {
+ let json = JSON.parse(response.bodyAsText);
+ this.setState({
+ products: json.data.products
+ });
+ }
+
+ render() {
+ if (!this.state.isLoaded || !this.state.project) {
+ return
+ Loading project info
+
+ ;
+ }
+
+ let project: ProjectModel = this.state.project;
+
+ return
+ {project.name}
+ {project.description}
+
+
+
+ Edit pricing
+
+
+
+
+
+
+
+ {this.state.products ? this.state.products.map((product, i) => {
+ return
+ 0}
+ description={product.description!}
+ />
+ ;
+ }) : null}
+
+ ;
+ }
+}
+
+export default ProjectPricingLayout;
diff --git a/src/layouts/entity/project/view/ProjectPage.tsx b/src/layouts/entity/project/view/ProjectPage.tsx
new file mode 100644
index 0000000..357a35e
--- /dev/null
+++ b/src/layouts/entity/project/view/ProjectPage.tsx
@@ -0,0 +1,150 @@
+import React from "react";
+import FullPageWithSideBar from "../../../../components/layout/simple/fullpagewithsidebar/FullPageWithSidebar";
+import {handleApiError} from "../../../../classes/notification/errorHandler/errorHandler";
+import {Button, Card, Col, Divider, Icon, Row} from "antd";
+import {BoardModel, ProjectModel} from "../../../../client/bindings";
+import BoardCard from "../../../../components/entity/board/single/card/BoardCart";
+import PermissionCheckLink from "../../../../components/link/withChecks/PermissionCheckLink";
+import AuthCheck from "../../../../components/check/auth_check/AuthCheck";
+import AddToLibrary from "../../../../components/entity/my_library/single/action/AddToLibrary";
+import {Link} from "react-router-dom";
+import PermissionCheck from "../../../../components/check/permission_check/single/PermissionCheck";
+
+interface IProps {
+ match: {
+ params: {
+ owner: string,
+ alias: string
+ }
+ }
+}
+
+interface IState {
+ isLoaded: boolean,
+ project: ProjectModel|null,
+ boards: BoardModel[]|null
+}
+
+class ProjectPage extends React.Component {
+ constructor(props: IProps) {
+ super(props);
+ this.state = {
+ isLoaded: false,
+ project: null,
+ boards: null
+ };
+ }
+
+ componentDidMount(): void {
+ this.getProjectInfo();
+ }
+
+ getProjectFullName() {
+ return this.props.match.params.owner + "/" + this.props.match.params.alias;
+ }
+
+ getProjectInfo(): void {
+ window.App.apiClient.getProjectByAlias(this.props.match.params.owner, this.props.match.params.alias)
+ .then((result) =>
+ this.processGetProjectInfo(result._response))
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processGetProjectInfo(response: any) {
+ let json = JSON.parse(response.bodyAsText);
+
+ this.setState({
+ isLoaded: true,
+ project: json.data.project
+ });
+
+ this.getProjectBoards();
+ }
+
+ getProjectBoards(): void {
+ window.App.apiClient.getProjectBoards(this.state.project!.guid!)
+ .then((result) =>
+ this.processGetBoardsResponse(result._response))
+ .catch((error) => handleApiError(error.response));
+ }
+
+ processGetBoardsResponse(response: any) {
+ let json = JSON.parse(response.bodyAsText);
+
+ this.setState({
+ boards: json.data.boards
+ });
+ }
+
+ render() {
+ if (!this.state.isLoaded || !this.state.project) {
+ return
+ Loading project info
+
+ ;
+ }
+
+ let project: ProjectModel = this.state.project;
+
+ return
+ {project.name}
+ {project.description}
+
+ {/* TODO: add likes count */}
+
+
+
+
+
+
+
+
+
+
+ Details
+
+ Created at: {project.created_at}
+ Last updated at: {project.updated_at}
+
+
+
+ {/* TODO: extract into repository card */}
+
+ Repository
+
+
+ View on GitHub?
+
+
+
+
+
+
+
+
+ Boards
+
+
+ {this.state.boards === null ? : null}
+ {this.state.boards != null && this.state.boards.length === 0 ?
+ No boards for this project
+ {/* TODO: add board button */}
+
: null}
+ {this.state.boards != null && this.state.boards.map((board: BoardModel, i: number) => {
+ return
+
+ ;
+ })}
+
+ ;
+ }
+}
+
+export default ProjectPage;
diff --git a/src/layouts/help/HelpLayout.tsx b/src/layouts/help/HelpLayout.tsx
new file mode 100644
index 0000000..65054e0
--- /dev/null
+++ b/src/layouts/help/HelpLayout.tsx
@@ -0,0 +1,55 @@
+import React from "react";
+import {Card, Col, Row, Collapse, Icon} from "antd";
+import styles from "../auth/login/styles.module.css";
+import FullContainerPage from "../../components/layout/simple/fullpage/FullContainerPage";
+
+const { Panel } = Collapse;
+
+interface IProps {
+}
+
+interface IState {
+}
+
+class HelpLayout extends React.Component {
+ getContents() {
+ return [
+ {
+ question: "How long it takes for a transaction to be approved?",
+ content:
+ For security purposes all current transactions (invoices) are processed manually thus it can take up to 24 hours to confirm your transaction.
+ If it takes longer than that - please send us an email.
+
+ },
+ {
+ question: "As a developer - how can I set up my products that I will sell?",
+ content: You need to go to project settings - pricing and set up possible plans there.
+ },
+ {
+ question: "Is there a fee each product purchase?",
+ content: Yes, there are 5% withdrawal fee for all users & developers (excluding payment fee for currencies such as BitCoin)
+ }
+ ];
+ }
+
+ render() {
+ return
+
+
+
+ Help section
+
+ {this.getContents().map((question, i: number) => {
+ return
+ {question.content}
+ ;
+ })}
+
+
+
+
+ ;
+ }
+}
+
+export default HelpLayout;
diff --git a/src/layouts/import/project/ProjectImportLayout.tsx b/src/layouts/import/project/ProjectImportLayout.tsx
index 56449c8..245fe33 100644
--- a/src/layouts/import/project/ProjectImportLayout.tsx
+++ b/src/layouts/import/project/ProjectImportLayout.tsx
@@ -66,7 +66,7 @@ class ProjectImportLayout extends React.Component {
this.setState({
isLoaded: true,
alreadyImported: true,
- importedProjectGuid: json.metadata.project_guid
+ importedProjectUri: json.metadata.project.base_uri
});
this.redirectToImportedProject();
return;
diff --git a/swagger.json b/swagger.json
index 4df78a7..a0caba6 100644
--- a/swagger.json
+++ b/swagger.json
@@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"version": "0.13.0",
- "title": "Supporthub",
+ "title": "GitCom",
"description": "SupportHub API (WIP)",
"termsOfService": "http://swagger.io/terms/",
"contact": {
@@ -12,7 +12,7 @@
"name": "Unknown license"
}
},
- "host": "api.supporthub.com",
+ "host": "api.gitcom.com",
"basePath": "/api/v1",
"schemes": [
"http",
@@ -120,6 +120,14 @@
{
"name": "permissions",
"description": "Permissions related stuff"
+ },
+ {
+ "name": "product",
+ "description": "Project product related operations"
+ },
+ {
+ "name": "withdrawal",
+ "description": "Withdrawal related operations"
}
],
"paths": {
@@ -166,6 +174,101 @@
}
}
},
+ "/register": {
+ "post": {
+ "tags": [
+ "auth"
+ ],
+ "operationId": "postRegister",
+ "description": "",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "login",
+ "in": "query",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "email",
+ "in": "query",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "password",
+ "in": "query",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "referral_key",
+ "in": "query",
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Returns text (next step)",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "response": {
+ "type": "string",
+ "example": "Please confirm your email"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/register/confirm_email": {
+ "post": {
+ "tags": [
+ "auth"
+ ],
+ "operationId": "postConfirmEmail",
+ "description": "",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "confirmation_key",
+ "in": "query",
+ "type": "string",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Returns JWT token",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "token": {
+ "type": "string",
+ "example": "kf1k2f12f912kf1fr1..."
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/auth/github/login_link/get": {
"get": {
"tags": [
@@ -504,6 +607,45 @@
}
}
},
+ "/repository/get": {
+ "get": {
+ "tags": [
+ "repo"
+ ],
+ "operationId": "getRepo",
+ "description": "",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "repo_guid",
+ "in": "query",
+ "type": "string",
+ "description": "Repository Guid",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "repository": {
+ "$ref": "#/definitions/Repository"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/project/get": {
"get": {
"tags": [
@@ -807,6 +949,147 @@
}
}
},
+ "/card/create": {
+ "post": {
+ "tags": [
+ "card"
+ ],
+ "operationId": "createCard",
+ "description": "",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "api_token",
+ "in": "query",
+ "type": "string",
+ "description": "",
+ "required": true
+ },
+ {
+ "name": "column_guid",
+ "in": "query",
+ "type": "string",
+ "description": "",
+ "required": true
+ },
+ {
+ "name": "name",
+ "in": "query",
+ "type": "string",
+ "description": "",
+ "required": true
+ },
+ {
+ "name": "description",
+ "in": "query",
+ "type": "string",
+ "description": "",
+ "required": false
+ },
+ {
+ "name": "column_order",
+ "in": "query",
+ "type": "integer",
+ "description": "",
+ "required": false
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "card": {
+ "$ref": "#/definitions/Card"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/card/edit": {
+ "patch": {
+ "tags": [
+ "card"
+ ],
+ "operationId": "editCard",
+ "description": "",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "api_token",
+ "in": "query",
+ "type": "string",
+ "description": "",
+ "required": true
+ },
+ {
+ "name": "card_guid",
+ "in": "query",
+ "type": "string",
+ "description": "",
+ "required": true
+ },
+ {
+ "name": "name",
+ "in": "query",
+ "type": "string",
+ "description": "",
+ "required": false
+ },
+ {
+ "name": "description",
+ "in": "query",
+ "type": "string",
+ "description": "",
+ "required": false
+ },
+ {
+ "name": "column_order",
+ "in": "query",
+ "type": "integer",
+ "description": "",
+ "required": false
+ },
+ {
+ "name": "column_guid",
+ "in": "query",
+ "type": "string",
+ "description": "",
+ "required": false
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "card": {
+ "$ref": "#/definitions/Card"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/card/work/get": {
"get": {
"tags": [
@@ -866,19 +1149,7 @@
"required": true
},
{
- "name": "entity_type",
- "in": "query",
- "type": "string",
- "enum": [
- "ProjectCategory",
- "Project",
- "Board",
- "Card",
- "BacklogItem",
- "UserBalance",
- "User"
- ],
- "required": true
+ "$ref": "#/parameters/entity_type"
}
],
"responses": {
@@ -1070,19 +1341,7 @@
"required": true
},
{
- "name": "entity_type",
- "in": "query",
- "type": "string",
- "enum": [
- "ProjectCategory",
- "Project",
- "Board",
- "Card",
- "BacklogItem",
- "UserBalance",
- "User"
- ],
- "required": true
+ "$ref": "#/parameters/entity_type"
},
{
"name": "amount",
@@ -1595,10 +1854,62 @@
}
}
},
- "/me/get": {
+ "/me/library/project/status/get": {
"get": {
"tags": [
- "me"
+ "alias",
+ "project"
+ ],
+ "operationId": "getMyLibraryProjectStatus",
+ "description": "",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "api_token",
+ "in": "query",
+ "type": "string",
+ "description": "",
+ "required": true
+ },
+ {
+ "name": "project_guid",
+ "in": "query",
+ "type": "string",
+ "description": "",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "object",
+ "properties": {
+ "in_library": {
+ "type": "boolean"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/me/get": {
+ "get": {
+ "tags": [
+ "me"
],
"operationId": "getMe",
"description": "",
@@ -1775,16 +2086,7 @@
"required": true
},
{
- "name": "entity_type",
- "in": "query",
- "type": "string",
- "enum": [
- "Project",
- "Board",
- "BoardColumn",
- "Card"
- ],
- "required": true
+ "$ref": "#/parameters/entity_type"
}
],
"responses": {
@@ -1874,6 +2176,307 @@
}
}
}
+ },
+ "/project/products/get": {
+ "get": {
+ "tags": [ "product" ],
+ "operationId": "getProjectProducts",
+ "description": "",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "project_guid",
+ "in": "query",
+ "type": "string",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "products": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ProjectProduct"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/project/product/new": {
+ "post": {
+ "tags": [ "product" ],
+ "operationId": "postProjectProduct",
+ "description": "",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "api_token",
+ "in": "query",
+ "type": "string",
+ "description": "JWT token",
+ "required": true
+ },
+ {
+ "name": "project_guid",
+ "in": "query",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "name",
+ "in": "query",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "description",
+ "in": "query",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "usd_price",
+ "in": "query",
+ "type": "number",
+ "required": true
+ },
+ {
+ "name": "url",
+ "in": "query",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "use_url",
+ "in": "query",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "duration_hours",
+ "in": "query",
+ "type": "number"
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "product": {
+ "$ref": "#/definitions/ProjectProduct"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/project/product/delete": {
+ "delete": {
+ "tags": [ "product" ],
+ "operationId": "deleteProjectProduct",
+ "description": "",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "api_token",
+ "in": "query",
+ "type": "string",
+ "description": "JWT token",
+ "required": true
+ },
+ {
+ "name": "product_guid",
+ "in": "query",
+ "type": "string",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "product": {
+ "$ref": "#/definitions/ProjectProduct"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/me/withdrawals/get": {
+ "get": {
+ "tags": [
+ "withdrawal"
+ ],
+ "operationId": "getMyWithdrawalRequests",
+ "description": "",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "api_token",
+ "in": "query",
+ "type": "string",
+ "description": "JWT token",
+ "required": true
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "withdraw_requests": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/WithdrawalRequest"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/me/withdrawal/new": {
+ "post": {
+ "tags": [
+ "withdrawal"
+ ],
+ "operationId": "postWithdrawalRequest",
+ "description": "",
+ "produces": [
+ "application/json"
+ ],
+ "parameters": [
+ {
+ "name": "api_token",
+ "in": "query",
+ "type": "string",
+ "description": "JWT token",
+ "required": true
+ },
+ {
+ "name": "amount",
+ "in": "query",
+ "type": "number",
+ "required": true
+ },
+ {
+ "name": "address",
+ "in": "query",
+ "type": "string",
+ "required": true
+ },
+ {
+ "name": "currency_type",
+ "in": "query",
+ "type": "string",
+ "enum": [
+ "Usd",
+ "BitCoin",
+ "Ethereum",
+ "Erc20Token",
+ "Waves",
+ "WavesToken",
+ "LiteCoin"
+ ],
+ "required": true
+ }
+ ],
+ "responses": {
+ "201": {
+ "description": "",
+ "schema": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "withdraw_request": {
+ "$ref": "#/definitions/WithdrawalRequest"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "parameters": {
+ "entity_type": {
+ "name": "entity_type",
+ "in": "query",
+ "type": "string",
+ "enum": [
+ "ProjectCategory",
+ "Project",
+ "Board",
+ "Card",
+ "BacklogItem",
+ "UserBalance",
+ "User",
+ "ProjectProductPurchase",
+ "BoardColumn"
+ ],
+ "required": true
+ },
+ "currency_type": {
+ "name": "currency_type",
+ "in": "query",
+ "type": "string",
+ "enum": [
+ "Usd",
+ "BitCoin",
+ "Ethereum",
+ "Erc20Token",
+ "Waves",
+ "WavesToken",
+ "LiteCoin"
+ ]
}
},
"definitions": {
@@ -1958,6 +2561,10 @@
"type": "string",
"example": "owner/project-name"
},
+ "stars_count": {
+ "type": "number",
+ "example": 3
+ },
"created_at": {
"type": "string",
"example": "2019-10-04"
@@ -2295,6 +2902,78 @@
}
}
},
+ "ProjectProduct": {
+ "type": "object",
+ "properties": {
+ "guid": {
+ "type": "string",
+ "example": "46e647fc-9ebc-4d40-bcff-f81af991ee88"
+ },
+ "name": {
+ "type": "string",
+ "example": "Professional edition"
+ },
+ "description": {
+ "type": "string",
+ "example": "List of additional features here"
+ },
+ "url": {
+ "type": "string",
+ "description": "url to view product info (optional)",
+ "example": "https://website.com/my-product/info"
+ },
+ "project_guid": {
+ "type": "string",
+ "example": "46e647fc-9ebc-4d40-bcff-f81af991ee88"
+ },
+ "usd_price": {
+ "type": "number",
+ "example": 2.25
+ },
+ "duration_hours": {
+ "type": "integer",
+ "example": "5"
+ },
+ "created_at": {
+ "type": "string",
+ "example": "2019-10-06T17:14:54.844933"
+ },
+ "updated_at": {
+ "type": "string",
+ "example": "2019-10-06T17:14:54.844933"
+ }
+ }
+ },
+ "WithdrawalRequest": {
+ "type": "object",
+ "properties": {
+ "guid": {
+ "type": "string",
+ "example": "46e647fc-9ebc-4d40-bcff-f81af991ee88"
+ },
+ "user_guid": {
+ "type": "string",
+ "example": "3fbc4d65-8ac8-468d-b5fd-51cdcaae5e2c"
+ },
+ "amount": {
+ "type": "number",
+ "example": 0.172
+ },
+ "address": {
+ "type": "string",
+ "example": "my0paypal@gmail.com",
+ "description": "Users email for PayPal or cryptocurrency address"
+ },
+ "paid": {
+ "type": "boolean",
+ "example": false
+ },
+ "created_at": {
+ "type": "string",
+ "example": "2019-10-06T17:14:54.844933"
+ }
+ }
+ },
"EntityType": {
"type": "string",
"example": "Card",
@@ -2305,7 +2984,9 @@
"Card",
"BacklogItem",
"UserBalance",
- "User"
+ "User",
+ "ProjectProductPurchase",
+ "BoardColumn"
]
},
"CurrencyType": {