mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
API code
This commit is contained in:
28
frontend/src/api/accounts/destroy.js
vendored
Normal file
28
frontend/src/api/accounts/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = '/api/v1/accounts/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
35
frontend/src/api/accounts/get.js
vendored
Normal file
35
frontend/src/api/accounts/get.js
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier, date) {
|
||||
let url = '/api/v1/accounts/' + identifier;
|
||||
if(!date) {
|
||||
return api.get(url);
|
||||
}
|
||||
return api.get(url, {params: {date: date}});
|
||||
}
|
||||
transactions(identifier, page, cacheKey) {
|
||||
let url = '/api/v1/accounts/' + identifier + '/transactions';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/accounts/list.js
vendored
Normal file
28
frontend/src/api/accounts/list.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(type, page, cacheKey) {
|
||||
let url = '/api/v1/accounts';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey, type: type}});
|
||||
}
|
||||
}
|
28
frontend/src/api/accounts/post.js
vendored
Normal file
28
frontend/src/api/accounts/post.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Post {
|
||||
post(submission) {
|
||||
let url = '/api/v1/accounts';
|
||||
return api.post(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/accounts/put.js
vendored
Normal file
28
frontend/src/api/accounts/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
post(identifier, submission) {
|
||||
let url = '/api/v1/accounts/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
27
frontend/src/api/authenticate/index.js
vendored
Normal file
27
frontend/src/api/authenticate/index.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* basic.js
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Authenticate {
|
||||
async authenticate() {
|
||||
return await api.get('/sanctum/csrf-cookie');
|
||||
}
|
||||
}
|
28
frontend/src/api/budgets/destroy.js
vendored
Normal file
28
frontend/src/api/budgets/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = 'api/v1/budgets/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
38
frontend/src/api/budgets/get.js
vendored
Normal file
38
frontend/src/api/budgets/get.js
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier) {
|
||||
let url = '/api/v1/budgets/' + identifier;
|
||||
return api.get(url);
|
||||
}
|
||||
|
||||
transactions(identifier, page, cacheKey) {
|
||||
let url = '/api/v1/budgets/' + identifier + '/transactions';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
|
||||
transactionsWithoutBudget(page, cacheKey) {
|
||||
let url = '/api/v1/budgets/transactions-without-budget';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/budgets/list.js
vendored
Normal file
28
frontend/src/api/budgets/list.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(page, cacheKey) {
|
||||
let url = '/api/v1/budgets';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/budgets/post.js
vendored
Normal file
28
frontend/src/api/budgets/post.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Post {
|
||||
post(submission) {
|
||||
let url = '/api/v1/budgets';
|
||||
return api.post(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/budgets/put.js
vendored
Normal file
28
frontend/src/api/budgets/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
post(identifier, submission) {
|
||||
let url = '/api/v1/budgets/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/categories/destroy.js
vendored
Normal file
28
frontend/src/api/categories/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = '/api/v1/categories/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
36
frontend/src/api/categories/get.js
vendored
Normal file
36
frontend/src/api/categories/get.js
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier) {
|
||||
let url = '/api/v1/categories/' + identifier;
|
||||
return api.get(url);
|
||||
}
|
||||
transactions(identifier, page, cacheKey) {
|
||||
let url = '/api/v1/categories/' + identifier + '/transactions';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
transactionsWithoutCategory(page, cacheKey) {
|
||||
let url = '/api/v1/categories/transactions-without-category';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/categories/list.js
vendored
Normal file
28
frontend/src/api/categories/list.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(page, cacheKey) {
|
||||
let url = '/api/v1/categories';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/categories/post.js
vendored
Normal file
28
frontend/src/api/categories/post.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Post {
|
||||
post(submission) {
|
||||
let url = '/api/v1/categories';
|
||||
return api.post(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/categories/put.js
vendored
Normal file
28
frontend/src/api/categories/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
post(identifier, submission) {
|
||||
let url = '/api/v1/categories/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
30
frontend/src/api/chart/account/overview.js
vendored
Normal file
30
frontend/src/api/chart/account/overview.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* overview.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
import {format} from "date-fns";
|
||||
|
||||
export default class Overview {
|
||||
overview(range, cacheKey) {
|
||||
let startStr = format(range.start, 'y-MM-dd');
|
||||
let endStr = format(range.end, 'y-MM-dd');
|
||||
return api.get('/api/v1/chart/account/overview', {params: {start: startStr, end: endStr, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/currencies/destroy.js
vendored
Normal file
28
frontend/src/api/currencies/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = '/api/v1/currencies/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
32
frontend/src/api/currencies/get.js
vendored
Normal file
32
frontend/src/api/currencies/get.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier) {
|
||||
let url = '/api/v1/currencies/' + identifier;
|
||||
return api.get(url);
|
||||
}
|
||||
transactions(identifier, page, cacheKey) {
|
||||
let url = '/api/v1/currencies/' + identifier + '/transactions';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/currencies/index.js
vendored
Normal file
28
frontend/src/api/currencies/index.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* basic.js
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
import Authenticate from '../authenticate/index';
|
||||
export default class Currencies {
|
||||
default() {
|
||||
let auth = new Authenticate();
|
||||
return auth.authenticate().then(() => {return api.get('/api/v1/currencies/default')});
|
||||
}
|
||||
}
|
28
frontend/src/api/currencies/list.js
vendored
Normal file
28
frontend/src/api/currencies/list.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(page, cacheKey) {
|
||||
let url = '/api/v1/currencies';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
32
frontend/src/api/currencies/post.js
vendored
Normal file
32
frontend/src/api/currencies/post.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Post {
|
||||
post(submission) {
|
||||
let url = '/api/v1/currencies';
|
||||
return api.post(url, submission);
|
||||
}
|
||||
makeDefault(currency) {
|
||||
let url = '/api/v1/currencies/' + currency + '/default';
|
||||
return api.post(url);
|
||||
}
|
||||
}
|
28
frontend/src/api/currencies/put.js
vendored
Normal file
28
frontend/src/api/currencies/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
post(identifier, submission) {
|
||||
let url = '/api/v1/currencies/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/data/export.js
vendored
Normal file
28
frontend/src/api/data/export.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Export {
|
||||
transactions(start, end) {
|
||||
let url = '/api/v1/data/export/transactions';
|
||||
return api.get(url, {params: {start: start, end: end}});
|
||||
}
|
||||
}
|
28
frontend/src/api/groups/destroy.js
vendored
Normal file
28
frontend/src/api/groups/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = '/api/v1/object_groups/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
28
frontend/src/api/groups/get.js
vendored
Normal file
28
frontend/src/api/groups/get.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier) {
|
||||
let url = '/api/v1/object_groups/' + identifier;
|
||||
return api.get(url);
|
||||
}
|
||||
}
|
28
frontend/src/api/groups/list.js
vendored
Normal file
28
frontend/src/api/groups/list.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(type, page, cacheKey) {
|
||||
let url = '/api/v1/object_groups';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey, type: type}});
|
||||
}
|
||||
}
|
28
frontend/src/api/groups/put.js
vendored
Normal file
28
frontend/src/api/groups/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
post(identifier, submission) {
|
||||
let url = '/api/v1/object_groups/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/piggy-banks/destroy.js
vendored
Normal file
28
frontend/src/api/piggy-banks/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = '/api/v1/piggy_banks/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
32
frontend/src/api/piggy-banks/get.js
vendored
Normal file
32
frontend/src/api/piggy-banks/get.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier) {
|
||||
let url = '/api/v1/piggy_banks/' + identifier;
|
||||
return api.get(url);
|
||||
}
|
||||
transactions(identifier, page, cacheKey) {
|
||||
let url = '/api/v1/piggy_banks/' + identifier + '/transactions';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/piggy-banks/list.js
vendored
Normal file
28
frontend/src/api/piggy-banks/list.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(page, cacheKey) {
|
||||
let url = '/api/v1/piggy_banks';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/piggy-banks/post.js
vendored
Normal file
28
frontend/src/api/piggy-banks/post.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Post {
|
||||
post(submission) {
|
||||
let url = '/api/v1/piggy_banks';
|
||||
return api.post(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/piggy-banks/put.js
vendored
Normal file
28
frontend/src/api/piggy-banks/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
post(identifier, submission) {
|
||||
let url = '/api/v1/piggy_banks/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
30
frontend/src/api/preferences/index.js
vendored
Normal file
30
frontend/src/api/preferences/index.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* basic.js
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Preferences {
|
||||
getByName(name) {
|
||||
return api.get('/api/v1/preferences/' + name);
|
||||
}
|
||||
postByName(name, value) {
|
||||
return api.post('/api/v1/preferences', {name: name, data: value});
|
||||
}
|
||||
}
|
28
frontend/src/api/preferences/put.js
vendored
Normal file
28
frontend/src/api/preferences/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
put(name, value) {
|
||||
let url = '/api/v1/preferences/' + name;
|
||||
return api.put(url, {data: value});
|
||||
}
|
||||
}
|
28
frontend/src/api/recurring/destroy.js
vendored
Normal file
28
frontend/src/api/recurring/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = '/api/v1/recurrences/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
28
frontend/src/api/recurring/get.js
vendored
Normal file
28
frontend/src/api/recurring/get.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier) {
|
||||
let url = '/api/v1/recurrences/' + identifier;
|
||||
return api.get(url);
|
||||
}
|
||||
}
|
28
frontend/src/api/recurring/list.js
vendored
Normal file
28
frontend/src/api/recurring/list.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(page, cacheKey) {
|
||||
let url = '/api/v1/recurrences';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/recurring/post.js
vendored
Normal file
28
frontend/src/api/recurring/post.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Post {
|
||||
post(submission) {
|
||||
let url = '/api/v1/recurrences';
|
||||
return api.post(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/recurring/put.js
vendored
Normal file
28
frontend/src/api/recurring/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
post(identifier, submission) {
|
||||
let url = '/api/v1/recurrences/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/rule-groups/destroy.js
vendored
Normal file
28
frontend/src/api/rule-groups/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = '/api/v1/rule_groups/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
35
frontend/src/api/rule-groups/get.js
vendored
Normal file
35
frontend/src/api/rule-groups/get.js
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier, date) {
|
||||
let url = '/api/v1/rule_groups/' + identifier;
|
||||
if(!date) {
|
||||
return api.get(url);
|
||||
}
|
||||
return api.get(url, {params: {date: date}});
|
||||
}
|
||||
rules(identifier, page, cacheKey) {
|
||||
let url = '/api/v1/rule_groups/' + identifier + '/rules';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/rule-groups/list.js
vendored
Normal file
28
frontend/src/api/rule-groups/list.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(page, cacheKey) {
|
||||
let url = '/api/v1/rule_groups';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/rule-groups/post.js
vendored
Normal file
28
frontend/src/api/rule-groups/post.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Post {
|
||||
post(submission) {
|
||||
let url = '/api/v1/rule_groups';
|
||||
return api.post(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/rule-groups/put.js
vendored
Normal file
28
frontend/src/api/rule-groups/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
post(identifier, submission) {
|
||||
let url = '/api/v1/rule_groups/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/rules/destroy.js
vendored
Normal file
28
frontend/src/api/rules/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = '/api/v1/rules/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
31
frontend/src/api/rules/get.js
vendored
Normal file
31
frontend/src/api/rules/get.js
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier, date) {
|
||||
let url = '/api/v1/rules/' + identifier;
|
||||
if(!date) {
|
||||
return api.get(url);
|
||||
}
|
||||
return api.get(url, {params: {date: date}});
|
||||
}
|
||||
}
|
28
frontend/src/api/rules/post.js
vendored
Normal file
28
frontend/src/api/rules/post.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Post {
|
||||
post(submission) {
|
||||
let url = '/api/v1/rules';
|
||||
return api.post(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/rules/put.js
vendored
Normal file
28
frontend/src/api/rules/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
post(identifier, submission) {
|
||||
let url = '/api/v1/rules/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/subscriptions/destroy.js
vendored
Normal file
28
frontend/src/api/subscriptions/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = '/api/v1/bills/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
32
frontend/src/api/subscriptions/get.js
vendored
Normal file
32
frontend/src/api/subscriptions/get.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier) {
|
||||
let url = '/api/v1/bills/' + identifier;
|
||||
return api.get(url);
|
||||
}
|
||||
transactions(identifier, page, cacheKey) {
|
||||
let url = '/api/v1/bills/' + identifier + '/transactions';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/subscriptions/list.js
vendored
Normal file
28
frontend/src/api/subscriptions/list.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(page, cacheKey) {
|
||||
let url = '/api/v1/bills';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/subscriptions/post.js
vendored
Normal file
28
frontend/src/api/subscriptions/post.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Post {
|
||||
post(submission) {
|
||||
let url = '/api/v1/bills';
|
||||
return api.post(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/subscriptions/put.js
vendored
Normal file
28
frontend/src/api/subscriptions/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
put(identifier, submission) {
|
||||
let url = '/api/v1/bills/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
32
frontend/src/api/summary/basic.js
vendored
Normal file
32
frontend/src/api/summary/basic.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* basic.js
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
import {format} from 'date-fns';
|
||||
|
||||
|
||||
export default class Basic {
|
||||
list(range, cacheKey) {
|
||||
let startStr = format(range.start, 'y-MM-dd');
|
||||
let endStr = format(range.end, 'y-MM-dd');
|
||||
|
||||
return api.get('/api/v1/summary/basic', {params: {start: startStr, end: endStr, cache: cacheKey}});
|
||||
}
|
||||
}
|
8
frontend/src/api/system/about.js
vendored
Normal file
8
frontend/src/api/system/about.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import {api} from "boot/axios";
|
||||
//import createAuthRefreshInterceptor from 'axios-auth-refresh';
|
||||
|
||||
export default class About {
|
||||
list() {
|
||||
return api.get('/api/v1/about');
|
||||
}
|
||||
}
|
12
frontend/src/api/system/configuration.js
vendored
Normal file
12
frontend/src/api/system/configuration.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Configuration {
|
||||
get (identifier) {
|
||||
return api.get('/api/v1/configuration/' + identifier);
|
||||
}
|
||||
|
||||
put (identifier, value) {
|
||||
return api.put('/api/v1/configuration/' + identifier, value);
|
||||
}
|
||||
}
|
16
frontend/src/api/system/user.js
vendored
Normal file
16
frontend/src/api/system/user.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class AboutUser {
|
||||
get() {
|
||||
return api.get('/api/v1/about/user');
|
||||
}
|
||||
|
||||
put(identifier, submission) {
|
||||
console.log('here we are');
|
||||
return api.put('/api/v1/users/' + identifier, submission);
|
||||
}
|
||||
|
||||
logout() {
|
||||
return api.post('/logout');
|
||||
}
|
||||
}
|
32
frontend/src/api/tags/get.js
vendored
Normal file
32
frontend/src/api/tags/get.js
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier) {
|
||||
let url = '/api/v1/tags/' + identifier;
|
||||
return api.get(url);
|
||||
}
|
||||
transactions(identifier, page, cacheKey) {
|
||||
let url = '/api/v1/tags/' + identifier + '/transactions';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/tags/list.js
vendored
Normal file
28
frontend/src/api/tags/list.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(page, cacheKey) {
|
||||
let url = '/api/v1/tags';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/transactions/destroy.js
vendored
Normal file
28
frontend/src/api/transactions/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = '/api/v1/transactions/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
28
frontend/src/api/transactions/get.js
vendored
Normal file
28
frontend/src/api/transactions/get.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier) {
|
||||
let url = 'api/v1/transactions/' + identifier;
|
||||
return api.get(url);
|
||||
}
|
||||
}
|
29
frontend/src/api/transactions/list.js
vendored
Normal file
29
frontend/src/api/transactions/list.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(type, page, cacheKey) {
|
||||
let url = 'api/v1/transactions';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey, type: type}});
|
||||
}
|
||||
|
||||
}
|
79
frontend/src/api/transactions/parser.js
vendored
Normal file
79
frontend/src/api/transactions/parser.js
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* parser.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export default class Parser {
|
||||
parseResponse(response) {
|
||||
let obj = {};
|
||||
obj.rows = [];
|
||||
obj.rowsPerPage = response.data.meta.pagination.per_page;
|
||||
obj.rowsNumber = response.data.meta.pagination.total;
|
||||
|
||||
for (let i in response.data.data) {
|
||||
if (response.data.data.hasOwnProperty(i)) {
|
||||
let current = response.data.data[i];
|
||||
let group = {
|
||||
group_id: current.id,
|
||||
splits: [],
|
||||
group_title: current.attributes.group_title
|
||||
};
|
||||
|
||||
for (let ii in current.attributes.transactions) {
|
||||
if (current.attributes.transactions.hasOwnProperty(ii)) {
|
||||
let transaction = current.attributes.transactions[ii];
|
||||
let parsed = {
|
||||
group_id: current.id,
|
||||
journal_id: parseInt(transaction.transaction_journal_id),
|
||||
type: transaction.type,
|
||||
description: transaction.description,
|
||||
amount: transaction.amount,
|
||||
date: transaction.date,
|
||||
source: transaction.source_name,
|
||||
destination: transaction.destination_name,
|
||||
category: transaction.category_name,
|
||||
budget: transaction.budget_name,
|
||||
currencyCode: transaction.currency_code,
|
||||
};
|
||||
if (1 === current.attributes.transactions.length && 0 === parseInt(ii)) {
|
||||
group.group_title = transaction.description;
|
||||
}
|
||||
|
||||
// merge with group if index = 0;
|
||||
if (0 === parseInt(ii)) {
|
||||
group = {
|
||||
...group,
|
||||
...parsed
|
||||
};
|
||||
}
|
||||
// append to splits if > 1 and > 1
|
||||
if (current.attributes.transactions.length > 0) {
|
||||
group.splits.push(parsed);
|
||||
// add amount:
|
||||
if (ii > 0) {
|
||||
group.amount = parseFloat(group.amount) + parseFloat(parsed.amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
obj.rows.push(group);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
28
frontend/src/api/transactions/post.js
vendored
Normal file
28
frontend/src/api/transactions/post.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Post {
|
||||
post(submission) {
|
||||
let url = '/api/v1/transactions';
|
||||
return api.post(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/transactions/put.js
vendored
Normal file
28
frontend/src/api/transactions/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
put(identifier, submission) {
|
||||
let url = '/api/v1/transactions/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/webhooks/destroy.js
vendored
Normal file
28
frontend/src/api/webhooks/destroy.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Destroy {
|
||||
destroy(identifier) {
|
||||
let url = '/api/v1/webhooks/' + identifier;
|
||||
return api.delete(url);
|
||||
}
|
||||
}
|
28
frontend/src/api/webhooks/get.js
vendored
Normal file
28
frontend/src/api/webhooks/get.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Get {
|
||||
get(identifier) {
|
||||
let url = '/api/v1/webhooks/' + identifier;
|
||||
return api.get(url);
|
||||
}
|
||||
}
|
28
frontend/src/api/webhooks/list.js
vendored
Normal file
28
frontend/src/api/webhooks/list.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* list.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class List {
|
||||
list(page, cacheKey) {
|
||||
let url = '/api/v1/webhooks';
|
||||
return api.get(url, {params: {page: page, cache: cacheKey}});
|
||||
}
|
||||
}
|
28
frontend/src/api/webhooks/post.js
vendored
Normal file
28
frontend/src/api/webhooks/post.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Post {
|
||||
post(submission) {
|
||||
let url = '/api/v1/webhooks';
|
||||
return api.post(url, submission);
|
||||
}
|
||||
}
|
28
frontend/src/api/webhooks/put.js
vendored
Normal file
28
frontend/src/api/webhooks/put.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* post.js
|
||||
* Copyright (c) 2022 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {api} from "boot/axios";
|
||||
|
||||
export default class Put {
|
||||
put(identifier, submission) {
|
||||
let url = '/api/v1/webhooks/' + identifier;
|
||||
return api.put(url, submission);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user