@friggframework/core 1.2.0-canary.293.5731c31.0 → 1.2.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 (84) hide show
  1. package/CHANGELOG.md +141 -0
  2. package/README.md +80 -0
  3. package/encrypt/encrypt.test.js +1 -1
  4. package/errors/validation-errors.js +2 -2
  5. package/index.js +3 -11
  6. package/integrations/index.js +1 -4
  7. package/integrations/integration-base.js +24 -0
  8. package/integrations/integration-factory.js +0 -12
  9. package/integrations/integration-router.js +133 -53
  10. package/integrations/test/integration-base.test.js +2 -1
  11. package/jest-setup.js +2 -0
  12. package/jest-teardown.js +2 -0
  13. package/{module-plugin/jest.config.js → jest.config.js} +2 -1
  14. package/logs/logger.test.js +1 -1
  15. package/module-plugin/auther.js +14 -6
  16. package/module-plugin/index.js +1 -5
  17. package/module-plugin/requester/requester.js +15 -1
  18. package/package.json +12 -11
  19. package/assertions/CHANGELOG.md +0 -87
  20. package/assertions/LICENSE.md +0 -9
  21. package/assertions/README.md +0 -3
  22. package/assertions/bump.txt +0 -1
  23. package/assertions/bump3.txt +0 -0
  24. package/associations/LICENSE.md +0 -9
  25. package/associations/README.md +0 -3
  26. package/associations/bump3.txt +0 -0
  27. package/associations/jest.config.js +0 -5
  28. package/core/.eslintrc.json +0 -3
  29. package/core/CHANGELOG.md +0 -103
  30. package/core/LICENSE.md +0 -9
  31. package/core/README.md +0 -3
  32. package/core/bump3.txt +0 -0
  33. package/core/jest.config.js +0 -5
  34. package/database/.eslintrc.json +0 -3
  35. package/database/CHANGELOG.md +0 -97
  36. package/database/LICENSE.md +0 -9
  37. package/database/README.md +0 -3
  38. package/database/bump3.txt +0 -0
  39. package/encrypt/.eslintrc.json +0 -3
  40. package/encrypt/CHANGELOG.md +0 -78
  41. package/encrypt/LICENSE.md +0 -9
  42. package/encrypt/README.md +0 -13
  43. package/encrypt/bump3.txt +0 -0
  44. package/encrypt/jest.config.js +0 -5
  45. package/errors/.eslintrc.json +0 -3
  46. package/errors/CHANGELOG.md +0 -44
  47. package/errors/LICENSE.md +0 -9
  48. package/errors/README.md +0 -3
  49. package/errors/bump.txt +0 -1
  50. package/errors/bump3.txt +0 -0
  51. package/errors/jest.config.js +0 -5
  52. package/integrations/.eslintrc.json +0 -3
  53. package/integrations/CHANGELOG.md +0 -244
  54. package/integrations/LICENSE.md +0 -9
  55. package/integrations/README.md +0 -3
  56. package/integrations/bump3.txt +0 -0
  57. package/integrations/jest-setup.js +0 -2
  58. package/integrations/jest-teardown.js +0 -2
  59. package/integrations/jest.config.js +0 -12
  60. package/integrations/mock-integration.js +0 -83
  61. package/lambda/README.md +0 -3
  62. package/lambda/bump3.txt +0 -0
  63. package/lambda/jest.config.js +0 -3
  64. package/logs/CHANGELOG.md +0 -57
  65. package/logs/LICENSE.md +0 -9
  66. package/logs/README.md +0 -3
  67. package/logs/bump3.txt +0 -0
  68. package/logs/jest.config.js +0 -5
  69. package/module-plugin/.eslintrc.json +0 -3
  70. package/module-plugin/CHANGELOG.md +0 -224
  71. package/module-plugin/LICENSE.md +0 -9
  72. package/module-plugin/README.md +0 -3
  73. package/module-plugin/auther-definition-method-tester.js +0 -45
  74. package/module-plugin/auther-definition-tester.js +0 -121
  75. package/module-plugin/bump3.txt +0 -0
  76. package/module-plugin/jest-setup.js +0 -3
  77. package/module-plugin/jest-teardown.js +0 -2
  78. package/syncs/README.md +0 -3
  79. package/syncs/bump3.txt +0 -0
  80. package/syncs/jest.config.js +0 -5
  81. package/types/CHANGELOG.md +0 -49
  82. package/types/README.md +0 -24
  83. package/types/bump3.txt +0 -0
  84. /package/{assertions/.eslintrc.json → .eslintrc.json} +0 -0
