@churchsoln/dbms 1.0.47 → 1.0.49

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 (145) hide show
  1. package/Dockerfile +21 -21
  2. package/Makefile +132 -132
  3. package/app.js +37 -37
  4. package/config/config.js +33 -33
  5. package/config/errorCodes.js +65 -65
  6. package/config/errorMsgs.js +82 -82
  7. package/constants/index.js +94 -94
  8. package/controllers/church.js +100 -100
  9. package/controllers/index.js +6 -6
  10. package/controllers/master.js +138 -138
  11. package/controllers/migration.js +24 -24
  12. package/controllers/seed.js +33 -33
  13. package/db-setup.js +87 -87
  14. package/deployment/docker-compose.local.yml +64 -64
  15. package/deployment/docker-compose.yml +62 -62
  16. package/deployment/nginx/nginx-certs/localhost.crt +22 -22
  17. package/deployment/nginx/nginx-certs/localhost.key +28 -28
  18. package/deployment/nginx/nginx.local.conf +72 -72
  19. package/middlewares/church-filter.js +16 -16
  20. package/migrations/church/20221226151615-create-province.js +27 -27
  21. package/migrations/church/20221226151616-create-city.js +41 -41
  22. package/migrations/church/20221226151617-create-subRole.js +25 -25
  23. package/migrations/church/20221226151618-create-membership.js +68 -68
  24. package/migrations/church/20221226151619-create-member.js +140 -140
  25. package/migrations/church/20221227151615-create-user.js +60 -60
  26. package/migrations/church/20230826140644-create-eventsUpdates.js +29 -29
  27. package/migrations/church/20230904143429-create-ministries.js +26 -26
  28. package/migrations/church/20231021160018-create-gallery.js +28 -28
  29. package/migrations/church/20231105074019-create-feedback.js +28 -28
  30. package/migrations/church/20231111113342-create-banner.js +29 -29
  31. package/migrations/church/20231216105640-create-directoryBoard.js +31 -31
  32. package/migrations/church/20240214160101-create-volunteer.js +31 -31
  33. package/migrations/church/20240330111437-create-download.js +29 -29
  34. package/migrations/church/20240427170617-create-links.js +26 -26
  35. package/migrations/church/20240815170617-create-userTransfer.js +63 -63
  36. package/migrations/church/20240815170620-create-subRolePermission.js +40 -40
  37. package/migrations/church/20240915170620-create-transferType.js +25 -25
  38. package/migrations/church/20240917170620-create-accounts.js +27 -27
  39. package/migrations/church/20240918170621-create-church.js +54 -54
  40. package/migrations/church/20240918170622-create-group.js +61 -61
  41. package/migrations/church/20240918170623-create-groupMembers.js +74 -74
  42. package/migrations/church/20240918170627-create-pledge.js +96 -96
  43. package/migrations/church/20240919170627-create-contributionBatch.js +42 -42
  44. package/migrations/church/20240919170628-create-contributionTransaction.js +82 -82
  45. package/migrations/church/20240919170629-create-contributionTransactionLine.js +74 -74
  46. package/migrations/church/20240919170630-update-groupMembers.js +77 -77
  47. package/migrations/church/20241204170631-create-pledgeAccount.js +55 -55
  48. package/migrations/church/20241204170632-create-memberStatus.js +26 -0
  49. package/migrations/church/20241204170633-update-member.js +33 -0
  50. package/migrations/church/20241204170634-update-membership.js +33 -0
  51. package/migrations/church/20241204170635-update-pledge.js +33 -0
  52. package/migrations/church/20241204170636-update-contributionTransactionLine.js +33 -0
  53. package/migrations/common/20221226140655-create-subscriptionPlan.js +31 -31
  54. package/migrations/common/20221226143006-create-role.js +25 -25
  55. package/migrations/common/20240815170619-create-permission.js +27 -27
  56. package/migrations/common/20240815170620-create-church.js +56 -56
  57. package/migrations/common/20240815170621-create-churchDomain.js +40 -40
  58. package/migrations/common/20240918170621-create-churchPermission.js +53 -53
  59. package/migrations/common/20240918170622-create-user.js +35 -35
  60. package/migrations/common/20240918170627-create-subscriptionPlanPermission.js +53 -53
  61. package/models/church/accounts.js +23 -27
  62. package/models/church/banner.js +29 -29
  63. package/models/church/church.js +62 -62
  64. package/models/church/city.js +23 -23
  65. package/models/church/contributionBatch.js +45 -45
  66. package/models/church/contributionTransaction.js +90 -90
  67. package/models/church/contributionTransactionLine.js +81 -80
  68. package/models/church/directoryBoard.js +33 -33
  69. package/models/church/download.js +35 -35
  70. package/models/church/eventsUpdates.js +29 -29
  71. package/models/church/feedback.js +27 -27
  72. package/models/church/gallery.js +33 -33
  73. package/models/church/group.js +78 -78
  74. package/models/church/groupMembers.js +73 -73
  75. package/models/church/index.js +30 -30
  76. package/models/church/links.js +22 -22
  77. package/models/church/member.js +161 -171
  78. package/models/church/memberStatus.js +22 -0
  79. package/models/church/membership.js +80 -81
  80. package/models/church/ministries.js +16 -16
  81. package/models/church/pledge.js +65 -65
  82. package/models/church/pledgeAccount.js +45 -37
  83. package/models/church/province.js +23 -23
  84. package/models/church/subRole.js +21 -21
  85. package/models/church/subRolePermission.js +22 -22
  86. package/models/church/transferType.js +15 -15
  87. package/models/church/user.js +78 -78
  88. package/models/church/userTransfer.js +45 -45
  89. package/models/church/volunteer.js +33 -33
  90. package/models/common/church.js +58 -58
  91. package/models/common/churchDomain.js +21 -21
  92. package/models/common/churchPermission.js +26 -26
  93. package/models/common/index.js +40 -40
  94. package/models/common/permission.js +17 -17
  95. package/models/common/role.js +15 -15
  96. package/models/common/subscriptionPlan.js +34 -34
  97. package/models/common/subscriptionPlanPermission.js +33 -33
  98. package/models/common/user.js +39 -39
  99. package/package.json +41 -41
  100. package/public/swagger/church.json +521 -521
  101. package/public/swagger/master.json +537 -537
  102. package/public/swagger/migration.json +83 -83
  103. package/public/swagger/seed.json +98 -98
  104. package/queues/db-create.js +9 -9
  105. package/queues/index.js +5 -5
  106. package/queues/master.js +9 -9
  107. package/queues/migration.js +9 -9
  108. package/queues/seed.js +9 -9
  109. package/redis/config.js +5 -5
  110. package/routes/index.js +30 -30
  111. package/routes/v1/church.js +45 -45
  112. package/routes/v1/index.js +7 -7
  113. package/routes/v1/master.js +68 -68
  114. package/routes/v1/migration.js +10 -10
  115. package/routes/v1/seed.js +12 -12
  116. package/seeders/church/20241005124245-province.js +101 -101
  117. package/seeders/church/20241005124547-city.js +87 -87
  118. package/seeders/church/20241005131418-transferType.js +40 -40
  119. package/seeders/church/20241005131419-memberStatus.js +34 -0
  120. package/seeders/common/20241005123516-subscriptionPlan.js +43 -43
  121. package/seeders/common/20241005124105-role.js +38 -38
  122. package/seeders/common/20241005153047-permission.js +252 -242
  123. package/seeders/common/20241005153048-user.js +48 -48
  124. package/services/church.js +312 -312
  125. package/services/index.js +6 -6
  126. package/services/master.js +344 -344
  127. package/services/migration.js +30 -30
  128. package/services/seed.js +39 -39
  129. package/utils/churchManager.js +98 -98
  130. package/utils/crypto.js +40 -40
  131. package/utils/docUpload.js +51 -51
  132. package/utils/encryptDecrypt.js +26 -26
  133. package/utils/index.js +33 -33
  134. package/utils/logger.js +104 -104
  135. package/utils/response.js +108 -108
  136. package/utils/swagger.js +25 -25
  137. package/utils/verifyToken.js +58 -58
  138. package/validators/church.js +154 -154
  139. package/validators/index.js +3 -3
  140. package/validators/master.js +152 -152
  141. package/workers/db-create.js +37 -37
  142. package/workers/index.js +4 -4
  143. package/workers/master.js +50 -50
  144. package/workers/migrations.js +63 -63
  145. package/workers/seed.js +85 -85
