faithteams-api 4.2.0 → 4.6.1

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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/editorconfig.yml +2 -2
  3. data/.github/workflows/rubocop.yml +2 -2
  4. data/.github/workflows/rubygems.yml +2 -2
  5. data/.github/workflows/tester.yml +2 -2
  6. data/.github/workflows/yard.yml +2 -2
  7. data/.gitignore +1 -0
  8. data/.rubocop.yml +1 -2
  9. data/.tool-versions +1 -2
  10. data/CHANGELOG.md +37 -0
  11. data/Gemfile +5 -0
  12. data/Gemfile.lock +81 -70
  13. data/README.md +19 -0
  14. data/faithteams-api/.env.template +4 -0
  15. data/faithteams-api/Authenticate.bru +25 -0
  16. data/faithteams-api/api-v2.faithteams.com/Batch/Batch Create.bru +23 -0
  17. data/faithteams-api/api-v2.faithteams.com/Batch/Batch Totals.bru +19 -0
  18. data/faithteams-api/api-v2.faithteams.com/Batch/Batch Update.bru +27 -0
  19. data/faithteams-api/api-v2.faithteams.com/Batch/Batch.bru +15 -0
  20. data/faithteams-api/api-v2.faithteams.com/Batch/Batches.bru +32 -0
  21. data/faithteams-api/api-v2.faithteams.com/Batch/folder.bru +8 -0
  22. data/faithteams-api/api-v2.faithteams.com/Contribution/Contribution Create.bru +40 -0
  23. data/faithteams-api/api-v2.faithteams.com/Contribution/Contribution.bru +15 -0
  24. data/faithteams-api/api-v2.faithteams.com/Contribution/Contributions.bru +34 -0
  25. data/faithteams-api/api-v2.faithteams.com/Contribution/folder.bru +8 -0
  26. data/faithteams-api/api-v2.faithteams.com/Contribution Type/Contribution Type.bru +15 -0
  27. data/faithteams-api/api-v2.faithteams.com/Contribution Type/Contribution Types.bru +20 -0
  28. data/faithteams-api/api-v2.faithteams.com/Contribution Type/folder.bru +8 -0
  29. data/faithteams-api/api-v2.faithteams.com/Error/Integer Too Big.bru +15 -0
  30. data/faithteams-api/api-v2.faithteams.com/Error/Not Found.bru +15 -0
  31. data/faithteams-api/api-v2.faithteams.com/Error/folder.bru +8 -0
  32. data/faithteams-api/api-v2.faithteams.com/Fund/Fund Create.bru +30 -0
  33. data/faithteams-api/api-v2.faithteams.com/Fund/Fund Update.bru +32 -0
  34. data/faithteams-api/api-v2.faithteams.com/Fund/Fund.bru +15 -0
  35. data/faithteams-api/api-v2.faithteams.com/Fund/Funds.bru +20 -0
  36. data/faithteams-api/api-v2.faithteams.com/Fund/folder.bru +8 -0
  37. data/faithteams-api/api-v2.faithteams.com/folder.bru +13 -0
  38. data/faithteams-api/app.faithteams.com-api-v2/Authenticate.bru +26 -0
  39. data/faithteams-api/app.faithteams.com-api-v2/Checkins.bru +15 -0
  40. data/faithteams-api/app.faithteams.com-api-v2/Error/Not Found 2.bru +15 -0
  41. data/faithteams-api/app.faithteams.com-api-v2/Error/Not Found.bru +15 -0
  42. data/faithteams-api/app.faithteams.com-api-v2/Error/folder.bru +8 -0
  43. data/faithteams-api/app.faithteams.com-api-v2/People/Create Person.bru +28 -0
  44. data/faithteams-api/app.faithteams.com-api-v2/People/People Memberships.bru +15 -0
  45. data/faithteams-api/app.faithteams.com-api-v2/People/People.bru +27 -0
  46. data/faithteams-api/app.faithteams.com-api-v2/People/Person Tags.bru +15 -0
  47. data/faithteams-api/app.faithteams.com-api-v2/People/Person.bru +15 -0
  48. data/faithteams-api/app.faithteams.com-api-v2/People/Update Person.bru +26 -0
  49. data/faithteams-api/app.faithteams.com-api-v2/People/folder.bru +8 -0
  50. data/faithteams-api/app.faithteams.com-api-v2/Rules.bru +15 -0
  51. data/faithteams-api/app.faithteams.com-api-v2/Team & Organization/Organization.bru +15 -0
  52. data/faithteams-api/app.faithteams.com-api-v2/Team & Organization/Teams.bru +21 -0
  53. data/faithteams-api/app.faithteams.com-api-v2/Team & Organization/folder.bru +8 -0
  54. data/faithteams-api/app.faithteams.com-api-v2/Unsubscribes.bru +19 -0
  55. data/faithteams-api/app.faithteams.com-api-v2/User/User.bru +15 -0
  56. data/faithteams-api/app.faithteams.com-api-v2/User/Users.bru +24 -0
  57. data/faithteams-api/app.faithteams.com-api-v2/User/folder.bru +8 -0
  58. data/faithteams-api/app.faithteams.com-api-v2/folder.bru +12 -0
  59. data/faithteams-api/bruno.json +9 -0
  60. data/faithteams-api/environments/FaithTeams.bru +17 -0
  61. data/faithteams-api.gemspec +6 -9
  62. data/lib/faithteams/version.rb +1 -1
  63. metadata +64 -56