@@ -1,44 +0,0 @@
1
- # v1.1.6 (Wed Feb 08 2023)
2
-
3
- #### 🐛 Bug Fix
4
-
5
- - URLSearchParams (used in OAuth2 base) was not printing out bodies in … [#124](https://github.com/friggframework/frigg/pull/124) ([@seanspeaks](https://github.com/seanspeaks))
6
- - URLSearchParams (used in OAuth2 base) was not printing out bodies in error logs. ([@seanspeaks](https://github.com/seanspeaks))
7
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
8
-
9
- #### Authors: 1
10
-
11
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
12
-
13
- ---
14
-
15
- # v1.1.5 (Wed Jan 18 2023)
16
-
17
- #### 🐛 Bug Fix
18
-
19
- - Ironclad and slack updates [#96](https://github.com/friggframework/frigg/pull/96) ([@seanspeaks](https://github.com/seanspeaks))
20
- - Fetch Error fix to also log a body if already used (and passed in) ([@seanspeaks](https://github.com/seanspeaks))
21
-
22
- #### Authors: 1
23
-
24
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
25
-
26
- ---
27
-
28
- # v1.1.4 (Mon Jan 09 2023)
29
-
30
- #### 🐛 Bug Fix
31
-
32
- - Merge remote-tracking branch 'origin/main' into gitbook-updates [#48](https://github.com/friggframework/frigg/pull/48) ([@seanspeaks](https://github.com/seanspeaks))
33
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
34
- - Merge remote-tracking branch 'origin/main' into simplify-mongoose-models ([@seanspeaks](https://github.com/seanspeaks))
35
- - Add READMEs for all packages and api-modules [#20](https://github.com/friggframework/frigg/pull/20) ([@seanspeaks](https://github.com/seanspeaks))
36
- - Add READMEs for all packages and api-modules ([@seanspeaks](https://github.com/seanspeaks))
37
-
38
- #### ⚠️ Pushed to `main`
39
-
40
- - Refactored for more conventional naming (at least for packages) ([@seanspeaks](https://github.com/seanspeaks))
41
-
42
- #### Authors: 1
43
-
44
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
package/errors/LICENSE.md DELETED
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Left Hook Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/errors/README.md DELETED
@@ -1,3 +0,0 @@
1
- # errors
2
-
3
- This package exports the `errors` used in [Frigg](https://friggframework.org). You can find its documentation [on Frigg's website](https://docs.friggframework.org/packages/errors).
package/errors/bump.txt DELETED
@@ -1 +0,0 @@
1
- 0
package/errors/bump3.txt DELETED
File without changes
@@ -1,5 +0,0 @@
1
- module.exports = async () => {
2
- return {
3
- preset: '@friggframework/test-environment',
4
- };
5
- };
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "@friggframework/eslint-config"
3
- }
@@ -1,244 +0,0 @@
1
- # v1.2.0 (Wed Sep 06 2023)
2
-
3
- #### 🚀 Enhancement
4
-
5
- - Slack lookup by externalId, remove the user requirement from Mongoose DB models [#218](https://github.com/friggframework/frigg/pull/218) ([@seanspeaks](https://github.com/seanspeaks))
6
-
7
- #### 🐛 Bug Fix
8
-
9
- - Looking good ([@seanspeaks](https://github.com/seanspeaks))
10
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
11
-
12
- #### Authors: 1
13
-
14
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
15
-
16
- ---
17
-
18
- # v1.1.4 (Thu Aug 03 2023)
19
-
20
- #### 🐛 Bug Fix
21
-
22
- - remove check in Options [#206](https://github.com/friggframework/frigg/pull/206) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
23
- - remove check in Options ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
24
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
25
-
26
- #### Authors: 2
27
-
28
- - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
29
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
30
-
31
- ---
32
-
33
- # v1.1.3 (Thu Jun 15 2023)
34
-
35
- #### 🐛 Bug Fix
36
-
37
- - return the mapping object directly from getIntegrationMapping [#157](https://github.com/friggframework/frigg/pull/157) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
38
- - potential change to return the mapping object directly from getIntegrationMapping. this is only to provide for cleaner assignment of the mapping when getIntegrationMapping is used. ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
39
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
40
-
41
- #### Authors: 2
42
-
43
- - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
44
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
45
-
46
- ---
47
-
48
- # v1.1.2 (Thu Jun 08 2023)
49
-
50
- #### 🐛 Bug Fix
51
-
52
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
53
-
54
- #### Authors: 1
55
-
56
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
57
-
58
- ---
59
-
60
- # v1.1.1 (Thu May 25 2023)
61
-
62
- #### 🐛 Bug Fix
63
-
64
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
65
-
66
- #### Authors: 1
67
-
68
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
69
-
70
- ---
71
-
72
- # v1.1.0 (Wed Apr 26 2023)
73
-
74
- #### 🚀 Enhancement
75
-
76
- - Add refreshIntegration method for config retrieval inside the integra… [#151](https://github.com/friggframework/frigg/pull/151) ([@seanspeaks](https://github.com/seanspeaks))
77
-
78
- #### 🐛 Bug Fix
79
-
80
- - Add refreshIntegration method for config retrieval inside the integrationManager ([@seanspeaks](https://github.com/seanspeaks))
81
-
82
- #### Authors: 1
83
-
84
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
85
-
86
- ---
87
-
88
- # v1.0.24 (Thu Apr 13 2023)
89
-
90
- #### 🐛 Bug Fix
91
-
92
- - Fix Slack getChannelHistory call [#147](https://github.com/friggframework/frigg/pull/147) ([@debbie-yu](https://github.com/debbie-yu))
93
- - Merge branch 'main' of https://github.com/friggframework/frigg into debbie.yu/fix-slack-history [#145](https://github.com/friggframework/frigg/pull/145) ([@debbie-yu](https://github.com/debbie-yu))
94
- - improve error thrown for invalid integration ([@debbie-yu](https://github.com/debbie-yu))
95
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
96
-
97
- #### Authors: 2
98
-
99
- - [@debbie-yu](https://github.com/debbie-yu)
100
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
101
-
102
- ---
103
-
104
- # v1.0.23 (Tue Apr 04 2023)
105
-
106
- :tada: This release contains work from a new contributor! :tada:
107
-
108
- Thank you, null[@debbie-yu](https://github.com/debbie-yu), for all your work!
109
-
110
- #### 🐛 Bug Fix
111
-
112
- - Adding new IntegrationMapping collection [#142](https://github.com/friggframework/frigg/pull/142) ([@debbie-yu](https://github.com/debbie-yu))
113
- - Merge branch 'main' of https://github.com/friggframework/frigg into debbie.yu/integration-mapping ([@debbie-yu](https://github.com/debbie-yu))
114
- - addressing PR feedback and adding unit tests around IntegrationMapping ([@debbie-yu](https://github.com/debbie-yu))
115
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
116
-
117
- #### Authors: 2
118
-
119
- - [@debbie-yu](https://github.com/debbie-yu)
120
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
121
-
122
- ---
123
-
124
- # v1.0.22 (Tue Feb 21 2023)
125
-
126
- #### 🐛 Bug Fix
127
-
128
- - Merge branch 'main' into hubspot-updates ([@seanspeaks](https://github.com/seanspeaks))
129
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
130
-
131
- #### Authors: 1
132
-
133
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
134
-
135
- ---
136
-
137
- # v1.0.20 (Tue Jan 31 2023)
138
-
139
- #### 🐛 Bug Fix
140
-
141
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
142
-
143
- #### Authors: 1
144
-
145
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
146
-
147
- ---
148
-
149
- # v1.0.18 (Thu Jan 12 2023)
150
-
151
- #### 🐛 Bug Fix
152
-
153
- - Slack, Ironclad, and "IntegrationManager" updates [#92](https://github.com/friggframework/frigg/pull/92) ([@seanspeaks](https://github.com/seanspeaks))
154
- - Fix the output from entity hydration on the getFormattedIntegration method ([@seanspeaks](https://github.com/seanspeaks))
155
-
156
- #### Authors: 1
157
-
158
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
159
-
160
- ---
161
-
162
- # v1.0.17 (Wed Jan 11 2023)
163
-
164
- #### 🐛 Bug Fix
165
-
166
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
167
-
168
- #### Authors: 1
169
-
170
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
171
-
172
- ---
173
-
174
- # v1.0.16 (Tue Jan 10 2023)
175
-
176
- :tada: This release contains work from a new contributor! :tada:
177
-
178
- Thank you, Jonathan O'Donnell ([@joncodo](https://github.com/joncodo)), for all your work!
179
-
180
- #### 🐛 Bug Fix
181
-
182
- - Merge branch 'main' of github.com:friggframework/frigg into doc-updates ([@joncodo](https://github.com/joncodo))
183
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
184
-
185
- #### Authors: 2
186
-
187
- - Jonathan O'Donnell ([@joncodo](https://github.com/joncodo))
188
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
189
-
190
- ---
191
-
192
- # v1.0.15 (Mon Jan 09 2023)
193
-
194
- #### 🐛 Bug Fix
195
-
196
- - Merge remote-tracking branch 'origin/main' into gitbook-updates [#48](https://github.com/friggframework/frigg/pull/48) ([@seanspeaks](https://github.com/seanspeaks))
197
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
198
- - Updates to managers [#24](https://github.com/friggframework/frigg/pull/24) ([@seanspeaks](https://github.com/seanspeaks))
199
- - integrations bump ([@seanspeaks](https://github.com/seanspeaks))
200
- - Update integrationManager createIntegration function to accept EntityManager param (WIP) (Could be improved) ([@seanspeaks](https://github.com/seanspeaks))
201
- - Bumped versions with patches ([@seanspeaks](https://github.com/seanspeaks))
202
- - A lot of changes all rolled into one [#21](https://github.com/friggframework/frigg/pull/21) ([@seanspeaks](https://github.com/seanspeaks))
203
- - Update integrations (Options) to include module reference/argument ([@seanspeaks](https://github.com/seanspeaks))
204
- - Weird class, probably needs cleanup ([@seanspeaks](https://github.com/seanspeaks))
205
- - Mongoose models tweak for sls offline as per https://nesin.io/blog/fix-mongoose-cannot-overwrite-model-once-compiled-error ([@seanspeaks](https://github.com/seanspeaks))
206
- - Continued updating of references and refactoring API modules ([@seanspeaks](https://github.com/seanspeaks))
207
- - Merge remote-tracking branch 'origin/main' into simplify-mongoose-models ([@seanspeaks](https://github.com/seanspeaks))
208
- - Add READMEs for all packages and api-modules [#20](https://github.com/friggframework/frigg/pull/20) ([@seanspeaks](https://github.com/seanspeaks))
209
- - Add READMEs for all packages and api-modules ([@seanspeaks](https://github.com/seanspeaks))
210
-
211
- #### ⚠️ Pushed to `main`
212
-
213
- - Merge branch 'main' into gitbook-updates ([@seanspeaks](https://github.com/seanspeaks))
214
- - Refactored for more conventional naming (at least for packages) ([@seanspeaks](https://github.com/seanspeaks))
215
-
216
- #### Authors: 1
217
-
218
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
219
-
220
- ---
221
-
222
- # v1.0.12 (Tue Dec 06 2022)
223
-
224
- #### 🐛 Bug Fix
225
-
226
- - fix modules to @friggframework [#74](https://github.com/friggframework/frigg/pull/74) ([@sheehantoufiq](https://github.com/sheehantoufiq))
227
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
228
-
229
- #### Authors: 2
230
-
231
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
232
- - Sheehan Toufiq Khan ([@sheehantoufiq](https://github.com/sheehantoufiq))
233
-
234
- ---
235
-
236
- # v1.0.9 (Mon Sep 19 2022)
237
-
238
- #### 🐛 Bug Fix
239
-
240
- - Merge remote-tracking branch 'origin/main' into gitbook-updates [#48](https://github.com/friggframework/frigg/pull/48) ([@seanspeaks](https://github.com/seanspeaks))
241
-
242
- #### Authors: 1
243
-
244
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Left Hook Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,3 +0,0 @@
1
- # integrations
2
-
3
- This package exports the `integrations` objects, functions, and models used in [Frigg](https://friggframework.org). You can find its documentation [on Frigg's website](https://docs.friggframework.org/packages/integrations).
File without changes
@@ -1,2 +0,0 @@
1
- const { globalSetup } = require('@friggframework/devtools');
2
- module.exports = globalSetup;
@@ -1,2 +0,0 @@
1
- const { globalTeardown } = require('@friggframework/devtools');
2
- module.exports = globalTeardown;
@@ -1,12 +0,0 @@
1
- /*
2
- * For a detailed explanation regarding each configuration property, visit:
3
- * https://jestjs.io/docs/configuration
4
- */
5
-
6
- module.exports = {
7
- // A path to a module which exports an async function that is triggered once before all test suites
8
- globalSetup: './jest-setup.js',
9
-
10
- // A path to a module which exports an async function that is triggered once after all test suites
11
- globalTeardown: './jest-teardown.js',
12
- };
@@ -1,83 +0,0 @@
1
- const { Auther, Credential, Entity } = require('../module-plugin')
2
- const { IntegrationModel } = require('./integration-model');
3
- const { createObjectId } = require('../database');
4
-
5
- async function createMockIntegration(IntegrationClassDef, userId = null, config = {},) {
6
- const integration = new IntegrationClassDef();
7
- userId = userId || createObjectId();
8
- integration.delegateTypes.push(...IntegrationClassDef.Config.events)
9
-
10
- const insertOptions = {
11
- new: true,
12
- upsert: true,
13
- setDefaultsOnInsert: true,
14
- }
15
- const user = {user: userId}
16
-
17
- const credential = await Credential.findOneAndUpdate(
18
- user,
19
- { $set: user },
20
- insertOptions
21
- );
22
- const entity1 = await Entity.findOneAndUpdate(
23
- user,
24
- {
25
- $set: {
26
- credential: credential.id,
27
- user: userId,
28
- name: 'Test user',
29
- externalId: '1234567890123456',
30
- },
31
- },
32
- insertOptions
33
- );
34
- const entity2 = await Entity.findOneAndUpdate(
35
- user,
36
- {
37
- $set: {
38
- credential: credential.id,
39
- user: userId,
40
- },
41
- },
42
- insertOptions
43
- );
44
-
45
- const entities = [entity1, entity2]
46
- integration.record = await IntegrationModel.create({
47
- entities,
48
- user: userId,
49
- config: {type: IntegrationClassDef.Config.name, ...config}
50
- })
51
-
52
- integration.id = integration.record._id
53
-
54
- for (const i in entities){
55
- if (Object.entries(IntegrationClassDef.modules).length <= i) break
56
- const [moduleName, ModuleDef] = Object.entries(IntegrationClassDef.modules)[i];
57
- const module = await Auther.getInstance({definition: ModuleDef, userId: userId})
58
- module.entity = entities[i];
59
- integration[moduleName] = module;
60
- }
61
-
62
- return integration
63
- }
64
-
65
- function createMockApiObject(jest, api = {}, mockMethodMap) {
66
- // take in an api class and object with keys that are method names
67
- // and values which are the mock response (or implementation)
68
- const clone = (data) => JSON.parse(JSON.stringify(data));
69
-
70
- for (const [methodName, mockDataOrImplementation] of Object.entries(mockMethodMap)) {
71
- if (mockDataOrImplementation instanceof Function) {
72
- api[methodName] = jest.fn(mockDataOrImplementation);
73
- }
74
- else if (api[methodName]?.constructor?.name === "AsyncFunction") {
75
- api[methodName] = jest.fn().mockResolvedValue(clone(mockDataOrImplementation));
76
- } else {
77
- api[methodName] = jest.fn().mockReturnValue(clone(mockDataOrImplementation));
78
- }
79
- }
80
- return api;
81
- }
82
-
83
- module.exports = {createMockIntegration, createMockApiObject};
package/lambda/README.md DELETED
@@ -1,3 +0,0 @@
1
- # lambda
2
-
3
- This package exports the `lambda` wrappers used in [Frigg](https://friggframework.org). You can find its documentation [on Frigg's website](https://docs.friggframework.org/packages/lambda).
package/lambda/bump3.txt DELETED
File without changes
@@ -1,3 +0,0 @@
1
- module.exports = async () => {
2
- preset: "@friggframework/test-environment";
3
- };
package/logs/CHANGELOG.md DELETED
@@ -1,57 +0,0 @@
1
- # v1.0.9 (Tue Jan 31 2023)
2
-
3
- #### 🐛 Bug Fix
4
-
5
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
6
-
7
- #### Authors: 1
8
-
9
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
10
-
11
- ---
12
-
13
- # v1.0.8 (Mon Jan 09 2023)
14
-
15
- #### 🐛 Bug Fix
16
-
17
- - Merge remote-tracking branch 'origin/main' into gitbook-updates [#48](https://github.com/friggframework/frigg/pull/48) ([@seanspeaks](https://github.com/seanspeaks))
18
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
19
- - Merge remote-tracking branch 'origin/main' into simplify-mongoose-models ([@seanspeaks](https://github.com/seanspeaks))
20
- - Add READMEs for all packages and api-modules [#20](https://github.com/friggframework/frigg/pull/20) ([@seanspeaks](https://github.com/seanspeaks))
21
- - Add READMEs for all packages and api-modules ([@seanspeaks](https://github.com/seanspeaks))
22
-
23
- #### ⚠️ Pushed to `main`
24
-
25
- - Merge branch 'main' into gitbook-updates ([@seanspeaks](https://github.com/seanspeaks))
26
- - Refactored for more conventional naming (at least for packages) ([@seanspeaks](https://github.com/seanspeaks))
27
-
28
- #### Authors: 1
29
-
30
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
31
-
32
- ---
33
-
34
- # v1.0.7 (Tue Dec 06 2022)
35
-
36
- #### 🐛 Bug Fix
37
-
38
- - fix modules to @friggframework [#74](https://github.com/friggframework/frigg/pull/74) ([@sheehantoufiq](https://github.com/sheehantoufiq))
39
- - fix modules to @friggframework ([@sheehantoufiq](https://github.com/sheehantoufiq))
40
- - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
41
-
42
- #### Authors: 2
43
-
44
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
45
- - Sheehan Toufiq Khan ([@sheehantoufiq](https://github.com/sheehantoufiq))
46
-
47
- ---
48
-
49
- # v1.0.6 (Mon Sep 19 2022)
50
-
51
- #### 🐛 Bug Fix
52
-
53
- - Merge remote-tracking branch 'origin/main' into gitbook-updates [#48](https://github.com/friggframework/frigg/pull/48) ([@seanspeaks](https://github.com/seanspeaks))
54
-
55
- #### Authors: 1
56
-
57
- - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
package/logs/LICENSE.md DELETED
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Left Hook Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/logs/README.md DELETED
@@ -1,3 +0,0 @@
1
- # logs
2
-
3
- This package exports the `logs` functions used in [Frigg](https://friggframework.org). You can find its documentation [on Frigg's website](https://docs.friggframework.org/packages/logs).
package/logs/bump3.txt DELETED
File without changes
@@ -1,5 +0,0 @@
1
- module.exports = async () => {
2
- return {
3
- preset: '@friggframework/test-environment',
4
- };
5
- };
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "@friggframework/eslint-config"
3
- }