@@ -1,521 +1,521 @@
1
- {
2
- "openapi": "3.0.0",
3
- "info": {
4
- "title": "CHURCH_SOLN",
5
- "contact": {},
6
- "version": "v1"
7
- },
8
- "servers": [
9
- {
10
- "url": "http://localhost:5007/dbms/api/v1",
11
- "description": "Local"
12
- },
13
- {
14
- "url": "https://api-internal.churchsoln.com/dbms/api/v1",
15
- "description": "Development"
16
- }
17
- ],
18
- "security": [
19
- {
20
- "Authorization": [],
21
- "token": []
22
- }
23
- ],
24
- "tags": [
25
- {
26
- "name": "Login API"
27
- },
28
- {
29
- "name": "Church API's"
30
- },
31
- {
32
- "name": "Church Permission API's"
33
- }
34
- ],
35
- "paths": {
36
- "/church": {
37
- "post": {
38
- "tags": ["Church API's"],
39
- "summary": "Onboard New Church",
40
- "operationId": "Onboard New Church",
41
- "parameters": [],
42
- "requestBody": {
43
- "content": {
44
- "application/json": {
45
- "schema": {
46
- "$ref": "#/components/schemas/OnboardNewDataRequest"
47
- },
48
- "example": {
49
- "name": "Xavier",
50
- "email": "email",
51
- "phoneNumber": "1234",
52
- "contactPerson": "string",
53
- "subscriptionPlanId": 1,
54
- "validity": 30,
55
- "permissionId": [1],
56
- "churchAdminDetails": {
57
- "username": "churchadmin",
58
- "email": "churchadmin@xavier.com",
59
- "password": "Church@123",
60
- "firstName": "Jose",
61
- "lastName": "Mathew"
62
- }
63
- }
64
- }
65
- },
66
- "required": true
67
- },
68
- "responses": {
69
- "200": {
70
- "description": "OK"
71
- }
72
- },
73
- "deprecated": false
74
- },
75
- "get": {
76
- "tags": ["Church API's"],
77
- "summary": "Get All Church with search",
78
- "operationId": "Get All Church with search",
79
- "parameters": [
80
- {
81
- "name": "search",
82
- "in": "query",
83
- "required": false,
84
- "style": "form",
85
- "explode": true,
86
- "schema": {
87
- "type": "string",
88
- "example": ""
89
- }
90
- }
91
- ],
92
- "requestBody": {},
93
- "responses": {
94
- "200": {
95
- "description": "OK"
96
- }
97
- },
98
- "deprecated": false
99
- }
100
- },
101
- "/church/{id}": {
102
- "get": {
103
- "tags": ["Church API's"],
104
- "summary": "Get Church by id",
105
- "operationId": "Get Church by id",
106
- "parameters": [
107
- {
108
- "name": "id",
109
- "in": "path",
110
- "required": true,
111
- "style": "form",
112
- "explode": true,
113
- "schema": {
114
- "type": "integer",
115
- "format": "int32",
116
- "example": 1
117
- }
118
- }
119
- ],
120
- "requestBody": {},
121
- "responses": {
122
- "200": {
123
- "description": "OK"
124
- }
125
- },
126
- "deprecated": false
127
- },
128
- "patch": {
129
- "tags": ["Church API's"],
130
- "summary": "Update Church by id",
131
- "operationId": "Update Church by id",
132
- "parameters": [
133
- {
134
- "name": "id",
135
- "in": "path",
136
- "required": true,
137
- "style": "form",
138
- "explode": true,
139
- "schema": {
140
- "type": "integer",
141
- "format": "int32",
142
- "example": 1
143
- }
144
- }
145
- ],
146
- "requestBody": {
147
- "content": {
148
- "application/json": {
149
- "schema": {
150
- "$ref": "#/components/schemas/UpdateChurchDataRequest"
151
- },
152
- "example": {
153
- "name": "Xavier",
154
- "email": "email",
155
- "phoneNumber": "1234",
156
- "contactPerson": "string",
157
- "subscriptionPlanId": 1,
158
- "validity": 30,
159
- "permissionId": [1],
160
- "status": true
161
- }
162
- }
163
- }
164
- },
165
- "responses": {
166
- "200": {
167
- "description": "OK"
168
- }
169
- },
170
- "deprecated": false
171
- }
172
- },
173
- "/church/upload-file": {
174
- "post": {
175
- "tags": ["Church API's"],
176
- "summary": "Upload file",
177
- "operationId": "Upload file",
178
- "parameters": [],
179
- "requestBody": {
180
- "content": {
181
- "multipart/form-data": {
182
- "schema": {
183
- "$ref": "#/components/schemas/UploadFileDataRequest"
184
- },
185
- "encoding": {}
186
- }
187
- },
188
- "required": false
189
- },
190
- "responses": {
191
- "200": {
192
- "description": "OK"
193
- }
194
- },
195
- "deprecated": false
196
- }
197
- },
198
- "/church/{churchId}/permission": {
199
- "post": {
200
- "tags": ["Church Permission API's"],
201
- "summary": "Add Church Permission",
202
- "operationId": "Add Church Permission",
203
- "parameters": [
204
- {
205
- "name": "churchId",
206
- "in": "path",
207
- "required": true,
208
- "style": "form",
209
- "explode": true,
210
- "schema": {
211
- "type": "integer",
212
- "format": "int32",
213
- "example": 1
214
- }
215
- }
216
- ],
217
- "requestBody": {
218
- "content": {
219
- "application/json": {
220
- "schema": {
221
- "$ref": "#/components/schemas/AddChurchPermissionDataRequest"
222
- },
223
- "example": {
224
- "permissionId": [1]
225
- }
226
- }
227
- },
228
- "required": false
229
- },
230
- "responses": {
231
- "200": {
232
- "description": "OK"
233
- }
234
- },
235
- "deprecated": false
236
- },
237
- "get": {
238
- "tags": ["Church Permission API's"],
239
- "summary": "Get All Church's Permission",
240
- "operationId": "Get All Church's Permission",
241
- "parameters": [
242
- {
243
- "name": "churchId",
244
- "in": "path",
245
- "required": true,
246
- "style": "form",
247
- "explode": true,
248
- "schema": {
249
- "type": "integer",
250
- "format": "int32",
251
- "example": 1
252
- }
253
- }
254
- ],
255
- "requestBody": {},
256
- "responses": {
257
- "200": {
258
- "description": "OK"
259
- }
260
- },
261
- "deprecated": false
262
- }
263
- },
264
- "/church/{churchId}/permission/{id}": {
265
- "delete": {
266
- "tags": ["Church Permission API's"],
267
- "summary": "Delete Church Permission by id",
268
- "operationId": "Delete Church Permission by id",
269
- "parameters": [
270
- {
271
- "name": "churchId",
272
- "in": "path",
273
- "required": true,
274
- "style": "form",
275
- "explode": true,
276
- "schema": {
277
- "type": "integer",
278
- "format": "int32",
279
- "example": 1
280
- }
281
- },
282
- {
283
- "name": "id",
284
- "in": "path",
285
- "required": true,
286
- "style": "form",
287
- "explode": true,
288
- "schema": {
289
- "type": "integer",
290
- "format": "int32",
291
- "example": 1
292
- }
293
- }
294
- ],
295
- "requestBody": {},
296
- "responses": {
297
- "200": {
298
- "description": "OK"
299
- }
300
- },
301
- "deprecated": false
302
- }
303
- },
304
- "/church/login": {
305
- "post": {
306
- "tags": ["Login API"],
307
- "summary": "Super Admin Login",
308
- "operationId": "Super Admin Login",
309
- "parameters": [],
310
- "requestBody": {
311
- "content": {
312
- "application/json": {
313
- "schema": {
314
- "$ref": "#/components/schemas/SuperAdminLoginDataRequest"
315
- },
316
- "example": {
317
- "username": "admin@churchsoln.com",
318
- "password": "ChurchsolnAdmin2025!"
319
- }
320
- }
321
- },
322
- "required": true
323
- },
324
- "responses": {
325
- "200": {
326
- "description": "OK"
327
- }
328
- },
329
- "deprecated": false
330
- }
331
- }
332
- },
333
- "components": {
334
- "schemas": {
335
- "OnboardNewDataRequest": {
336
- "title": "OnboardNewDataRequest",
337
- "required": [
338
- "name",
339
- "email",
340
- "phoneNumber",
341
- "contactPerson",
342
- "subscriptionPlanId",
343
- "validity",
344
- "churchAdminDetails"
345
- ],
346
- "type": "object",
347
- "properties": {
348
- "name": {
349
- "type": "string"
350
- },
351
- "email": {
352
- "type": "string"
353
- },
354
- "phoneNumber": {
355
- "type": "string"
356
- },
357
- "contactPerson": {
358
- "type": "string"
359
- },
360
- "subscriptionPlanId": {
361
- "type": "integer",
362
- "format": "int32"
363
- },
364
- "validity": {
365
- "type": "integer",
366
- "format": "int32"
367
- },
368
- "permissionId": {
369
- "type": "array",
370
- "items": {
371
- "type": "number"
372
- }
373
- },
374
- "churchAdminDetails": {
375
- "type": "object",
376
- "$ref": "#/components/schemas/ChurchAdminDataRequest"
377
- }
378
- },
379
- "example": {
380
- "name": "Xavier",
381
- "email": "email",
382
- "phoneNumber": "1234",
383
- "contactPerson": "string",
384
- "subscriptionPlanId": 1,
385
- "validity": 30,
386
- "permissionId": [1],
387
- "churchAdminDetails": {
388
- "username": "churchadmin",
389
- "email": "churchadmin@xavier.com",
390
- "password": "Church@123",
391
- "firstName": "Jose",
392
- "lastName": "Mathew"
393
- }
394
- }
395
- },
396
- "UpdateChurchDataRequest": {
397
- "title": "UpdateChurchDataRequest",
398
- "required": [],
399
- "type": "object",
400
- "properties": {
401
- "name": {
402
- "type": "string"
403
- },
404
- "email": {
405
- "type": "string"
406
- },
407
- "phoneNumber": {
408
- "type": "string"
409
- },
410
- "contactPerson": {
411
- "type": "string"
412
- },
413
- "subscriptionPlanId": {
414
- "type": "integer",
415
- "format": "int32"
416
- },
417
- "validity": {
418
- "type": "integer",
419
- "format": "int32"
420
- },
421
- "permissionId": {
422
- "type": "array",
423
- "items": {
424
- "type": "number"
425
- }
426
- },
427
- "status": {
428
- "type": "boolean"
429
- }
430
- },
431
- "example": {
432
- "name": "Xavier",
433
- "email": "email",
434
- "phoneNumber": "1234",
435
- "contactPerson": "string",
436
- "subscriptionPlanId": 1,
437
- "validity": 30,
438
- "permissionId": [1],
439
- "status": true
440
- }
441
- },
442
- "ChurchAdminDataRequest": {
443
- "title": "ChurchAdminDataRequest",
444
- "required": ["username", "email", "password", "firstName", "lastName"],
445
- "type": "object",
446
- "properties": {
447
- "username": {
448
- "type": "string"
449
- },
450
- "email": {
451
- "type": "string"
452
- },
453
- "password": {
454
- "type": "string"
455
- },
456
- "firstName": {
457
- "type": "string"
458
- },
459
- "lastName": {
460
- "type": "string"
461
- }
462
- },
463
- "example": {
464
- "username": "churchadmin",
465
- "email": "churchadmin@xavier.com",
466
- "password": "Church@123",
467
- "firstName": "Jose",
468
- "lastName": "Mathew"
469
- }
470
- },
471
- "SuperAdminLoginDataRequest": {
472
- "title": "SuperAdminLoginDataRequest",
473
- "required": ["username", "password"],
474
- "type": "object",
475
- "properties": {
476
- "username": {
477
- "type": "string"
478
- },
479
- "password": {
480
- "type": "string"
481
- }
482
- },
483
- "example": {
484
- "username": "admin@churchsoln.com",
485
- "password": "ChurchsolnAdmin2023Admin2025!"
486
- }
487
- },
488
- "AddChurchPermissionDataRequest": {
489
- "title": "AddChurchPermissionDataRequest",
490
- "required": ["permissionId"],
491
- "type": "object",
492
- "properties": {
493
- "permissionId": {
494
- "type": "array",
495
- "items": {
496
- "type": "number"
497
- }
498
- }
499
- }
500
- },
501
- "UploadFileDataRequest": {
502
- "title": "UploadFileDataRequest",
503
- "required": ["file"],
504
- "type": "object",
505
- "properties": {
506
- "file": {
507
- "type": "string",
508
- "format": "binary"
509
- }
510
- }
511
- }
512
- },
513
- "securitySchemes": {
514
- "token": {
515
- "type": "apiKey",
516
- "in": "header",
517
- "name": "token"
518
- }
519
- }
520
- }
521
- }
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "CHURCH_SOLN",
5
+ "contact": {},
6
+ "version": "v1"
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "http://localhost:5007/dbms/api/v1",
11
+ "description": "Local"
12
+ },
13
+ {
14
+ "url": "https://api-internal.churchsoln.com/dbms/api/v1",
15
+ "description": "Development"
16
+ }
17
+ ],
18
+ "security": [
19
+ {
20
+ "Authorization": [],
21
+ "token": []
22
+ }
23
+ ],
24
+ "tags": [
25
+ {
26
+ "name": "Login API"
27
+ },
28
+ {
29
+ "name": "Church API's"
30
+ },
31
+ {
32
+ "name": "Church Permission API's"
33
+ }
34
+ ],
35
+ "paths": {
36
+ "/church": {
37
+ "post": {
38
+ "tags": ["Church API's"],
39
+ "summary": "Onboard New Church",
40
+ "operationId": "Onboard New Church",
41
+ "parameters": [],
42
+ "requestBody": {
43
+ "content": {
44
+ "application/json": {
45
+ "schema": {
46
+ "$ref": "#/components/schemas/OnboardNewDataRequest"
47
+ },
48
+ "example": {
49
+ "name": "Xavier",
50
+ "email": "email",
51
+ "phoneNumber": "1234",
52
+ "contactPerson": "string",
53
+ "subscriptionPlanId": 1,
54
+ "validity": 30,
55
+ "permissionId": [1],
56
+ "churchAdminDetails": {
57
+ "username": "churchadmin",
58
+ "email": "churchadmin@xavier.com",
59
+ "password": "Church@123",
60
+ "firstName": "Jose",
61
+ "lastName": "Mathew"
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "required": true
67
+ },
68
+ "responses": {
69
+ "200": {
70
+ "description": "OK"
71
+ }
72
+ },
73
+ "deprecated": false
74
+ },
75
+ "get": {
76
+ "tags": ["Church API's"],
77
+ "summary": "Get All Church with search",
78
+ "operationId": "Get All Church with search",
79
+ "parameters": [
80
+ {
81
+ "name": "search",
82
+ "in": "query",
83
+ "required": false,
84
+ "style": "form",
85
+ "explode": true,
86
+ "schema": {
87
+ "type": "string",
88
+ "example": ""
89
+ }
90
+ }
91
+ ],
92
+ "requestBody": {},
93
+ "responses": {
94
+ "200": {
95
+ "description": "OK"
96
+ }
97
+ },
98
+ "deprecated": false
99
+ }
100
+ },
101
+ "/church/{id}": {
102
+ "get": {
103
+ "tags": ["Church API's"],
104
+ "summary": "Get Church by id",
105
+ "operationId": "Get Church by id",
106
+ "parameters": [
107
+ {
108
+ "name": "id",
109
+ "in": "path",
110
+ "required": true,
111
+ "style": "form",
112
+ "explode": true,
113
+ "schema": {
114
+ "type": "integer",
115
+ "format": "int32",
116
+ "example": 1
117
+ }
118
+ }
119
+ ],
120
+ "requestBody": {},
121
+ "responses": {
122
+ "200": {
123
+ "description": "OK"
124
+ }
125
+ },
126
+ "deprecated": false
127
+ },
128
+ "patch": {
129
+ "tags": ["Church API's"],
130
+ "summary": "Update Church by id",
131
+ "operationId": "Update Church by id",
132
+ "parameters": [
133
+ {
134
+ "name": "id",
135
+ "in": "path",
136
+ "required": true,
137
+ "style": "form",
138
+ "explode": true,
139
+ "schema": {
140
+ "type": "integer",
141
+ "format": "int32",
142
+ "example": 1
143
+ }
144
+ }
145
+ ],
146
+ "requestBody": {
147
+ "content": {
148
+ "application/json": {
149
+ "schema": {
150
+ "$ref": "#/components/schemas/UpdateChurchDataRequest"
151
+ },
152
+ "example": {
153
+ "name": "Xavier",
154
+ "email": "email",
155
+ "phoneNumber": "1234",
156
+ "contactPerson": "string",
157
+ "subscriptionPlanId": 1,
158
+ "validity": 30,
159
+ "permissionId": [1],
160
+ "status": true
161
+ }
162
+ }
163
+ }
164
+ },
165
+ "responses": {
166
+ "200": {
167
+ "description": "OK"
168
+ }
169
+ },
170
+ "deprecated": false
171
+ }
172
+ },
173
+ "/church/upload-file": {
174
+ "post": {
175
+ "tags": ["Church API's"],
176
+ "summary": "Upload file",
177
+ "operationId": "Upload file",
178
+ "parameters": [],
179
+ "requestBody": {
180
+ "content": {
181
+ "multipart/form-data": {
182
+ "schema": {
183
+ "$ref": "#/components/schemas/UploadFileDataRequest"
184
+ },
185
+ "encoding": {}
186
+ }
187
+ },
188
+ "required": false
189
+ },
190
+ "responses": {
191
+ "200": {
192
+ "description": "OK"
193
+ }
194
+ },
195
+ "deprecated": false
196
+ }
197
+ },
198
+ "/church/{churchId}/permission": {
199
+ "post": {
200
+ "tags": ["Church Permission API's"],
201
+ "summary": "Add Church Permission",
202
+ "operationId": "Add Church Permission",
203
+ "parameters": [
204
+ {
205
+ "name": "churchId",
206
+ "in": "path",
207
+ "required": true,
208
+ "style": "form",
209
+ "explode": true,
210
+ "schema": {
211
+ "type": "integer",
212
+ "format": "int32",
213
+ "example": 1
214
+ }
215
+ }
216
+ ],
217
+ "requestBody": {
218
+ "content": {
219
+ "application/json": {
220
+ "schema": {
221
+ "$ref": "#/components/schemas/AddChurchPermissionDataRequest"
222
+ },
223
+ "example": {
224
+ "permissionId": [1]
225
+ }
226
+ }
227
+ },
228
+ "required": false
229
+ },
230
+ "responses": {
231
+ "200": {
232
+ "description": "OK"
233
+ }
234
+ },
235
+ "deprecated": false
236
+ },
237
+ "get": {
238
+ "tags": ["Church Permission API's"],
239
+ "summary": "Get All Church's Permission",
240
+ "operationId": "Get All Church's Permission",
241
+ "parameters": [
242
+ {
243
+ "name": "churchId",
244
+ "in": "path",
245
+ "required": true,
246
+ "style": "form",
247
+ "explode": true,
248
+ "schema": {
249
+ "type": "integer",
250
+ "format": "int32",
251
+ "example": 1
252
+ }
253
+ }
254
+ ],
255
+ "requestBody": {},
256
+ "responses": {
257
+ "200": {
258
+ "description": "OK"
259
+ }
260
+ },
261
+ "deprecated": false
262
+ }
263
+ },
264
+ "/church/{churchId}/permission/{id}": {
265
+ "delete": {
266
+ "tags": ["Church Permission API's"],
267
+ "summary": "Delete Church Permission by id",
268
+ "operationId": "Delete Church Permission by id",
269
+ "parameters": [
270
+ {
271
+ "name": "churchId",
272
+ "in": "path",
273
+ "required": true,
274
+ "style": "form",
275
+ "explode": true,
276
+ "schema": {
277
+ "type": "integer",
278
+ "format": "int32",
279
+ "example": 1
280
+ }
281
+ },
282
+ {
283
+ "name": "id",
284
+ "in": "path",
285
+ "required": true,
286
+ "style": "form",
287
+ "explode": true,
288
+ "schema": {
289
+ "type": "integer",
290
+ "format": "int32",
291
+ "example": 1
292
+ }
293
+ }
294
+ ],
295
+ "requestBody": {},
296
+ "responses": {
297
+ "200": {
298
+ "description": "OK"
299
+ }
300
+ },
301
+ "deprecated": false
302
+ }
303
+ },
304
+ "/church/login": {
305
+ "post": {
306
+ "tags": ["Login API"],
307
+ "summary": "Super Admin Login",
308
+ "operationId": "Super Admin Login",
309
+ "parameters": [],
310
+ "requestBody": {
311
+ "content": {
312
+ "application/json": {
313
+ "schema": {
314
+ "$ref": "#/components/schemas/SuperAdminLoginDataRequest"
315
+ },
316
+ "example": {
317
+ "username": "admin@churchsoln.com",
318
+ "password": "ChurchsolnAdmin2025!"
319
+ }
320
+ }
321
+ },
322
+ "required": true
323
+ },
324
+ "responses": {
325
+ "200": {
326
+ "description": "OK"
327
+ }
328
+ },
329
+ "deprecated": false
330
+ }
331
+ }
332
+ },
333
+ "components": {
334
+ "schemas": {
335
+ "OnboardNewDataRequest": {
336
+ "title": "OnboardNewDataRequest",
337
+ "required": [
338
+ "name",
339
+ "email",
340
+ "phoneNumber",
341
+ "contactPerson",
342
+ "subscriptionPlanId",
343
+ "validity",
344
+ "churchAdminDetails"
345
+ ],
346
+ "type": "object",
347
+ "properties": {
348
+ "name": {
349
+ "type": "string"
350
+ },
351
+ "email": {
352
+ "type": "string"
353
+ },
354
+ "phoneNumber": {
355
+ "type": "string"
356
+ },
357
+ "contactPerson": {
358
+ "type": "string"
359
+ },
360
+ "subscriptionPlanId": {
361
+ "type": "integer",
362
+ "format": "int32"
363
+ },
364
+ "validity": {
365
+ "type": "integer",
366
+ "format": "int32"
367
+ },
368
+ "permissionId": {
369
+ "type": "array",
370
+ "items": {
371
+ "type": "number"
372
+ }
373
+ },
374
+ "churchAdminDetails": {
375
+ "type": "object",
376
+ "$ref": "#/components/schemas/ChurchAdminDataRequest"
377
+ }
378
+ },
379
+ "example": {
380
+ "name": "Xavier",
381
+ "email": "email",
382
+ "phoneNumber": "1234",
383
+ "contactPerson": "string",
384
+ "subscriptionPlanId": 1,
385
+ "validity": 30,
386
+ "permissionId": [1],
387
+ "churchAdminDetails": {
388
+ "username": "churchadmin",
389
+ "email": "churchadmin@xavier.com",
390
+ "password": "Church@123",
391
+ "firstName": "Jose",
392
+ "lastName": "Mathew"
393
+ }
394
+ }
395
+ },
396
+ "UpdateChurchDataRequest": {
397
+ "title": "UpdateChurchDataRequest",
398
+ "required": [],
399
+ "type": "object",
400
+ "properties": {
401
+ "name": {
402
+ "type": "string"
403
+ },
404
+ "email": {
405
+ "type": "string"
406
+ },
407
+ "phoneNumber": {
408
+ "type": "string"
409
+ },
410
+ "contactPerson": {
411
+ "type": "string"
412
+ },
413
+ "subscriptionPlanId": {
414
+ "type": "integer",
415
+ "format": "int32"
416
+ },
417
+ "validity": {
418
+ "type": "integer",
419
+ "format": "int32"
420
+ },
421
+ "permissionId": {
422
+ "type": "array",
423
+ "items": {
424
+ "type": "number"
425
+ }
426
+ },
427
+ "status": {
428
+ "type": "boolean"
429
+ }
430
+ },
431
+ "example": {
432
+ "name": "Xavier",
433
+ "email": "email",
434
+ "phoneNumber": "1234",
435
+ "contactPerson": "string",
436
+ "subscriptionPlanId": 1,
437
+ "validity": 30,
438
+ "permissionId": [1],
439
+ "status": true
440
+ }
441
+ },
442
+ "ChurchAdminDataRequest": {
443
+ "title": "ChurchAdminDataRequest",
444
+ "required": ["username", "email", "password", "firstName", "lastName"],
445
+ "type": "object",
446
+ "properties": {
447
+ "username": {
448
+ "type": "string"
449
+ },
450
+ "email": {
451
+ "type": "string"
452
+ },
453
+ "password": {
454
+ "type": "string"
455
+ },
456
+ "firstName": {
457
+ "type": "string"
458
+ },
459
+ "lastName": {
460
+ "type": "string"
461
+ }
462
+ },
463
+ "example": {
464
+ "username": "churchadmin",
465
+ "email": "churchadmin@xavier.com",
466
+ "password": "Church@123",
467
+ "firstName": "Jose",
468
+ "lastName": "Mathew"
469
+ }
470
+ },
471
+ "SuperAdminLoginDataRequest": {
472
+ "title": "SuperAdminLoginDataRequest",
473
+ "required": ["username", "password"],
474
+ "type": "object",
475
+ "properties": {
476
+ "username": {
477
+ "type": "string"
478
+ },
479
+ "password": {
480
+ "type": "string"
481
+ }
482
+ },
483
+ "example": {
484
+ "username": "admin@churchsoln.com",
485
+ "password": "ChurchsolnAdmin2023Admin2025!"
486
+ }
487
+ },
488
+ "AddChurchPermissionDataRequest": {
489
+ "title": "AddChurchPermissionDataRequest",
490
+ "required": ["permissionId"],
491
+ "type": "object",
492
+ "properties": {
493
+ "permissionId": {
494
+ "type": "array",
495
+ "items": {
496
+ "type": "number"
497
+ }
498
+ }
499
+ }
500
+ },
501
+ "UploadFileDataRequest": {
502
+ "title": "UploadFileDataRequest",
503
+ "required": ["file"],
504
+ "type": "object",
505
+ "properties": {
506
+ "file": {
507
+ "type": "string",
508
+ "format": "binary"
509
+ }
510
+ }
511
+ }
512
+ },
513
+ "securitySchemes": {
514
+ "token": {
515
+ "type": "apiKey",
516
+ "in": "header",
517
+ "name": "token"
518
+ }
519
+ }
520
+ }
521
+ }