digital-tools 2.0.2 → 2.1.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.
- package/CHANGELOG.md +17 -0
- package/package.json +3 -4
- package/src/define.js +267 -0
- package/src/entities/advertising.js +999 -0
- package/src/entities/ai.js +756 -0
- package/src/entities/analytics.js +1588 -0
- package/src/entities/automation.js +601 -0
- package/src/entities/communication.js +1150 -0
- package/src/entities/crm.js +1386 -0
- package/src/entities/design.js +546 -0
- package/src/entities/development.js +2212 -0
- package/src/entities/document.js +874 -0
- package/src/entities/ecommerce.js +1429 -0
- package/src/entities/experiment.js +1039 -0
- package/src/entities/finance.js +3478 -0
- package/src/entities/forms.js +1892 -0
- package/src/entities/hr.js +661 -0
- package/src/entities/identity.js +997 -0
- package/src/entities/index.js +282 -0
- package/src/entities/infrastructure.js +1153 -0
- package/src/entities/knowledge.js +1438 -0
- package/src/entities/marketing.js +1610 -0
- package/src/entities/media.js +1634 -0
- package/src/entities/notification.js +1199 -0
- package/src/entities/presentation.js +1274 -0
- package/src/entities/productivity.js +1317 -0
- package/src/entities/project-management.js +1136 -0
- package/src/entities/recruiting.js +736 -0
- package/src/entities/shipping.js +509 -0
- package/src/entities/signature.js +1102 -0
- package/src/entities/site.js +222 -0
- package/src/entities/spreadsheet.js +1341 -0
- package/src/entities/storage.js +1198 -0
- package/src/entities/support.js +1166 -0
- package/src/entities/video-conferencing.js +1750 -0
- package/src/entities/video.js +950 -0
- package/src/entities.js +1663 -0
- package/src/index.js +74 -0
- package/src/providers/analytics/index.js +17 -0
- package/src/providers/analytics/mixpanel.js +255 -0
- package/src/providers/calendar/cal-com.js +303 -0
- package/src/providers/calendar/google-calendar.js +335 -0
- package/src/providers/calendar/index.js +20 -0
- package/src/providers/crm/hubspot.js +566 -0
- package/src/providers/crm/index.js +17 -0
- package/src/providers/development/github.js +472 -0
- package/src/providers/development/index.js +17 -0
- package/src/providers/ecommerce/index.js +17 -0
- package/src/providers/ecommerce/shopify.js +378 -0
- package/src/providers/email/index.js +20 -0
- package/src/providers/email/resend.js +258 -0
- package/src/providers/email/sendgrid.js +161 -0
- package/src/providers/finance/index.js +17 -0
- package/src/providers/finance/stripe.js +549 -0
- package/src/providers/forms/index.js +17 -0
- package/src/providers/forms/typeform.js +500 -0
- package/src/providers/index.js +123 -0
- package/src/providers/knowledge/index.js +17 -0
- package/src/providers/knowledge/notion.js +389 -0
- package/src/providers/marketing/index.js +17 -0
- package/src/providers/marketing/mailchimp.js +443 -0
- package/src/providers/media/cloudinary.js +318 -0
- package/src/providers/media/index.js +17 -0
- package/src/providers/messaging/index.js +20 -0
- package/src/providers/messaging/slack.js +393 -0
- package/src/providers/messaging/twilio-sms.js +249 -0
- package/src/providers/project-management/index.js +17 -0
- package/src/providers/project-management/linear.js +575 -0
- package/src/providers/registry.js +86 -0
- package/src/providers/spreadsheet/google-sheets.js +375 -0
- package/src/providers/spreadsheet/index.js +20 -0
- package/src/providers/spreadsheet/xlsx.js +423 -0
- package/src/providers/storage/index.js +24 -0
- package/src/providers/storage/s3.js +419 -0
- package/src/providers/support/index.js +17 -0
- package/src/providers/support/zendesk.js +373 -0
- package/src/providers/tasks/index.js +17 -0
- package/src/providers/tasks/todoist.js +286 -0
- package/src/providers/types.js +9 -0
- package/src/providers/video-conferencing/google-meet.js +286 -0
- package/src/providers/video-conferencing/index.js +31 -0
- package/src/providers/video-conferencing/jitsi.js +254 -0
- package/src/providers/video-conferencing/teams.js +270 -0
- package/src/providers/video-conferencing/zoom.js +332 -0
- package/src/registry.js +128 -0
- package/src/tools/communication.js +184 -0
- package/src/tools/data.js +205 -0
- package/src/tools/index.js +11 -0
- package/src/tools/web.js +137 -0
- package/src/types.js +10 -0
- package/test/define.test.js +306 -0
- package/test/registry.test.js +357 -0
- package/test/tools.test.js +363 -0
|
@@ -0,0 +1,997 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity & Security Entity Types (Nouns)
|
|
3
|
+
*
|
|
4
|
+
* Entities for identity management, authentication, and security.
|
|
5
|
+
* Covers WorkOS, Auth0, Okta, and similar identity platforms.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
// =============================================================================
|
|
10
|
+
// Vault (Secret Management)
|
|
11
|
+
// =============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* Vault entity
|
|
14
|
+
*
|
|
15
|
+
* Represents a secure vault for storing secrets and credentials
|
|
16
|
+
*/
|
|
17
|
+
export const Vault = {
|
|
18
|
+
singular: 'vault',
|
|
19
|
+
plural: 'vaults',
|
|
20
|
+
description: 'A secure vault for storing secrets and credentials',
|
|
21
|
+
properties: {
|
|
22
|
+
// Identity
|
|
23
|
+
name: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'Vault name',
|
|
26
|
+
},
|
|
27
|
+
description: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
optional: true,
|
|
30
|
+
description: 'Vault description',
|
|
31
|
+
},
|
|
32
|
+
// Configuration
|
|
33
|
+
type: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Vault type: secrets, credentials, keys, certificates',
|
|
36
|
+
examples: ['secrets', 'credentials', 'keys', 'certificates'],
|
|
37
|
+
},
|
|
38
|
+
engine: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
optional: true,
|
|
41
|
+
description: 'Secrets engine: kv, transit, pki, database',
|
|
42
|
+
examples: ['kv', 'transit', 'pki', 'database'],
|
|
43
|
+
},
|
|
44
|
+
// Status
|
|
45
|
+
sealed: {
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
optional: true,
|
|
48
|
+
description: 'Whether vault is sealed',
|
|
49
|
+
},
|
|
50
|
+
initialized: {
|
|
51
|
+
type: 'boolean',
|
|
52
|
+
optional: true,
|
|
53
|
+
description: 'Whether vault is initialized',
|
|
54
|
+
},
|
|
55
|
+
// Metrics
|
|
56
|
+
secretCount: {
|
|
57
|
+
type: 'number',
|
|
58
|
+
optional: true,
|
|
59
|
+
description: 'Number of secrets stored',
|
|
60
|
+
},
|
|
61
|
+
version: {
|
|
62
|
+
type: 'number',
|
|
63
|
+
optional: true,
|
|
64
|
+
description: 'Vault version',
|
|
65
|
+
},
|
|
66
|
+
// Access
|
|
67
|
+
accessPolicy: {
|
|
68
|
+
type: 'json',
|
|
69
|
+
optional: true,
|
|
70
|
+
description: 'Access policy configuration',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
relationships: {
|
|
74
|
+
secrets: {
|
|
75
|
+
type: 'VaultSecret[]',
|
|
76
|
+
backref: 'vault',
|
|
77
|
+
description: 'Secrets in this vault',
|
|
78
|
+
},
|
|
79
|
+
policies: {
|
|
80
|
+
type: 'VaultPolicy[]',
|
|
81
|
+
description: 'Access policies',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
actions: [
|
|
85
|
+
'create',
|
|
86
|
+
'delete',
|
|
87
|
+
'seal',
|
|
88
|
+
'unseal',
|
|
89
|
+
'addSecret',
|
|
90
|
+
'removeSecret',
|
|
91
|
+
'rotateSecrets',
|
|
92
|
+
'setPolicy',
|
|
93
|
+
'backup',
|
|
94
|
+
'restore',
|
|
95
|
+
],
|
|
96
|
+
events: [
|
|
97
|
+
'created',
|
|
98
|
+
'deleted',
|
|
99
|
+
'sealed',
|
|
100
|
+
'unsealed',
|
|
101
|
+
'secretAdded',
|
|
102
|
+
'secretRemoved',
|
|
103
|
+
'secretsRotated',
|
|
104
|
+
'policySet',
|
|
105
|
+
'backedUp',
|
|
106
|
+
'restored',
|
|
107
|
+
],
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Vault secret entity
|
|
111
|
+
*/
|
|
112
|
+
export const VaultSecret = {
|
|
113
|
+
singular: 'vault secret',
|
|
114
|
+
plural: 'vault secrets',
|
|
115
|
+
description: 'A secret stored in a vault',
|
|
116
|
+
properties: {
|
|
117
|
+
// Identity
|
|
118
|
+
key: {
|
|
119
|
+
type: 'string',
|
|
120
|
+
description: 'Secret key/path',
|
|
121
|
+
},
|
|
122
|
+
description: {
|
|
123
|
+
type: 'string',
|
|
124
|
+
optional: true,
|
|
125
|
+
description: 'Secret description',
|
|
126
|
+
},
|
|
127
|
+
// Metadata
|
|
128
|
+
version: {
|
|
129
|
+
type: 'number',
|
|
130
|
+
optional: true,
|
|
131
|
+
description: 'Secret version',
|
|
132
|
+
},
|
|
133
|
+
type: {
|
|
134
|
+
type: 'string',
|
|
135
|
+
optional: true,
|
|
136
|
+
description: 'Secret type: password, api_key, token, certificate, connection_string',
|
|
137
|
+
examples: ['password', 'api_key', 'token', 'certificate', 'connection_string'],
|
|
138
|
+
},
|
|
139
|
+
// Rotation
|
|
140
|
+
rotationEnabled: {
|
|
141
|
+
type: 'boolean',
|
|
142
|
+
optional: true,
|
|
143
|
+
description: 'Whether auto-rotation is enabled',
|
|
144
|
+
},
|
|
145
|
+
rotationInterval: {
|
|
146
|
+
type: 'number',
|
|
147
|
+
optional: true,
|
|
148
|
+
description: 'Rotation interval in days',
|
|
149
|
+
},
|
|
150
|
+
lastRotatedAt: {
|
|
151
|
+
type: 'datetime',
|
|
152
|
+
optional: true,
|
|
153
|
+
description: 'Last rotation timestamp',
|
|
154
|
+
},
|
|
155
|
+
nextRotationAt: {
|
|
156
|
+
type: 'datetime',
|
|
157
|
+
optional: true,
|
|
158
|
+
description: 'Next scheduled rotation',
|
|
159
|
+
},
|
|
160
|
+
// Expiration
|
|
161
|
+
expiresAt: {
|
|
162
|
+
type: 'datetime',
|
|
163
|
+
optional: true,
|
|
164
|
+
description: 'Secret expiration date',
|
|
165
|
+
},
|
|
166
|
+
expired: {
|
|
167
|
+
type: 'boolean',
|
|
168
|
+
optional: true,
|
|
169
|
+
description: 'Whether secret has expired',
|
|
170
|
+
},
|
|
171
|
+
// Access
|
|
172
|
+
accessCount: {
|
|
173
|
+
type: 'number',
|
|
174
|
+
optional: true,
|
|
175
|
+
description: 'Number of times accessed',
|
|
176
|
+
},
|
|
177
|
+
lastAccessedAt: {
|
|
178
|
+
type: 'datetime',
|
|
179
|
+
optional: true,
|
|
180
|
+
description: 'Last access timestamp',
|
|
181
|
+
},
|
|
182
|
+
lastAccessedBy: {
|
|
183
|
+
type: 'string',
|
|
184
|
+
optional: true,
|
|
185
|
+
description: 'Last accessor',
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
relationships: {
|
|
189
|
+
vault: {
|
|
190
|
+
type: 'Vault',
|
|
191
|
+
backref: 'secrets',
|
|
192
|
+
description: 'Parent vault',
|
|
193
|
+
},
|
|
194
|
+
versions: {
|
|
195
|
+
type: 'SecretVersion[]',
|
|
196
|
+
description: 'Version history',
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
actions: ['create', 'update', 'delete', 'rotate', 'access', 'revoke'],
|
|
200
|
+
events: [
|
|
201
|
+
'created',
|
|
202
|
+
'updated',
|
|
203
|
+
'deleted',
|
|
204
|
+
'rotated',
|
|
205
|
+
'accessed',
|
|
206
|
+
'revoked',
|
|
207
|
+
'expired',
|
|
208
|
+
],
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Secret version entity
|
|
212
|
+
*/
|
|
213
|
+
export const SecretVersion = {
|
|
214
|
+
singular: 'secret version',
|
|
215
|
+
plural: 'secret versions',
|
|
216
|
+
description: 'A version of a vault secret',
|
|
217
|
+
properties: {
|
|
218
|
+
version: {
|
|
219
|
+
type: 'number',
|
|
220
|
+
description: 'Version number',
|
|
221
|
+
},
|
|
222
|
+
createdAt: {
|
|
223
|
+
type: 'datetime',
|
|
224
|
+
description: 'When version was created',
|
|
225
|
+
},
|
|
226
|
+
createdBy: {
|
|
227
|
+
type: 'string',
|
|
228
|
+
optional: true,
|
|
229
|
+
description: 'Who created this version',
|
|
230
|
+
},
|
|
231
|
+
destroyed: {
|
|
232
|
+
type: 'boolean',
|
|
233
|
+
optional: true,
|
|
234
|
+
description: 'Whether version is destroyed',
|
|
235
|
+
},
|
|
236
|
+
destroyedAt: {
|
|
237
|
+
type: 'datetime',
|
|
238
|
+
optional: true,
|
|
239
|
+
description: 'When version was destroyed',
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
relationships: {
|
|
243
|
+
secret: {
|
|
244
|
+
type: 'VaultSecret',
|
|
245
|
+
backref: 'versions',
|
|
246
|
+
description: 'Parent secret',
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
actions: ['create', 'destroy', 'restore'],
|
|
250
|
+
events: ['created', 'destroyed', 'restored'],
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Vault policy entity
|
|
254
|
+
*/
|
|
255
|
+
export const VaultPolicy = {
|
|
256
|
+
singular: 'vault policy',
|
|
257
|
+
plural: 'vault policies',
|
|
258
|
+
description: 'An access policy for a vault',
|
|
259
|
+
properties: {
|
|
260
|
+
name: {
|
|
261
|
+
type: 'string',
|
|
262
|
+
description: 'Policy name',
|
|
263
|
+
},
|
|
264
|
+
rules: {
|
|
265
|
+
type: 'json',
|
|
266
|
+
description: 'Policy rules',
|
|
267
|
+
},
|
|
268
|
+
type: {
|
|
269
|
+
type: 'string',
|
|
270
|
+
optional: true,
|
|
271
|
+
description: 'Policy type: acl, rbac',
|
|
272
|
+
examples: ['acl', 'rbac'],
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
relationships: {
|
|
276
|
+
vault: {
|
|
277
|
+
type: 'Vault',
|
|
278
|
+
description: 'Associated vault',
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
actions: ['create', 'update', 'delete', 'assign', 'revoke'],
|
|
282
|
+
events: ['created', 'updated', 'deleted', 'assigned', 'revoked'],
|
|
283
|
+
};
|
|
284
|
+
// =============================================================================
|
|
285
|
+
// SSO Connection
|
|
286
|
+
// =============================================================================
|
|
287
|
+
/**
|
|
288
|
+
* SSO connection entity
|
|
289
|
+
*
|
|
290
|
+
* Represents a Single Sign-On connection
|
|
291
|
+
*/
|
|
292
|
+
export const SSOConnection = {
|
|
293
|
+
singular: 'sso connection',
|
|
294
|
+
plural: 'sso connections',
|
|
295
|
+
description: 'A Single Sign-On connection',
|
|
296
|
+
properties: {
|
|
297
|
+
// Identity
|
|
298
|
+
name: {
|
|
299
|
+
type: 'string',
|
|
300
|
+
description: 'Connection name',
|
|
301
|
+
},
|
|
302
|
+
type: {
|
|
303
|
+
type: 'string',
|
|
304
|
+
description: 'SSO type: saml, oidc, oauth2',
|
|
305
|
+
examples: ['saml', 'oidc', 'oauth2'],
|
|
306
|
+
},
|
|
307
|
+
provider: {
|
|
308
|
+
type: 'string',
|
|
309
|
+
optional: true,
|
|
310
|
+
description: 'Identity provider: okta, azure_ad, google, onelogin',
|
|
311
|
+
examples: ['okta', 'azure_ad', 'google', 'onelogin', 'custom'],
|
|
312
|
+
},
|
|
313
|
+
// Configuration - SAML
|
|
314
|
+
entityId: {
|
|
315
|
+
type: 'string',
|
|
316
|
+
optional: true,
|
|
317
|
+
description: 'SAML Entity ID',
|
|
318
|
+
},
|
|
319
|
+
acsUrl: {
|
|
320
|
+
type: 'url',
|
|
321
|
+
optional: true,
|
|
322
|
+
description: 'Assertion Consumer Service URL',
|
|
323
|
+
},
|
|
324
|
+
sloUrl: {
|
|
325
|
+
type: 'url',
|
|
326
|
+
optional: true,
|
|
327
|
+
description: 'Single Logout URL',
|
|
328
|
+
},
|
|
329
|
+
idpMetadataUrl: {
|
|
330
|
+
type: 'url',
|
|
331
|
+
optional: true,
|
|
332
|
+
description: 'IdP Metadata URL',
|
|
333
|
+
},
|
|
334
|
+
certificate: {
|
|
335
|
+
type: 'string',
|
|
336
|
+
optional: true,
|
|
337
|
+
description: 'X.509 certificate',
|
|
338
|
+
},
|
|
339
|
+
// Configuration - OIDC
|
|
340
|
+
clientId: {
|
|
341
|
+
type: 'string',
|
|
342
|
+
optional: true,
|
|
343
|
+
description: 'OIDC Client ID',
|
|
344
|
+
},
|
|
345
|
+
issuer: {
|
|
346
|
+
type: 'url',
|
|
347
|
+
optional: true,
|
|
348
|
+
description: 'OIDC Issuer URL',
|
|
349
|
+
},
|
|
350
|
+
authorizationUrl: {
|
|
351
|
+
type: 'url',
|
|
352
|
+
optional: true,
|
|
353
|
+
description: 'Authorization endpoint URL',
|
|
354
|
+
},
|
|
355
|
+
tokenUrl: {
|
|
356
|
+
type: 'url',
|
|
357
|
+
optional: true,
|
|
358
|
+
description: 'Token endpoint URL',
|
|
359
|
+
},
|
|
360
|
+
userInfoUrl: {
|
|
361
|
+
type: 'url',
|
|
362
|
+
optional: true,
|
|
363
|
+
description: 'User info endpoint URL',
|
|
364
|
+
},
|
|
365
|
+
// Status
|
|
366
|
+
status: {
|
|
367
|
+
type: 'string',
|
|
368
|
+
description: 'Connection status: active, inactive, pending, error',
|
|
369
|
+
examples: ['active', 'inactive', 'pending', 'error'],
|
|
370
|
+
},
|
|
371
|
+
verified: {
|
|
372
|
+
type: 'boolean',
|
|
373
|
+
optional: true,
|
|
374
|
+
description: 'Whether connection is verified',
|
|
375
|
+
},
|
|
376
|
+
// Domains
|
|
377
|
+
domains: {
|
|
378
|
+
type: 'string',
|
|
379
|
+
array: true,
|
|
380
|
+
optional: true,
|
|
381
|
+
description: 'Associated email domains',
|
|
382
|
+
},
|
|
383
|
+
// Settings
|
|
384
|
+
jitProvisioning: {
|
|
385
|
+
type: 'boolean',
|
|
386
|
+
optional: true,
|
|
387
|
+
description: 'Whether JIT provisioning is enabled',
|
|
388
|
+
},
|
|
389
|
+
defaultRole: {
|
|
390
|
+
type: 'string',
|
|
391
|
+
optional: true,
|
|
392
|
+
description: 'Default role for new users',
|
|
393
|
+
},
|
|
394
|
+
attributeMapping: {
|
|
395
|
+
type: 'json',
|
|
396
|
+
optional: true,
|
|
397
|
+
description: 'Attribute mapping configuration',
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
relationships: {
|
|
401
|
+
organization: {
|
|
402
|
+
type: 'Organization',
|
|
403
|
+
description: 'Organization this connection belongs to',
|
|
404
|
+
},
|
|
405
|
+
users: {
|
|
406
|
+
type: 'Identity[]',
|
|
407
|
+
description: 'Users authenticated via this connection',
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
actions: [
|
|
411
|
+
'create',
|
|
412
|
+
'update',
|
|
413
|
+
'delete',
|
|
414
|
+
'activate',
|
|
415
|
+
'deactivate',
|
|
416
|
+
'verify',
|
|
417
|
+
'test',
|
|
418
|
+
'addDomain',
|
|
419
|
+
'removeDomain',
|
|
420
|
+
'setAttributeMapping',
|
|
421
|
+
],
|
|
422
|
+
events: [
|
|
423
|
+
'created',
|
|
424
|
+
'updated',
|
|
425
|
+
'deleted',
|
|
426
|
+
'activated',
|
|
427
|
+
'deactivated',
|
|
428
|
+
'verified',
|
|
429
|
+
'tested',
|
|
430
|
+
'domainAdded',
|
|
431
|
+
'domainRemoved',
|
|
432
|
+
'loginSucceeded',
|
|
433
|
+
'loginFailed',
|
|
434
|
+
],
|
|
435
|
+
};
|
|
436
|
+
// =============================================================================
|
|
437
|
+
// Directory
|
|
438
|
+
// =============================================================================
|
|
439
|
+
/**
|
|
440
|
+
* Directory entity
|
|
441
|
+
*
|
|
442
|
+
* Represents an identity directory (SCIM, LDAP, etc.)
|
|
443
|
+
*/
|
|
444
|
+
export const Directory = {
|
|
445
|
+
singular: 'directory',
|
|
446
|
+
plural: 'directories',
|
|
447
|
+
description: 'An identity directory for user/group synchronization',
|
|
448
|
+
properties: {
|
|
449
|
+
// Identity
|
|
450
|
+
name: {
|
|
451
|
+
type: 'string',
|
|
452
|
+
description: 'Directory sync name',
|
|
453
|
+
},
|
|
454
|
+
type: {
|
|
455
|
+
type: 'string',
|
|
456
|
+
description: 'Directory type: scim, ldap, azure_ad, okta, google',
|
|
457
|
+
examples: ['scim', 'ldap', 'azure_ad', 'okta', 'google'],
|
|
458
|
+
},
|
|
459
|
+
// Configuration
|
|
460
|
+
endpoint: {
|
|
461
|
+
type: 'url',
|
|
462
|
+
optional: true,
|
|
463
|
+
description: 'SCIM endpoint URL',
|
|
464
|
+
},
|
|
465
|
+
bearerToken: {
|
|
466
|
+
type: 'string',
|
|
467
|
+
optional: true,
|
|
468
|
+
description: 'Bearer token for authentication',
|
|
469
|
+
},
|
|
470
|
+
// Status
|
|
471
|
+
status: {
|
|
472
|
+
type: 'string',
|
|
473
|
+
description: 'Sync status: active, inactive, syncing, error',
|
|
474
|
+
examples: ['active', 'inactive', 'syncing', 'error'],
|
|
475
|
+
},
|
|
476
|
+
lastSyncAt: {
|
|
477
|
+
type: 'datetime',
|
|
478
|
+
optional: true,
|
|
479
|
+
description: 'Last sync timestamp',
|
|
480
|
+
},
|
|
481
|
+
lastSyncStatus: {
|
|
482
|
+
type: 'string',
|
|
483
|
+
optional: true,
|
|
484
|
+
description: 'Last sync status',
|
|
485
|
+
},
|
|
486
|
+
// Sync settings
|
|
487
|
+
syncInterval: {
|
|
488
|
+
type: 'number',
|
|
489
|
+
optional: true,
|
|
490
|
+
description: 'Sync interval in minutes',
|
|
491
|
+
},
|
|
492
|
+
autoProvision: {
|
|
493
|
+
type: 'boolean',
|
|
494
|
+
optional: true,
|
|
495
|
+
description: 'Whether to auto-provision users',
|
|
496
|
+
},
|
|
497
|
+
autoDeprovision: {
|
|
498
|
+
type: 'boolean',
|
|
499
|
+
optional: true,
|
|
500
|
+
description: 'Whether to auto-deprovision users',
|
|
501
|
+
},
|
|
502
|
+
// Metrics
|
|
503
|
+
userCount: {
|
|
504
|
+
type: 'number',
|
|
505
|
+
optional: true,
|
|
506
|
+
description: 'Number of synced users',
|
|
507
|
+
},
|
|
508
|
+
groupCount: {
|
|
509
|
+
type: 'number',
|
|
510
|
+
optional: true,
|
|
511
|
+
description: 'Number of synced groups',
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
relationships: {
|
|
515
|
+
organization: {
|
|
516
|
+
type: 'Organization',
|
|
517
|
+
description: 'Organization this sync belongs to',
|
|
518
|
+
},
|
|
519
|
+
users: {
|
|
520
|
+
type: 'DirectoryUser[]',
|
|
521
|
+
description: 'Synced users',
|
|
522
|
+
},
|
|
523
|
+
groups: {
|
|
524
|
+
type: 'DirectoryGroup[]',
|
|
525
|
+
description: 'Synced groups',
|
|
526
|
+
},
|
|
527
|
+
},
|
|
528
|
+
actions: [
|
|
529
|
+
'create',
|
|
530
|
+
'update',
|
|
531
|
+
'delete',
|
|
532
|
+
'activate',
|
|
533
|
+
'deactivate',
|
|
534
|
+
'sync',
|
|
535
|
+
'forceSync',
|
|
536
|
+
'regenerateToken',
|
|
537
|
+
],
|
|
538
|
+
events: [
|
|
539
|
+
'created',
|
|
540
|
+
'updated',
|
|
541
|
+
'deleted',
|
|
542
|
+
'activated',
|
|
543
|
+
'deactivated',
|
|
544
|
+
'syncStarted',
|
|
545
|
+
'syncCompleted',
|
|
546
|
+
'syncFailed',
|
|
547
|
+
'userProvisioned',
|
|
548
|
+
'userDeprovisioned',
|
|
549
|
+
'groupCreated',
|
|
550
|
+
'groupDeleted',
|
|
551
|
+
],
|
|
552
|
+
};
|
|
553
|
+
/**
|
|
554
|
+
* Directory user entity
|
|
555
|
+
*/
|
|
556
|
+
export const DirectoryUser = {
|
|
557
|
+
singular: 'directory user',
|
|
558
|
+
plural: 'directory users',
|
|
559
|
+
description: 'A user synced from a directory',
|
|
560
|
+
properties: {
|
|
561
|
+
externalId: {
|
|
562
|
+
type: 'string',
|
|
563
|
+
description: 'External ID from directory',
|
|
564
|
+
},
|
|
565
|
+
email: {
|
|
566
|
+
type: 'string',
|
|
567
|
+
description: 'User email',
|
|
568
|
+
},
|
|
569
|
+
firstName: {
|
|
570
|
+
type: 'string',
|
|
571
|
+
optional: true,
|
|
572
|
+
description: 'First name',
|
|
573
|
+
},
|
|
574
|
+
lastName: {
|
|
575
|
+
type: 'string',
|
|
576
|
+
optional: true,
|
|
577
|
+
description: 'Last name',
|
|
578
|
+
},
|
|
579
|
+
username: {
|
|
580
|
+
type: 'string',
|
|
581
|
+
optional: true,
|
|
582
|
+
description: 'Username',
|
|
583
|
+
},
|
|
584
|
+
state: {
|
|
585
|
+
type: 'string',
|
|
586
|
+
description: 'User state: active, suspended, deleted',
|
|
587
|
+
examples: ['active', 'suspended', 'deleted'],
|
|
588
|
+
},
|
|
589
|
+
customAttributes: {
|
|
590
|
+
type: 'json',
|
|
591
|
+
optional: true,
|
|
592
|
+
description: 'Custom attributes from directory',
|
|
593
|
+
},
|
|
594
|
+
lastSyncedAt: {
|
|
595
|
+
type: 'datetime',
|
|
596
|
+
optional: true,
|
|
597
|
+
description: 'Last sync timestamp',
|
|
598
|
+
},
|
|
599
|
+
},
|
|
600
|
+
relationships: {
|
|
601
|
+
directory: {
|
|
602
|
+
type: 'Directory',
|
|
603
|
+
backref: 'users',
|
|
604
|
+
description: 'Parent directory sync',
|
|
605
|
+
},
|
|
606
|
+
groups: {
|
|
607
|
+
type: 'DirectoryGroup[]',
|
|
608
|
+
description: 'Groups this user belongs to',
|
|
609
|
+
},
|
|
610
|
+
identity: {
|
|
611
|
+
type: 'Identity',
|
|
612
|
+
required: false,
|
|
613
|
+
description: 'Linked identity',
|
|
614
|
+
},
|
|
615
|
+
},
|
|
616
|
+
actions: ['provision', 'deprovision', 'suspend', 'reactivate', 'sync'],
|
|
617
|
+
events: ['provisioned', 'deprovisioned', 'suspended', 'reactivated', 'synced'],
|
|
618
|
+
};
|
|
619
|
+
/**
|
|
620
|
+
* Directory group entity
|
|
621
|
+
*/
|
|
622
|
+
export const DirectoryGroup = {
|
|
623
|
+
singular: 'directory group',
|
|
624
|
+
plural: 'directory groups',
|
|
625
|
+
description: 'A group synced from a directory',
|
|
626
|
+
properties: {
|
|
627
|
+
externalId: {
|
|
628
|
+
type: 'string',
|
|
629
|
+
description: 'External ID from directory',
|
|
630
|
+
},
|
|
631
|
+
name: {
|
|
632
|
+
type: 'string',
|
|
633
|
+
description: 'Group name',
|
|
634
|
+
},
|
|
635
|
+
description: {
|
|
636
|
+
type: 'string',
|
|
637
|
+
optional: true,
|
|
638
|
+
description: 'Group description',
|
|
639
|
+
},
|
|
640
|
+
memberCount: {
|
|
641
|
+
type: 'number',
|
|
642
|
+
optional: true,
|
|
643
|
+
description: 'Number of members',
|
|
644
|
+
},
|
|
645
|
+
lastSyncedAt: {
|
|
646
|
+
type: 'datetime',
|
|
647
|
+
optional: true,
|
|
648
|
+
description: 'Last sync timestamp',
|
|
649
|
+
},
|
|
650
|
+
},
|
|
651
|
+
relationships: {
|
|
652
|
+
directory: {
|
|
653
|
+
type: 'Directory',
|
|
654
|
+
backref: 'groups',
|
|
655
|
+
description: 'Parent directory sync',
|
|
656
|
+
},
|
|
657
|
+
members: {
|
|
658
|
+
type: 'DirectoryUser[]',
|
|
659
|
+
description: 'Group members',
|
|
660
|
+
},
|
|
661
|
+
},
|
|
662
|
+
actions: ['create', 'delete', 'addMember', 'removeMember', 'sync'],
|
|
663
|
+
events: ['created', 'deleted', 'memberAdded', 'memberRemoved', 'synced'],
|
|
664
|
+
};
|
|
665
|
+
// =============================================================================
|
|
666
|
+
// Audit Log
|
|
667
|
+
// =============================================================================
|
|
668
|
+
/**
|
|
669
|
+
* Audit log entity
|
|
670
|
+
*
|
|
671
|
+
* Represents an audit log entry
|
|
672
|
+
*/
|
|
673
|
+
export const AuditLog = {
|
|
674
|
+
singular: 'audit log',
|
|
675
|
+
plural: 'audit logs',
|
|
676
|
+
description: 'An audit log entry for security and compliance',
|
|
677
|
+
properties: {
|
|
678
|
+
// Event
|
|
679
|
+
action: {
|
|
680
|
+
type: 'string',
|
|
681
|
+
description: 'Action performed',
|
|
682
|
+
},
|
|
683
|
+
category: {
|
|
684
|
+
type: 'string',
|
|
685
|
+
description: 'Event category: auth, access, data, admin, system',
|
|
686
|
+
examples: ['auth', 'access', 'data', 'admin', 'system'],
|
|
687
|
+
},
|
|
688
|
+
description: {
|
|
689
|
+
type: 'string',
|
|
690
|
+
optional: true,
|
|
691
|
+
description: 'Event description',
|
|
692
|
+
},
|
|
693
|
+
// Actor
|
|
694
|
+
actorId: {
|
|
695
|
+
type: 'string',
|
|
696
|
+
optional: true,
|
|
697
|
+
description: 'Actor user ID',
|
|
698
|
+
},
|
|
699
|
+
actorEmail: {
|
|
700
|
+
type: 'string',
|
|
701
|
+
optional: true,
|
|
702
|
+
description: 'Actor email',
|
|
703
|
+
},
|
|
704
|
+
actorName: {
|
|
705
|
+
type: 'string',
|
|
706
|
+
optional: true,
|
|
707
|
+
description: 'Actor name',
|
|
708
|
+
},
|
|
709
|
+
actorType: {
|
|
710
|
+
type: 'string',
|
|
711
|
+
optional: true,
|
|
712
|
+
description: 'Actor type: user, service, system',
|
|
713
|
+
examples: ['user', 'service', 'system'],
|
|
714
|
+
},
|
|
715
|
+
// Target
|
|
716
|
+
targetId: {
|
|
717
|
+
type: 'string',
|
|
718
|
+
optional: true,
|
|
719
|
+
description: 'Target resource ID',
|
|
720
|
+
},
|
|
721
|
+
targetType: {
|
|
722
|
+
type: 'string',
|
|
723
|
+
optional: true,
|
|
724
|
+
description: 'Target resource type',
|
|
725
|
+
},
|
|
726
|
+
targetName: {
|
|
727
|
+
type: 'string',
|
|
728
|
+
optional: true,
|
|
729
|
+
description: 'Target resource name',
|
|
730
|
+
},
|
|
731
|
+
// Context
|
|
732
|
+
ipAddress: {
|
|
733
|
+
type: 'string',
|
|
734
|
+
optional: true,
|
|
735
|
+
description: 'IP address',
|
|
736
|
+
},
|
|
737
|
+
userAgent: {
|
|
738
|
+
type: 'string',
|
|
739
|
+
optional: true,
|
|
740
|
+
description: 'User agent string',
|
|
741
|
+
},
|
|
742
|
+
location: {
|
|
743
|
+
type: 'json',
|
|
744
|
+
optional: true,
|
|
745
|
+
description: 'Geographic location',
|
|
746
|
+
},
|
|
747
|
+
sessionId: {
|
|
748
|
+
type: 'string',
|
|
749
|
+
optional: true,
|
|
750
|
+
description: 'Session ID',
|
|
751
|
+
},
|
|
752
|
+
// Result
|
|
753
|
+
outcome: {
|
|
754
|
+
type: 'string',
|
|
755
|
+
description: 'Outcome: success, failure, error',
|
|
756
|
+
examples: ['success', 'failure', 'error'],
|
|
757
|
+
},
|
|
758
|
+
errorCode: {
|
|
759
|
+
type: 'string',
|
|
760
|
+
optional: true,
|
|
761
|
+
description: 'Error code if failed',
|
|
762
|
+
},
|
|
763
|
+
errorMessage: {
|
|
764
|
+
type: 'string',
|
|
765
|
+
optional: true,
|
|
766
|
+
description: 'Error message if failed',
|
|
767
|
+
},
|
|
768
|
+
// Changes
|
|
769
|
+
changes: {
|
|
770
|
+
type: 'json',
|
|
771
|
+
optional: true,
|
|
772
|
+
description: 'Changes made (before/after)',
|
|
773
|
+
},
|
|
774
|
+
// Metadata
|
|
775
|
+
timestamp: {
|
|
776
|
+
type: 'datetime',
|
|
777
|
+
description: 'Event timestamp',
|
|
778
|
+
},
|
|
779
|
+
metadata: {
|
|
780
|
+
type: 'json',
|
|
781
|
+
optional: true,
|
|
782
|
+
description: 'Additional metadata',
|
|
783
|
+
},
|
|
784
|
+
},
|
|
785
|
+
relationships: {
|
|
786
|
+
actor: {
|
|
787
|
+
type: 'Identity',
|
|
788
|
+
required: false,
|
|
789
|
+
description: 'Actor identity',
|
|
790
|
+
},
|
|
791
|
+
organization: {
|
|
792
|
+
type: 'Organization',
|
|
793
|
+
required: false,
|
|
794
|
+
description: 'Organization context',
|
|
795
|
+
},
|
|
796
|
+
},
|
|
797
|
+
actions: ['log', 'query', 'export', 'archive'],
|
|
798
|
+
events: ['logged'],
|
|
799
|
+
};
|
|
800
|
+
// =============================================================================
|
|
801
|
+
// Organization
|
|
802
|
+
// =============================================================================
|
|
803
|
+
/**
|
|
804
|
+
* Organization entity
|
|
805
|
+
*
|
|
806
|
+
* Represents an organization for multi-tenancy
|
|
807
|
+
*/
|
|
808
|
+
export const Organization = {
|
|
809
|
+
singular: 'organization',
|
|
810
|
+
plural: 'organizations',
|
|
811
|
+
description: 'An organization for multi-tenant identity management',
|
|
812
|
+
properties: {
|
|
813
|
+
// Identity
|
|
814
|
+
name: {
|
|
815
|
+
type: 'string',
|
|
816
|
+
description: 'Organization name',
|
|
817
|
+
},
|
|
818
|
+
slug: {
|
|
819
|
+
type: 'string',
|
|
820
|
+
optional: true,
|
|
821
|
+
description: 'URL-friendly slug',
|
|
822
|
+
},
|
|
823
|
+
domain: {
|
|
824
|
+
type: 'string',
|
|
825
|
+
optional: true,
|
|
826
|
+
description: 'Primary domain',
|
|
827
|
+
},
|
|
828
|
+
domains: {
|
|
829
|
+
type: 'string',
|
|
830
|
+
array: true,
|
|
831
|
+
optional: true,
|
|
832
|
+
description: 'All verified domains',
|
|
833
|
+
},
|
|
834
|
+
// Branding
|
|
835
|
+
logo: {
|
|
836
|
+
type: 'url',
|
|
837
|
+
optional: true,
|
|
838
|
+
description: 'Organization logo',
|
|
839
|
+
},
|
|
840
|
+
// Settings
|
|
841
|
+
allowedAuthMethods: {
|
|
842
|
+
type: 'string',
|
|
843
|
+
array: true,
|
|
844
|
+
optional: true,
|
|
845
|
+
description: 'Allowed authentication methods',
|
|
846
|
+
},
|
|
847
|
+
mfaRequired: {
|
|
848
|
+
type: 'boolean',
|
|
849
|
+
optional: true,
|
|
850
|
+
description: 'Whether MFA is required',
|
|
851
|
+
},
|
|
852
|
+
sessionTimeout: {
|
|
853
|
+
type: 'number',
|
|
854
|
+
optional: true,
|
|
855
|
+
description: 'Session timeout in minutes',
|
|
856
|
+
},
|
|
857
|
+
// Status
|
|
858
|
+
status: {
|
|
859
|
+
type: 'string',
|
|
860
|
+
description: 'Organization status: active, suspended, deleted',
|
|
861
|
+
examples: ['active', 'suspended', 'deleted'],
|
|
862
|
+
},
|
|
863
|
+
// Metrics
|
|
864
|
+
memberCount: {
|
|
865
|
+
type: 'number',
|
|
866
|
+
optional: true,
|
|
867
|
+
description: 'Number of members',
|
|
868
|
+
},
|
|
869
|
+
},
|
|
870
|
+
relationships: {
|
|
871
|
+
members: {
|
|
872
|
+
type: 'OrganizationMember[]',
|
|
873
|
+
backref: 'organization',
|
|
874
|
+
description: 'Organization members',
|
|
875
|
+
},
|
|
876
|
+
ssoConnections: {
|
|
877
|
+
type: 'SSOConnection[]',
|
|
878
|
+
description: 'SSO connections',
|
|
879
|
+
},
|
|
880
|
+
directorySyncs: {
|
|
881
|
+
type: 'Directory[]',
|
|
882
|
+
description: 'Directory syncs',
|
|
883
|
+
},
|
|
884
|
+
auditLogs: {
|
|
885
|
+
type: 'AuditLog[]',
|
|
886
|
+
description: 'Audit logs',
|
|
887
|
+
},
|
|
888
|
+
},
|
|
889
|
+
actions: [
|
|
890
|
+
'create',
|
|
891
|
+
'update',
|
|
892
|
+
'delete',
|
|
893
|
+
'suspend',
|
|
894
|
+
'reactivate',
|
|
895
|
+
'addMember',
|
|
896
|
+
'removeMember',
|
|
897
|
+
'verifyDomain',
|
|
898
|
+
'removeDomain',
|
|
899
|
+
'setMfaRequired',
|
|
900
|
+
],
|
|
901
|
+
events: [
|
|
902
|
+
'created',
|
|
903
|
+
'updated',
|
|
904
|
+
'deleted',
|
|
905
|
+
'suspended',
|
|
906
|
+
'reactivated',
|
|
907
|
+
'memberAdded',
|
|
908
|
+
'memberRemoved',
|
|
909
|
+
'domainVerified',
|
|
910
|
+
'domainRemoved',
|
|
911
|
+
'mfaRequirementChanged',
|
|
912
|
+
],
|
|
913
|
+
};
|
|
914
|
+
/**
|
|
915
|
+
* Organization member entity
|
|
916
|
+
*/
|
|
917
|
+
export const OrganizationMember = {
|
|
918
|
+
singular: 'organization member',
|
|
919
|
+
plural: 'organization members',
|
|
920
|
+
description: 'A member of an organization',
|
|
921
|
+
properties: {
|
|
922
|
+
role: {
|
|
923
|
+
type: 'string',
|
|
924
|
+
description: 'Member role: owner, admin, member, guest',
|
|
925
|
+
examples: ['owner', 'admin', 'member', 'guest'],
|
|
926
|
+
},
|
|
927
|
+
status: {
|
|
928
|
+
type: 'string',
|
|
929
|
+
description: 'Membership status: active, invited, suspended',
|
|
930
|
+
examples: ['active', 'invited', 'suspended'],
|
|
931
|
+
},
|
|
932
|
+
invitedAt: {
|
|
933
|
+
type: 'datetime',
|
|
934
|
+
optional: true,
|
|
935
|
+
description: 'When member was invited',
|
|
936
|
+
},
|
|
937
|
+
joinedAt: {
|
|
938
|
+
type: 'datetime',
|
|
939
|
+
optional: true,
|
|
940
|
+
description: 'When member joined',
|
|
941
|
+
},
|
|
942
|
+
},
|
|
943
|
+
relationships: {
|
|
944
|
+
organization: {
|
|
945
|
+
type: 'Organization',
|
|
946
|
+
backref: 'members',
|
|
947
|
+
description: 'Parent organization',
|
|
948
|
+
},
|
|
949
|
+
identity: {
|
|
950
|
+
type: 'Identity',
|
|
951
|
+
description: 'Member identity',
|
|
952
|
+
},
|
|
953
|
+
},
|
|
954
|
+
actions: ['invite', 'accept', 'remove', 'setRole', 'suspend', 'reactivate'],
|
|
955
|
+
events: [
|
|
956
|
+
'invited',
|
|
957
|
+
'accepted',
|
|
958
|
+
'removed',
|
|
959
|
+
'roleChanged',
|
|
960
|
+
'suspended',
|
|
961
|
+
'reactivated',
|
|
962
|
+
],
|
|
963
|
+
};
|
|
964
|
+
// =============================================================================
|
|
965
|
+
// Export all entities as a schema
|
|
966
|
+
// =============================================================================
|
|
967
|
+
/**
|
|
968
|
+
* All identity entity types
|
|
969
|
+
*/
|
|
970
|
+
export const IdentityEntities = {
|
|
971
|
+
// Vault
|
|
972
|
+
Vault,
|
|
973
|
+
VaultSecret,
|
|
974
|
+
SecretVersion,
|
|
975
|
+
VaultPolicy,
|
|
976
|
+
// SSO
|
|
977
|
+
SSOConnection,
|
|
978
|
+
// Directory Sync
|
|
979
|
+
Directory,
|
|
980
|
+
DirectoryUser,
|
|
981
|
+
DirectoryGroup,
|
|
982
|
+
// Audit
|
|
983
|
+
AuditLog,
|
|
984
|
+
// Organizations
|
|
985
|
+
Organization,
|
|
986
|
+
OrganizationMember,
|
|
987
|
+
};
|
|
988
|
+
/**
|
|
989
|
+
* Entity categories for organization
|
|
990
|
+
*/
|
|
991
|
+
export const IdentityCategories = {
|
|
992
|
+
vault: ['Vault', 'VaultSecret', 'SecretVersion', 'VaultPolicy'],
|
|
993
|
+
sso: ['SSOConnection'],
|
|
994
|
+
directory: ['Directory', 'DirectoryUser', 'DirectoryGroup'],
|
|
995
|
+
audit: ['AuditLog'],
|
|
996
|
+
organization: ['Organization', 'OrganizationMember'],
|
|
997
|
+
};
|