@veritree/services 2.34.0 → 2.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/index.js +83 -83
  2. package/package.json +16 -16
  3. package/src/endpoints/bulk-uploads.js +4 -4
  4. package/src/endpoints/countries.js +5 -5
  5. package/src/endpoints/crumbs.js +20 -20
  6. package/src/endpoints/evidence.js +47 -47
  7. package/src/endpoints/external-reports.js +9 -9
  8. package/src/endpoints/field-reports.js +37 -37
  9. package/src/endpoints/field-udpate-verifications.js +5 -5
  10. package/src/endpoints/field-updates.js +16 -16
  11. package/src/endpoints/forest-type-species.js +4 -4
  12. package/src/endpoints/forest-types-profiles.js +4 -4
  13. package/src/endpoints/forest-types.js +14 -14
  14. package/src/endpoints/form-submissions.js +4 -4
  15. package/src/endpoints/geometries.js +4 -4
  16. package/src/endpoints/images-aggregated.js +4 -4
  17. package/src/endpoints/images.js +21 -21
  18. package/src/endpoints/methodologies.js +36 -36
  19. package/src/endpoints/notes.js +14 -14
  20. package/src/endpoints/organizations.js +59 -59
  21. package/src/endpoints/orgs.js +65 -65
  22. package/src/endpoints/password.js +58 -58
  23. package/src/endpoints/planting-sites.js +121 -110
  24. package/src/endpoints/regions.js +41 -41
  25. package/src/endpoints/resellers.js +37 -37
  26. package/src/endpoints/roles.js +4 -4
  27. package/src/endpoints/sdgs.js +4 -4
  28. package/src/endpoints/sponsors.js +86 -86
  29. package/src/endpoints/sso-token.js +5 -5
  30. package/src/endpoints/standards.js +140 -140
  31. package/src/endpoints/stats.js +17 -17
  32. package/src/endpoints/subdomains.js +4 -4
  33. package/src/endpoints/subsite-types.js +5 -5
  34. package/src/endpoints/subsites.js +88 -88
  35. package/src/endpoints/tags.js +14 -14
  36. package/src/endpoints/tasks.js +47 -47
  37. package/src/endpoints/tree-order-statuses.js +4 -4
  38. package/src/endpoints/trees-orders.js +23 -23
  39. package/src/endpoints/user.js +27 -27
  40. package/src/endpoints/users.js +14 -14
  41. package/src/endpoints/utilities.js +35 -35
  42. package/src/endpoints/verifications.js +21 -21
  43. package/src/helpers/api.js +293 -293
  44. package/src/helpers/cookies.js +36 -36
  45. package/src/helpers/relations.js +32 -32
  46. package/src/helpers/sequestrations.js +19 -19
  47. package/src/helpers/session.js +3 -3
  48. package/src/helpers/team.js +45 -45
  49. package/src/utils/args.js +46 -46
@@ -1,23 +1,23 @@
1
- import Api from "../helpers/api";
2
-
3
- // export const TreeOrders = new Api(resource);
4
-
5
- class TreeOrdersApi extends Api {
6
- constructor(resource) {
7
- super(resource);
8
- this.resource = "tree-orders";
9
- }
10
-
11
- allocations(args) {
12
- const create = async (data) => {
13
- const url = `${this.getUrl()}/allocations${this.getUrlParams(args)}`;
14
- return await this.post(url, data);
15
- };
16
-
17
- return {
18
- create,
19
- };
20
- }
21
- }
22
-
23
- export const TreeOrders = new TreeOrdersApi();
1
+ import Api from "../helpers/api";
2
+
3
+ // export const TreeOrders = new Api(resource);
4
+
5
+ class TreeOrdersApi extends Api {
6
+ constructor(resource) {
7
+ super(resource);
8
+ this.resource = "tree-orders";
9
+ }
10
+
11
+ allocations(args) {
12
+ const create = async (data) => {
13
+ const url = `${this.getUrl()}/allocations${this.getUrlParams(args)}`;
14
+ return await this.post(url, data);
15
+ };
16
+
17
+ return {
18
+ create,
19
+ };
20
+ }
21
+ }
22
+
23
+ export const TreeOrders = new TreeOrdersApi();
@@ -1,27 +1,27 @@
1
- import Api from '../helpers/api';
2
-
3
- class UserApi extends Api {
4
- constructor(resource) {
5
- super(resource);
6
- this.resource = 'me';
7
- }
8
-
9
- me() {
10
- const url = this.getUrl();
11
-
12
- const get = async () => {
13
- return await this.get(url);
14
- };
15
-
16
- const update = async (data) => {
17
- return await this.post(url, data, 'patch');
18
- };
19
-
20
- return {
21
- get,
22
- update,
23
- };
24
- }
25
- }
26
-
27
- export const User = new UserApi();
1
+ import Api from '../helpers/api';
2
+
3
+ class UserApi extends Api {
4
+ constructor(resource) {
5
+ super(resource);
6
+ this.resource = 'me';
7
+ }
8
+
9
+ me() {
10
+ const url = this.getUrl();
11
+
12
+ const get = async () => {
13
+ return await this.get(url);
14
+ };
15
+
16
+ const update = async (data) => {
17
+ return await this.post(url, data, 'patch');
18
+ };
19
+
20
+ return {
21
+ get,
22
+ update,
23
+ };
24
+ }
25
+ }
26
+
27
+ export const User = new UserApi();
@@ -1,15 +1,15 @@
1
- import Api from '../helpers/api';
2
-
3
- class UsersApi extends Api {
4
- constructor(resource) {
5
- super(resource);
6
- this.resource = 'users';
7
- }
8
-
9
- async roles(id, data, params) {
10
- const url = `${id}/roles${this.getUrlParams(params)}`;
11
- return await this.update(url, data, 'put');
12
- }
13
- }
14
-
1
+ import Api from '../helpers/api';
2
+
3
+ class UsersApi extends Api {
4
+ constructor(resource) {
5
+ super(resource);
6
+ this.resource = 'users';
7
+ }
8
+
9
+ async roles(id, data, params) {
10
+ const url = `${id}/roles${this.getUrlParams(params)}`;
11
+ return await this.update(url, data, 'put');
12
+ }
13
+ }
14
+
15
15
  export const Users = new UsersApi();