@@ -0,0 +1,34 @@
1
+ meta {
2
+ name: Contributions
3
+ type: http
4
+ seq: 1
5
+ }
6
+
7
+ get {
8
+ url: https://api-v2.faithteams.com/contributions?startDt=1923-01-01&endDt=2033-01-01&resultType=sum&statuses=A
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ params:query {
14
+ startDt: 1923-01-01
15
+ endDt: 2033-01-01
16
+ resultType: sum
17
+ statuses: A
18
+ ~filters: true
19
+ ~personIds: 769839
20
+ ~groupBy: personId,fundId
21
+ ~limit: 500
22
+ ~sort: dtm
23
+ ~sortDirection: asc
24
+ }
25
+
26
+ script:post-response {
27
+ let body = res.getBody();
28
+ bru.setEnvVar("contribution_id", String(body.data[0].contributionId));
29
+ bru.setEnvVar("contribution_parent_id", String(body.data[0].parentId));
30
+ }
31
+
32
+ settings {
33
+ encodeUrl: true
34
+ }
@@ -0,0 +1,8 @@
1
+ meta {
2
+ name: Contribution
3
+ seq: 3
4
+ }
5
+
6
+ auth {
7
+ mode: inherit
8
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: Contribution Type
3
+ type: http
4
+ seq: 2
5
+ }
6
+
7
+ get {
8
+ url: https://api-v2.faithteams.com/contributiontypes/{{contribution_type_id}}
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,20 @@
1
+ meta {
2
+ name: Contribution Types
3
+ type: http
4
+ seq: 1
5
+ }
6
+
7
+ get {
8
+ url: https://api-v2.faithteams.com/contributiontypes
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ script:post-response {
14
+ let body = res.getBody();
15
+ bru.setEnvVar("contribution_type_id", String(body.data[0].contributionTypeId));
16
+ }
17
+
18
+ settings {
19
+ encodeUrl: true
20
+ }
@@ -0,0 +1,8 @@
1
+ meta {
2
+ name: Contribution Type
3
+ seq: 4
4
+ }
5
+
6
+ auth {
7
+ mode: inherit
8
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: Integer Too Big
3
+ type: http
4
+ seq: 2
5
+ }
6
+
7
+ get {
8
+ url: https://api-v2.faithteams.com/contributiontypes/9999999999999
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: Not Found
3
+ type: http
4
+ seq: 1
5
+ }
6
+
7
+ get {
8
+ url: https://api-v2.faithteams.com/contributiontypes/9999999
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,8 @@
1
+ meta {
2
+ name: Error
3
+ seq: 5
4
+ }
5
+
6
+ auth {
7
+ mode: inherit
8
+ }
@@ -0,0 +1,30 @@
1
+ meta {
2
+ name: Fund Create
3
+ type: http
4
+ seq: 3
5
+ }
6
+
7
+ post {
8
+ url: https://api-v2.faithteams.com/funds
9
+ body: json
10
+ auth: inherit
11
+ }
12
+
13
+ body:json {
14
+ {
15
+ "fundId":-1,
16
+ "name":"Cat Fund",
17
+ "description":"$$ for kitties",
18
+ "status":"A",
19
+ "onlineStatus":"I",
20
+ "taxDeductible":"Y",
21
+ "isDefault":"N",
22
+ "sort":1,
23
+ "showInternally":true,
24
+ "showExternally":false
25
+ }
26
+ }
27
+
28
+ settings {
29
+ encodeUrl: true
30
+ }
@@ -0,0 +1,32 @@
1
+ meta {
2
+ name: Fund Update
3
+ type: http
4
+ seq: 4
5
+ }
6
+
7
+ put {
8
+ url: https://api-v2.faithteams.com/funds/{{fund_id}}
9
+ body: json
10
+ auth: inherit
11
+ }
12
+
13
+ body:json {
14
+ {
15
+ "name": "Doggy Fund",
16
+ "description": "$ for the pups",
17
+ "status": "A",
18
+ "onlineStatus": "I",
19
+ "sort": 0,
20
+ "taxDeductible": "Y",
21
+ "isDefault": "Y",
22
+ "createdDtm": "2023-04-17 15:01:26",
23
+ "createdUser": 27850,
24
+ "updatedDtm": "2023-04-17 15:21:37",
25
+ "updatedUser": 27850,
26
+ "defaultFund": true
27
+ }
28
+ }
29
+
30
+ settings {
31
+ encodeUrl: true
32
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: Fund
3
+ type: http
4
+ seq: 2
5
+ }
6
+
7
+ get {
8
+ url: https://api-v2.faithteams.com/funds/{{fund_id}}
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,20 @@
1
+ meta {
2
+ name: Funds
3
+ type: http
4
+ seq: 1
5
+ }
6
+
7
+ get {
8
+ url: https://api-v2.faithteams.com/funds
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ script:post-response {
14
+ let body = res.getBody();
15
+ bru.setEnvVar("fund_id", String(body.data[0].fundId));
16
+ }
17
+
18
+ settings {
19
+ encodeUrl: true
20
+ }
@@ -0,0 +1,8 @@
1
+ meta {
2
+ name: Fund
3
+ seq: 2
4
+ }
5
+
6
+ auth {
7
+ mode: inherit
8
+ }
@@ -0,0 +1,13 @@
1
+ meta {
2
+ name: api-v2.faithteams.com
3
+ seq: 3
4
+ }
5
+
6
+ auth {
7
+ mode: basic
8
+ }
9
+
10
+ auth:basic {
11
+ username: {{process.env.user_id}}
12
+ password: {{process.env.password}}
13
+ }
@@ -0,0 +1,26 @@
1
+ meta {
2
+ name: Authenticate
3
+ type: http
4
+ seq: 8
5
+ }
6
+
7
+ post {
8
+ url: https://app.faithteams.com/api/v2/authenticate
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ script:pre-request {
14
+ // Require the btoa library
15
+ const btoa = require('btoa');
16
+ // Get the username and password from environment variables
17
+ const authorization = bru.getEnvVar("user_id") + ":" + bru.getEnvVar("password");
18
+ // Encode the credentials using btoa()
19
+ const authorizationBase64 = btoa(authorization);
20
+ // Set the Authorization header with the Base64-encoded string
21
+ req.setHeader("Authorization", "Basic " + authorizationBase64);
22
+ }
23
+
24
+ settings {
25
+ encodeUrl: true
26
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: Checkins
3
+ type: http
4
+ seq: 6
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/checkins
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: Not Found 2
3
+ type: http
4
+ seq: 2
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/people/memberships/10
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: Not Found
3
+ type: http
4
+ seq: 1
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/tags
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,8 @@
1
+ meta {
2
+ name: Error
3
+ seq: 4
4
+ }
5
+
6
+ auth {
7
+ mode: inherit
8
+ }
@@ -0,0 +1,28 @@
1
+ meta {
2
+ name: Create Person
3
+ type: http
4
+ seq: 3
5
+ }
6
+
7
+ post {
8
+ url: https://app.faithteams.com/api/v2/people
9
+ body: json
10
+ auth: inherit
11
+ }
12
+
13
+ body:json {
14
+ {
15
+ "firstName": "Bart",
16
+ "lastName": "Simpson",
17
+ "gender": "M"
18
+ }
19
+ }
20
+
21
+ script:post-response {
22
+ let body = res.getBody();
23
+ bru.setEnvVar("person_id_created", body.data.personId);
24
+ }
25
+
26
+ settings {
27
+ encodeUrl: true
28
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: People Memberships
3
+ type: http
4
+ seq: 5
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/people/memberships
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,27 @@
1
+ meta {
2
+ name: People
3
+ type: http
4
+ seq: 1
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/people?status=A
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ params:query {
14
+ status: A
15
+ ~lastName: Simpson
16
+ ~firstName: Homer
17
+ ~homeEmail: bart@simpsons.com
18
+ }
19
+
20
+ script:post-response {
21
+ let body = res.getBody();
22
+ bru.setEnvVar("person_id", body.data[0].personId);
23
+ }
24
+
25
+ settings {
26
+ encodeUrl: true
27
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: Person Tags
3
+ type: http
4
+ seq: 6
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/people/{{person_id}}/tags
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: Person
3
+ type: http
4
+ seq: 2
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/people/{{person_id}}
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,26 @@
1
+ meta {
2
+ name: Update Person
3
+ type: http
4
+ seq: 4
5
+ }
6
+
7
+ put {
8
+ url: https://app.faithteams.com/api/v2/people/{{person_id_created}}
9
+ body: json
10
+ auth: inherit
11
+ }
12
+
13
+ body:json {
14
+ {
15
+ "firstName": "Maggie",
16
+ "lastName": "Simpson",
17
+ "status":"A",
18
+ "homeEmail":"bart@the_simpsons.com",
19
+ "createdDtm":"2023-04-21 13:08:51",
20
+ "createdUser":"27850"
21
+ }
22
+ }
23
+
24
+ settings {
25
+ encodeUrl: true
26
+ }
@@ -0,0 +1,8 @@
1
+ meta {
2
+ name: People
3
+ seq: 1
4
+ }
5
+
6
+ auth {
7
+ mode: inherit
8
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: Rules
3
+ type: http
4
+ seq: 5
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/rules
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: Organization
3
+ type: http
4
+ seq: 2
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/orgs/{{organization_id}}
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,21 @@
1
+ meta {
2
+ name: Teams
3
+ type: http
4
+ seq: 1
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/teams
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ script:post-response {
14
+ let body = res.getBody();
15
+ bru.setEnvVar("organization_id", body.data[0].orgId);
16
+ bru.setEnvVar("team_id", body.data[0].teamId);
17
+ }
18
+
19
+ settings {
20
+ encodeUrl: true
21
+ }
@@ -0,0 +1,8 @@
1
+ meta {
2
+ name: Team & Organization
3
+ seq: 3
4
+ }
5
+
6
+ auth {
7
+ mode: inherit
8
+ }
@@ -0,0 +1,19 @@
1
+ meta {
2
+ name: Unsubscribes
3
+ type: http
4
+ seq: 7
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/unsubscribes?personId={{person_id}}
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ params:query {
14
+ personId: {{person_id}}
15
+ }
16
+
17
+ settings {
18
+ encodeUrl: true
19
+ }
@@ -0,0 +1,15 @@
1
+ meta {
2
+ name: User
3
+ type: http
4
+ seq: 2
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/users/{{user_id}}
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ settings {
14
+ encodeUrl: true
15
+ }
@@ -0,0 +1,24 @@
1
+ meta {
2
+ name: Users
3
+ type: http
4
+ seq: 1
5
+ }
6
+
7
+ get {
8
+ url: https://app.faithteams.com/api/v2/users?noloadmask=true
9
+ body: none
10
+ auth: inherit
11
+ }
12
+
13
+ params:query {
14
+ noloadmask: true
15
+ }
16
+
17
+ script:post-response {
18
+ let body = res.getBody();
19
+ bru.setEnvVar("user_id", String(body.data[0].userId));
20
+ }
21
+
22
+ settings {
23
+ encodeUrl: true
24
+ }
@@ -0,0 +1,8 @@
1
+ meta {
2
+ name: User
3
+ seq: 2
4
+ }
5
+
6
+ auth {
7
+ mode: inherit
8
+ }
@@ -0,0 +1,12 @@
1
+ meta {
2
+ name: app.faithteams.com/api/v2
3
+ seq: 2
4
+ }
5
+
6
+ headers {
7
+ Token: {{auth_token}}
8
+ }
9
+
10
+ auth {
11
+ mode: inherit
12
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "1",
3
+ "name": "faithteams-api",
4
+ "type": "collection",
5
+ "ignore": [
6
+ "node_modules",
7
+ ".git"
8
+ ]
9
+ }
@@ -0,0 +1,17 @@
1
+ vars {
2
+ person_id: 1011272
3
+ person_id_created: 1109570
4
+ organization_id: 3425
5
+ team_id: 7257
6
+ batch_id: 204480
7
+ batch_id_2: 204482
8
+ fund_id: 7895
9
+ contribution_id: 5384950
10
+ contribution_parent_id: 5384949
11
+ contribution_type_id: 8004
12
+ }
13
+ vars:secret [
14
+ auth_token,
15
+ user_id,
16
+ password
17
+ ]