@friggframework/schemas 2.0.0--canary.461.ec1ad4e.0 → 2.0.0--canary.461.6b7bf79.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@friggframework/schemas",
3
- "version": "2.0.0--canary.461.ec1ad4e.0",
3
+ "version": "2.0.0--canary.461.6b7bf79.0",
4
4
  "description": "Canonical JSON Schema definitions for Frigg Framework",
5
5
  "main": "index.js",
6
6
  "author": "",
@@ -39,5 +39,5 @@
39
39
  "validators/",
40
40
  "index.js"
41
41
  ],
42
- "gitHead": "ec1ad4ecc89d650ce9380aeed0a29831d8e2098b"
42
+ "gitHead": "6b7bf790ee79e49375d3064a3791808798b80a26"
43
43
  }
@@ -17,7 +17,9 @@
17
17
  "userModel": {
18
18
  "type": "object",
19
19
  "description": "Frigg User model schema",
20
- "required": ["_id"],
20
+ "required": [
21
+ "_id"
22
+ ],
21
23
  "properties": {
22
24
  "_id": {
23
25
  "$ref": "#/definitions/objectId",
@@ -47,7 +49,12 @@
47
49
  "role": {
48
50
  "type": "string",
49
51
  "description": "User role",
50
- "enum": ["admin", "user", "developer", "viewer"],
52
+ "enum": [
53
+ "admin",
54
+ "user",
55
+ "developer",
56
+ "viewer"
57
+ ],
51
58
  "default": "user"
52
59
  },
53
60
  "permissions": {
@@ -56,10 +63,18 @@
56
63
  "items": {
57
64
  "type": "string",
58
65
  "enum": [
59
- "integrations:read", "integrations:write", "integrations:delete",
60
- "entities:read", "entities:write", "entities:delete",
61
- "credentials:read", "credentials:write", "credentials:delete",
62
- "users:read", "users:write", "users:delete",
66
+ "integrations:read",
67
+ "integrations:write",
68
+ "integrations:delete",
69
+ "entities:read",
70
+ "entities:write",
71
+ "entities:delete",
72
+ "credentials:read",
73
+ "credentials:write",
74
+ "credentials:delete",
75
+ "users:read",
76
+ "users:write",
77
+ "users:delete",
63
78
  "admin:all"
64
79
  ]
65
80
  },
@@ -71,7 +86,11 @@
71
86
  "properties": {
72
87
  "theme": {
73
88
  "type": "string",
74
- "enum": ["light", "dark", "auto"],
89
+ "enum": [
90
+ "light",
91
+ "dark",
92
+ "auto"
93
+ ],
75
94
  "default": "light"
76
95
  },
77
96
  "language": {
@@ -128,7 +147,10 @@
128
147
  "credentialModel": {
129
148
  "type": "object",
130
149
  "description": "Frigg Credential model schema",
131
- "required": ["_id", "userId", "subType"],
150
+ "required": [
151
+ "_id",
152
+ "userId"
153
+ ],
132
154
  "properties": {
133
155
  "_id": {
134
156
  "$ref": "#/definitions/objectId",
@@ -138,12 +160,6 @@
138
160
  "$ref": "#/definitions/objectId",
139
161
  "description": "Associated user ID"
140
162
  },
141
- "subType": {
142
- "type": "string",
143
- "description": "Integration type for this credential",
144
- "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
145
- "maxLength": 100
146
- },
147
163
  "externalId": {
148
164
  "type": "string",
149
165
  "description": "External system identifier",
@@ -169,7 +185,11 @@
169
185
  "token_type": {
170
186
  "type": "string",
171
187
  "description": "Token type",
172
- "enum": ["Bearer", "Basic", "API-Key"],
188
+ "enum": [
189
+ "Bearer",
190
+ "Basic",
191
+ "API-Key"
192
+ ],
173
193
  "default": "Bearer"
174
194
  },
175
195
  "expires_at": {
@@ -214,7 +234,10 @@
214
234
  "description": "Error code"
215
235
  }
216
236
  },
217
- "required": ["error", "timestamp"]
237
+ "required": [
238
+ "error",
239
+ "timestamp"
240
+ ]
218
241
  }
219
242
  }
220
243
  },
@@ -239,7 +262,11 @@
239
262
  "entityModel": {
240
263
  "type": "object",
241
264
  "description": "Frigg Entity model schema",
242
- "required": ["_id", "credentialId", "userId", "subType"],
265
+ "required": [
266
+ "_id",
267
+ "credentialId",
268
+ "userId"
269
+ ],
243
270
  "properties": {
244
271
  "_id": {
245
272
  "$ref": "#/definitions/objectId",
@@ -253,9 +280,9 @@
253
280
  "$ref": "#/definitions/objectId",
254
281
  "description": "Associated user ID"
255
282
  },
256
- "subType": {
283
+ "moduleName": {
257
284
  "type": "string",
258
- "description": "Entity subtype or category",
285
+ "description": "Module type identifier (e.g., 'salesforce', 'hubspot', 'attio'). Represents the API/service being integrated. Historically mapped from Mongoose discriminator (__t).",
259
286
  "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$",
260
287
  "maxLength": 100
261
288
  },
@@ -286,13 +313,23 @@
286
313
  "sync_direction": {
287
314
  "type": "string",
288
315
  "description": "Synchronization direction",
289
- "enum": ["incoming", "outgoing", "bidirectional"],
316
+ "enum": [
317
+ "incoming",
318
+ "outgoing",
319
+ "bidirectional"
320
+ ],
290
321
  "default": "bidirectional"
291
322
  },
292
323
  "sync_frequency": {
293
324
  "type": "string",
294
325
  "description": "Synchronization frequency",
295
- "enum": ["real-time", "hourly", "daily", "weekly", "manual"],
326
+ "enum": [
327
+ "real-time",
328
+ "hourly",
329
+ "daily",
330
+ "weekly",
331
+ "manual"
332
+ ],
296
333
  "default": "hourly"
297
334
  },
298
335
  "field_mappings": {
@@ -311,7 +348,13 @@
311
348
  "status": {
312
349
  "type": "string",
313
350
  "description": "Entity status",
314
- "enum": ["active", "inactive", "error", "syncing", "pending"],
351
+ "enum": [
352
+ "active",
353
+ "inactive",
354
+ "error",
355
+ "syncing",
356
+ "pending"
357
+ ],
315
358
  "default": "active"
316
359
  },
317
360
  "lastSync": {
@@ -342,7 +385,10 @@
342
385
  "default": true
343
386
  }
344
387
  },
345
- "required": ["error", "timestamp"]
388
+ "required": [
389
+ "error",
390
+ "timestamp"
391
+ ]
346
392
  }
347
393
  },
348
394
  "isActive": {
@@ -383,7 +429,10 @@
383
429
  "lastName": "Doe",
384
430
  "organization": "Example Corp",
385
431
  "role": "user",
386
- "permissions": ["integrations:read", "integrations:write"],
432
+ "permissions": [
433
+ "integrations:read",
434
+ "integrations:write"
435
+ ],
387
436
  "preferences": {
388
437
  "theme": "dark",
389
438
  "language": "en",
@@ -399,7 +448,6 @@
399
448
  "credential": {
400
449
  "_id": "507f1f77bcf86cd799439012",
401
450
  "userId": "507f1f77bcf86cd799439011",
402
- "subType": "hubspot",
403
451
  "externalId": "12345",
404
452
  "auth_is_valid": true,
405
453
  "authData": {
@@ -421,7 +469,6 @@
421
469
  "_id": "507f1f77bcf86cd799439013",
422
470
  "credentialId": "507f1f77bcf86cd799439012",
423
471
  "userId": "507f1f77bcf86cd799439011",
424
- "subType": "contact",
425
472
  "name": "HubSpot Contacts",
426
473
  "externalId": "hubspot_contacts_12345",
427
474
  "config": {