@@ -1,35 +1,35 @@
1
- import Api from '../helpers/api';
2
-
3
- class UtilitiesApi extends Api {
4
- constructor(resource) {
5
- super(resource);
6
- this.resource = 'utilities';
7
- }
8
-
9
- uploads() {
10
- const baseUrl = `${this.getUrl()}/uploads`;
11
-
12
- const signedCloudUploadUrl = async () => {
13
- const url = `${baseUrl}/signed-cloud-upload-url`;
14
- return await this.get(url);
15
- };
16
-
17
- const installUpload = async (orgId, data) => {
18
- const url = `${baseUrl}/install-upload/organization/${orgId}`;
19
- return await this.post(url, data);
20
- };
21
-
22
- const supportedCollections = async () => {
23
- const url = `${baseUrl}/supported-collections`;
24
- return await this.get(url);
25
- };
26
-
27
- return {
28
- signedCloudUploadUrl,
29
- installUpload,
30
- supportedCollections,
31
- };
32
- }
33
- }
34
-
35
- export const Utilities = new UtilitiesApi();
1
+ import Api from '../helpers/api';
2
+
3
+ class UtilitiesApi extends Api {
4
+ constructor(resource) {
5
+ super(resource);
6
+ this.resource = 'utilities';
7
+ }
8
+
9
+ uploads() {
10
+ const baseUrl = `${this.getUrl()}/uploads`;
11
+
12
+ const signedCloudUploadUrl = async () => {
13
+ const url = `${baseUrl}/signed-cloud-upload-url`;
14
+ return await this.get(url);
15
+ };
16
+
17
+ const installUpload = async (orgId, data) => {
18
+ const url = `${baseUrl}/install-upload/organization/${orgId}`;
19
+ return await this.post(url, data);
20
+ };
21
+
22
+ const supportedCollections = async () => {
23
+ const url = `${baseUrl}/supported-collections`;
24
+ return await this.get(url);
25
+ };
26
+
27
+ return {
28
+ signedCloudUploadUrl,
29
+ installUpload,
30
+ supportedCollections,
31
+ };
32
+ }
33
+ }
34
+
35
+ export const Utilities = new UtilitiesApi();
@@ -1,21 +1,21 @@
1
- import Api from "../helpers/api";
2
-
3
- class VerificationsApi extends Api {
4
- constructor(resource) {
5
- super(resource);
6
- this.resource = "verifications";
7
- }
8
-
9
- verify(verifiableType, verifiableId) {
10
- const post = async (data) => {
11
- const url = `${this.baseUrl}/${verifiableType}/${verifiableId}/verify${this.getUrlParams()}`;
12
- return await this.post(url, data);
13
- };
14
-
15
- return {
16
- post,
17
- };
18
- }
19
- }
20
-
21
- export const Verifications = new VerificationsApi();
1
+ import Api from "../helpers/api";
2
+
3
+ class VerificationsApi extends Api {
4
+ constructor(resource) {
5
+ super(resource);
6
+ this.resource = "verifications";
7
+ }
8
+
9
+ verify(verifiableType, verifiableId) {
10
+ const post = async (data) => {
11
+ const url = `${this.baseUrl}/${verifiableType}/${verifiableId}/verify${this.getUrlParams()}`;
12
+ return await this.post(url, data);
13
+ };
14
+
15
+ return {
16
+ post,
17
+ };
18
+ }
19
+ }
20
+
21
+ export const Verifications = new VerificationsApi();