digital-tools 2.1.1 → 2.3.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/CHANGELOG.md +17 -0
- package/README.md +2 -0
- package/dist/client.d.ts +109 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +69 -0
- package/dist/client.js.map +1 -0
- package/dist/define.d.ts +2 -2
- package/dist/define.d.ts.map +1 -1
- package/dist/define.js +22 -20
- package/dist/define.js.map +1 -1
- package/dist/function-ref.d.ts +229 -0
- package/dist/function-ref.d.ts.map +1 -0
- package/dist/function-ref.js +28 -0
- package/dist/function-ref.js.map +1 -0
- package/dist/function-sugar.d.ts +57 -0
- package/dist/function-sugar.d.ts.map +1 -0
- package/dist/function-sugar.js +79 -0
- package/dist/function-sugar.js.map +1 -0
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -4
- package/dist/index.js.map +1 -1
- package/dist/providers/analytics/mixpanel.d.ts.map +1 -1
- package/dist/providers/analytics/mixpanel.js +21 -18
- package/dist/providers/analytics/mixpanel.js.map +1 -1
- package/dist/providers/calendar/cal-com.d.ts.map +1 -1
- package/dist/providers/calendar/cal-com.js +10 -10
- package/dist/providers/calendar/cal-com.js.map +1 -1
- package/dist/providers/calendar/google-calendar.d.ts.map +1 -1
- package/dist/providers/calendar/google-calendar.js +4 -4
- package/dist/providers/calendar/google-calendar.js.map +1 -1
- package/dist/providers/crm/hubspot.d.ts.map +1 -1
- package/dist/providers/crm/hubspot.js +107 -85
- package/dist/providers/crm/hubspot.js.map +1 -1
- package/dist/providers/development/github.d.ts.map +1 -1
- package/dist/providers/development/github.js +40 -43
- package/dist/providers/development/github.js.map +1 -1
- package/dist/providers/ecommerce/shopify.d.ts.map +1 -1
- package/dist/providers/ecommerce/shopify.js +79 -62
- package/dist/providers/ecommerce/shopify.js.map +1 -1
- package/dist/providers/email/resend.d.ts.map +1 -1
- package/dist/providers/email/resend.js +20 -16
- package/dist/providers/email/resend.js.map +1 -1
- package/dist/providers/email/sendgrid.d.ts.map +1 -1
- package/dist/providers/email/sendgrid.js +12 -9
- package/dist/providers/email/sendgrid.js.map +1 -1
- package/dist/providers/finance/stripe.d.ts.map +1 -1
- package/dist/providers/finance/stripe.js +44 -42
- package/dist/providers/finance/stripe.js.map +1 -1
- package/dist/providers/forms/typeform.d.ts.map +1 -1
- package/dist/providers/forms/typeform.js +68 -58
- package/dist/providers/forms/typeform.js.map +1 -1
- package/dist/providers/knowledge/notion.d.ts.map +1 -1
- package/dist/providers/knowledge/notion.js +75 -41
- package/dist/providers/knowledge/notion.js.map +1 -1
- package/dist/providers/marketing/mailchimp.d.ts.map +1 -1
- package/dist/providers/marketing/mailchimp.js +74 -61
- package/dist/providers/marketing/mailchimp.js.map +1 -1
- package/dist/providers/media/cloudinary.d.ts.map +1 -1
- package/dist/providers/media/cloudinary.js +30 -28
- package/dist/providers/media/cloudinary.js.map +1 -1
- package/dist/providers/messaging/slack.d.ts.map +1 -1
- package/dist/providers/messaging/slack.js +75 -58
- package/dist/providers/messaging/slack.js.map +1 -1
- package/dist/providers/messaging/twilio-sms.d.ts.map +1 -1
- package/dist/providers/messaging/twilio-sms.js +33 -15
- package/dist/providers/messaging/twilio-sms.js.map +1 -1
- package/dist/providers/project-management/linear.d.ts.map +1 -1
- package/dist/providers/project-management/linear.js +31 -27
- package/dist/providers/project-management/linear.js.map +1 -1
- package/dist/providers/spreadsheet/google-sheets.d.ts.map +1 -1
- package/dist/providers/spreadsheet/google-sheets.js +21 -18
- package/dist/providers/spreadsheet/google-sheets.js.map +1 -1
- package/dist/providers/spreadsheet/xlsx.d.ts.map +1 -1
- package/dist/providers/spreadsheet/xlsx.js +4 -4
- package/dist/providers/spreadsheet/xlsx.js.map +1 -1
- package/dist/providers/storage/index.js +1 -0
- package/dist/providers/storage/index.js.map +1 -1
- package/dist/providers/storage/s3.d.ts.map +1 -1
- package/dist/providers/storage/s3.js +36 -27
- package/dist/providers/storage/s3.js.map +1 -1
- package/dist/providers/support/zendesk.d.ts.map +1 -1
- package/dist/providers/support/zendesk.js +24 -25
- package/dist/providers/support/zendesk.js.map +1 -1
- package/dist/providers/tasks/todoist.d.ts.map +1 -1
- package/dist/providers/tasks/todoist.js +18 -18
- package/dist/providers/tasks/todoist.js.map +1 -1
- package/dist/providers/video-conferencing/google-meet.d.ts.map +1 -1
- package/dist/providers/video-conferencing/google-meet.js +11 -11
- package/dist/providers/video-conferencing/google-meet.js.map +1 -1
- package/dist/providers/video-conferencing/jitsi.js +14 -14
- package/dist/providers/video-conferencing/jitsi.js.map +1 -1
- package/dist/providers/video-conferencing/teams.d.ts.map +1 -1
- package/dist/providers/video-conferencing/teams.js +9 -7
- package/dist/providers/video-conferencing/teams.js.map +1 -1
- package/dist/providers/video-conferencing/zoom.d.ts.map +1 -1
- package/dist/providers/video-conferencing/zoom.js +26 -24
- package/dist/providers/video-conferencing/zoom.js.map +1 -1
- package/dist/tools/data.d.ts.map +1 -1
- package/dist/tools/data.js +5 -12
- package/dist/tools/data.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/system.d.ts +289 -0
- package/dist/tools/system.d.ts.map +1 -0
- package/dist/tools/system.js +752 -0
- package/dist/tools/system.js.map +1 -0
- package/dist/tools/web.d.ts.map +1 -1
- package/dist/tools/web.js +22 -10
- package/dist/tools/web.js.map +1 -1
- package/dist/track-record.d.ts +101 -0
- package/dist/track-record.d.ts.map +1 -0
- package/dist/track-record.js +17 -0
- package/dist/track-record.js.map +1 -0
- package/dist/types.d.ts +210 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/verb-registration.d.ts +122 -0
- package/dist/verb-registration.d.ts.map +1 -0
- package/dist/verb-registration.js +176 -0
- package/dist/verb-registration.js.map +1 -0
- package/dist/worker.d.ts +93 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +315 -0
- package/dist/worker.js.map +1 -0
- package/dist/wrap.d.ts +89 -0
- package/dist/wrap.d.ts.map +1 -0
- package/dist/wrap.js +225 -0
- package/dist/wrap.js.map +1 -0
- package/package.json +21 -4
- package/src/client.ts +136 -0
- package/src/define.ts +31 -37
- package/src/function-ref.ts +264 -0
- package/src/function-sugar.ts +134 -0
- package/src/index.ts +132 -10
- package/src/providers/analytics/mixpanel.ts +19 -18
- package/src/providers/calendar/cal-com.ts +29 -18
- package/src/providers/calendar/google-calendar.ts +20 -14
- package/src/providers/crm/hubspot.ts +225 -99
- package/src/providers/development/github.ts +206 -135
- package/src/providers/ecommerce/shopify.ts +250 -89
- package/src/providers/email/resend.ts +101 -28
- package/src/providers/email/sendgrid.ts +12 -9
- package/src/providers/finance/stripe.ts +128 -49
- package/src/providers/forms/typeform.ts +74 -58
- package/src/providers/knowledge/notion.ts +340 -88
- package/src/providers/marketing/mailchimp.ts +86 -70
- package/src/providers/media/cloudinary.ts +99 -41
- package/src/providers/messaging/slack.ts +283 -85
- package/src/providers/messaging/twilio-sms.ts +35 -15
- package/src/providers/project-management/linear.ts +143 -55
- package/src/providers/spreadsheet/google-sheets.ts +222 -56
- package/src/providers/spreadsheet/xlsx.ts +47 -16
- package/src/providers/storage/s3.ts +119 -47
- package/src/providers/support/zendesk.ts +196 -46
- package/src/providers/tasks/todoist.ts +20 -26
- package/src/providers/video-conferencing/google-meet.ts +17 -20
- package/src/providers/video-conferencing/jitsi.ts +14 -14
- package/src/providers/video-conferencing/teams.ts +14 -13
- package/src/providers/video-conferencing/zoom.ts +54 -49
- package/src/tools/data.ts +6 -16
- package/src/tools/index.ts +1 -0
- package/src/tools/system.ts +887 -0
- package/src/tools/web.ts +22 -10
- package/src/track-record.ts +106 -0
- package/src/types.ts +241 -13
- package/src/verb-registration.ts +197 -0
- package/src/worker.ts +370 -0
- package/src/wrap.ts +260 -0
- package/test/client.test.ts +146 -0
- package/test/communication-tools-extended.test.ts +734 -0
- package/test/data-tools-extended.test.ts +743 -0
- package/test/define-extended.test.ts +819 -0
- package/test/define.test.ts +150 -41
- package/test/entities.test.ts +623 -0
- package/test/extended-entities.test.ts +1228 -0
- package/test/provider-implementations.test.ts +725 -0
- package/test/provider-registry-extended.test.ts +583 -0
- package/test/providers/google-sheets.test.ts +851 -0
- package/test/providers/helpers.ts +554 -0
- package/test/providers/hubspot.test.ts +576 -0
- package/test/providers/slack.test.ts +932 -0
- package/test/providers/stripe.test.ts +701 -0
- package/test/providers.test.ts +578 -0
- package/test/system-tools-extended.test.ts +632 -0
- package/test/system.test.ts +673 -0
- package/test/tools.test.ts +15 -11
- package/test/types.test.ts +402 -0
- package/test/verb-registration.test.ts +395 -0
- package/test/web-tools.test.ts +553 -0
- package/test/worker-extended.test.ts +699 -0
- package/test/worker.test.ts +576 -0
- package/test/wrap.test.ts +366 -0
- package/tsconfig.json +3 -13
- package/vitest.config.ts +37 -0
- package/wrangler.jsonc +9 -0
- package/.turbo/turbo-build.log +0 -5
- package/dist/providers/voice/vapi.d.ts +0 -27
- package/dist/providers/voice/vapi.d.ts.map +0 -1
- package/dist/providers/voice/vapi.js +0 -440
- package/dist/providers/voice/vapi.js.map +0 -1
- package/src/define.js +0 -267
- package/src/entities/advertising.js +0 -999
- package/src/entities/ai.js +0 -756
- package/src/entities/analytics.js +0 -1588
- package/src/entities/automation.js +0 -601
- package/src/entities/communication.js +0 -1150
- package/src/entities/crm.js +0 -1386
- package/src/entities/design.js +0 -546
- package/src/entities/development.js +0 -2212
- package/src/entities/document.js +0 -874
- package/src/entities/ecommerce.js +0 -1429
- package/src/entities/experiment.js +0 -1039
- package/src/entities/finance.js +0 -3478
- package/src/entities/forms.js +0 -1892
- package/src/entities/hr.js +0 -661
- package/src/entities/identity.js +0 -997
- package/src/entities/index.js +0 -282
- package/src/entities/infrastructure.js +0 -1153
- package/src/entities/knowledge.js +0 -1438
- package/src/entities/marketing.js +0 -1610
- package/src/entities/media.js +0 -1634
- package/src/entities/notification.js +0 -1199
- package/src/entities/presentation.js +0 -1274
- package/src/entities/productivity.js +0 -1317
- package/src/entities/project-management.js +0 -1136
- package/src/entities/recruiting.js +0 -736
- package/src/entities/shipping.js +0 -509
- package/src/entities/signature.js +0 -1102
- package/src/entities/site.js +0 -222
- package/src/entities/spreadsheet.js +0 -1341
- package/src/entities/storage.js +0 -1198
- package/src/entities/support.js +0 -1166
- package/src/entities/video-conferencing.js +0 -1750
- package/src/entities/video.js +0 -950
- package/src/entities.js +0 -1663
- package/src/index.js +0 -74
- package/src/providers/analytics/index.js +0 -17
- package/src/providers/analytics/mixpanel.js +0 -255
- package/src/providers/calendar/cal-com.js +0 -303
- package/src/providers/calendar/google-calendar.js +0 -335
- package/src/providers/calendar/index.js +0 -20
- package/src/providers/crm/hubspot.js +0 -566
- package/src/providers/crm/index.js +0 -17
- package/src/providers/development/github.js +0 -472
- package/src/providers/development/index.js +0 -17
- package/src/providers/ecommerce/index.js +0 -17
- package/src/providers/ecommerce/shopify.js +0 -378
- package/src/providers/email/index.js +0 -20
- package/src/providers/email/resend.js +0 -258
- package/src/providers/email/sendgrid.js +0 -161
- package/src/providers/finance/index.js +0 -17
- package/src/providers/finance/stripe.js +0 -549
- package/src/providers/forms/index.js +0 -17
- package/src/providers/forms/typeform.js +0 -500
- package/src/providers/index.js +0 -123
- package/src/providers/knowledge/index.js +0 -17
- package/src/providers/knowledge/notion.js +0 -389
- package/src/providers/marketing/index.js +0 -17
- package/src/providers/marketing/mailchimp.js +0 -443
- package/src/providers/media/cloudinary.js +0 -318
- package/src/providers/media/index.js +0 -17
- package/src/providers/messaging/index.js +0 -20
- package/src/providers/messaging/slack.js +0 -393
- package/src/providers/messaging/twilio-sms.js +0 -249
- package/src/providers/project-management/index.js +0 -17
- package/src/providers/project-management/linear.js +0 -575
- package/src/providers/registry.js +0 -86
- package/src/providers/spreadsheet/google-sheets.js +0 -375
- package/src/providers/spreadsheet/index.js +0 -20
- package/src/providers/spreadsheet/xlsx.js +0 -423
- package/src/providers/storage/index.js +0 -24
- package/src/providers/storage/s3.js +0 -419
- package/src/providers/support/index.js +0 -17
- package/src/providers/support/zendesk.js +0 -373
- package/src/providers/tasks/index.js +0 -17
- package/src/providers/tasks/todoist.js +0 -286
- package/src/providers/types.js +0 -9
- package/src/providers/video-conferencing/google-meet.js +0 -286
- package/src/providers/video-conferencing/index.js +0 -31
- package/src/providers/video-conferencing/jitsi.js +0 -254
- package/src/providers/video-conferencing/teams.js +0 -270
- package/src/providers/video-conferencing/zoom.js +0 -332
- package/src/registry.js +0 -128
- package/src/tools/communication.js +0 -184
- package/src/tools/data.js +0 -205
- package/src/tools/index.js +0 -11
- package/src/tools/web.js +0 -137
- package/src/types.js +0 -10
- package/test/define.test.js +0 -306
- package/test/registry.test.js +0 -357
- package/test/tools.test.js +0 -363
|
@@ -1,1153 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cloud Platform Entity Types (Nouns)
|
|
3
|
-
*
|
|
4
|
-
* Entities for cloud platform services like Firebase, Vercel, AWS, etc.
|
|
5
|
-
* Includes serverless functions, hosting, databases, and configuration.
|
|
6
|
-
*
|
|
7
|
-
* @packageDocumentation
|
|
8
|
-
*/
|
|
9
|
-
// =============================================================================
|
|
10
|
-
// Config (Remote Configuration / Feature Flags)
|
|
11
|
-
// =============================================================================
|
|
12
|
-
/**
|
|
13
|
-
* Config entity
|
|
14
|
-
*
|
|
15
|
-
* Represents remote configuration for feature flags and dynamic settings
|
|
16
|
-
*/
|
|
17
|
-
export const Config = {
|
|
18
|
-
singular: 'config',
|
|
19
|
-
plural: 'configs',
|
|
20
|
-
description: 'Remote configuration for feature flags and dynamic settings',
|
|
21
|
-
properties: {
|
|
22
|
-
// Identity
|
|
23
|
-
key: {
|
|
24
|
-
type: 'string',
|
|
25
|
-
description: 'Configuration key',
|
|
26
|
-
},
|
|
27
|
-
name: {
|
|
28
|
-
type: 'string',
|
|
29
|
-
optional: true,
|
|
30
|
-
description: 'Human-readable name',
|
|
31
|
-
},
|
|
32
|
-
description: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
optional: true,
|
|
35
|
-
description: 'Configuration description',
|
|
36
|
-
},
|
|
37
|
-
// Value
|
|
38
|
-
value: {
|
|
39
|
-
type: 'json',
|
|
40
|
-
description: 'Configuration value (string, number, boolean, JSON)',
|
|
41
|
-
},
|
|
42
|
-
valueType: {
|
|
43
|
-
type: 'string',
|
|
44
|
-
description: 'Value type: string, number, boolean, json',
|
|
45
|
-
examples: ['string', 'number', 'boolean', 'json'],
|
|
46
|
-
},
|
|
47
|
-
defaultValue: {
|
|
48
|
-
type: 'json',
|
|
49
|
-
optional: true,
|
|
50
|
-
description: 'Default value if not set',
|
|
51
|
-
},
|
|
52
|
-
// Targeting
|
|
53
|
-
conditions: {
|
|
54
|
-
type: 'json',
|
|
55
|
-
optional: true,
|
|
56
|
-
description: 'Targeting conditions for value variants',
|
|
57
|
-
},
|
|
58
|
-
percentRollout: {
|
|
59
|
-
type: 'number',
|
|
60
|
-
optional: true,
|
|
61
|
-
description: 'Percentage of users to receive this value',
|
|
62
|
-
},
|
|
63
|
-
userSegments: {
|
|
64
|
-
type: 'string',
|
|
65
|
-
array: true,
|
|
66
|
-
optional: true,
|
|
67
|
-
description: 'User segments this applies to',
|
|
68
|
-
},
|
|
69
|
-
// Status
|
|
70
|
-
enabled: {
|
|
71
|
-
type: 'boolean',
|
|
72
|
-
description: 'Whether config is enabled',
|
|
73
|
-
},
|
|
74
|
-
environment: {
|
|
75
|
-
type: 'string',
|
|
76
|
-
optional: true,
|
|
77
|
-
description: 'Environment: development, staging, production',
|
|
78
|
-
examples: ['development', 'staging', 'production'],
|
|
79
|
-
},
|
|
80
|
-
// Audit
|
|
81
|
-
lastUpdatedAt: {
|
|
82
|
-
type: 'datetime',
|
|
83
|
-
optional: true,
|
|
84
|
-
description: 'When config was last updated',
|
|
85
|
-
},
|
|
86
|
-
updatedBy: {
|
|
87
|
-
type: 'string',
|
|
88
|
-
optional: true,
|
|
89
|
-
description: 'Who last updated the config',
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
relationships: {
|
|
93
|
-
project: {
|
|
94
|
-
type: 'App',
|
|
95
|
-
description: 'Parent project/app',
|
|
96
|
-
},
|
|
97
|
-
history: {
|
|
98
|
-
type: 'ConfigVersion[]',
|
|
99
|
-
description: 'Version history',
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
actions: [
|
|
103
|
-
'create',
|
|
104
|
-
'update',
|
|
105
|
-
'delete',
|
|
106
|
-
'enable',
|
|
107
|
-
'disable',
|
|
108
|
-
'setConditions',
|
|
109
|
-
'rollout',
|
|
110
|
-
'rollback',
|
|
111
|
-
'publish',
|
|
112
|
-
],
|
|
113
|
-
events: [
|
|
114
|
-
'created',
|
|
115
|
-
'updated',
|
|
116
|
-
'deleted',
|
|
117
|
-
'enabled',
|
|
118
|
-
'disabled',
|
|
119
|
-
'conditionsChanged',
|
|
120
|
-
'rolledOut',
|
|
121
|
-
'rolledBack',
|
|
122
|
-
'published',
|
|
123
|
-
'fetched',
|
|
124
|
-
],
|
|
125
|
-
};
|
|
126
|
-
/**
|
|
127
|
-
* Config version entity
|
|
128
|
-
*/
|
|
129
|
-
export const ConfigVersion = {
|
|
130
|
-
singular: 'config version',
|
|
131
|
-
plural: 'config versions',
|
|
132
|
-
description: 'A historical version of a configuration',
|
|
133
|
-
properties: {
|
|
134
|
-
version: {
|
|
135
|
-
type: 'number',
|
|
136
|
-
description: 'Version number',
|
|
137
|
-
},
|
|
138
|
-
value: {
|
|
139
|
-
type: 'json',
|
|
140
|
-
description: 'Value at this version',
|
|
141
|
-
},
|
|
142
|
-
conditions: {
|
|
143
|
-
type: 'json',
|
|
144
|
-
optional: true,
|
|
145
|
-
description: 'Conditions at this version',
|
|
146
|
-
},
|
|
147
|
-
publishedAt: {
|
|
148
|
-
type: 'datetime',
|
|
149
|
-
description: 'When this version was published',
|
|
150
|
-
},
|
|
151
|
-
publishedBy: {
|
|
152
|
-
type: 'string',
|
|
153
|
-
optional: true,
|
|
154
|
-
description: 'Who published this version',
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
relationships: {
|
|
158
|
-
config: {
|
|
159
|
-
type: 'Config',
|
|
160
|
-
backref: 'history',
|
|
161
|
-
description: 'Parent config',
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
actions: ['view', 'restore', 'compare'],
|
|
165
|
-
events: ['created', 'restored'],
|
|
166
|
-
};
|
|
167
|
-
// =============================================================================
|
|
168
|
-
// Database (Realtime/Document Database)
|
|
169
|
-
// =============================================================================
|
|
170
|
-
/**
|
|
171
|
-
* Database entity
|
|
172
|
-
*
|
|
173
|
-
* Represents a cloud database instance
|
|
174
|
-
*/
|
|
175
|
-
export const Database = {
|
|
176
|
-
singular: 'database',
|
|
177
|
-
plural: 'databases',
|
|
178
|
-
description: 'A cloud database instance',
|
|
179
|
-
properties: {
|
|
180
|
-
// Identity
|
|
181
|
-
name: {
|
|
182
|
-
type: 'string',
|
|
183
|
-
description: 'Database name',
|
|
184
|
-
},
|
|
185
|
-
type: {
|
|
186
|
-
type: 'string',
|
|
187
|
-
description: 'Database type: realtime, firestore, postgres, mysql, mongodb',
|
|
188
|
-
examples: ['realtime', 'firestore', 'postgres', 'mysql', 'mongodb', 'redis'],
|
|
189
|
-
},
|
|
190
|
-
region: {
|
|
191
|
-
type: 'string',
|
|
192
|
-
optional: true,
|
|
193
|
-
description: 'Database region',
|
|
194
|
-
},
|
|
195
|
-
// Configuration
|
|
196
|
-
url: {
|
|
197
|
-
type: 'url',
|
|
198
|
-
optional: true,
|
|
199
|
-
description: 'Database connection URL',
|
|
200
|
-
},
|
|
201
|
-
ssl: {
|
|
202
|
-
type: 'boolean',
|
|
203
|
-
optional: true,
|
|
204
|
-
description: 'Whether SSL is enabled',
|
|
205
|
-
},
|
|
206
|
-
poolSize: {
|
|
207
|
-
type: 'number',
|
|
208
|
-
optional: true,
|
|
209
|
-
description: 'Connection pool size',
|
|
210
|
-
},
|
|
211
|
-
// Status
|
|
212
|
-
status: {
|
|
213
|
-
type: 'string',
|
|
214
|
-
description: 'Database status: available, creating, updating, deleting, failed',
|
|
215
|
-
examples: ['available', 'creating', 'updating', 'deleting', 'failed'],
|
|
216
|
-
},
|
|
217
|
-
// Metrics
|
|
218
|
-
storageUsed: {
|
|
219
|
-
type: 'number',
|
|
220
|
-
optional: true,
|
|
221
|
-
description: 'Storage used in bytes',
|
|
222
|
-
},
|
|
223
|
-
storageLimit: {
|
|
224
|
-
type: 'number',
|
|
225
|
-
optional: true,
|
|
226
|
-
description: 'Storage limit in bytes',
|
|
227
|
-
},
|
|
228
|
-
connections: {
|
|
229
|
-
type: 'number',
|
|
230
|
-
optional: true,
|
|
231
|
-
description: 'Active connections',
|
|
232
|
-
},
|
|
233
|
-
readsPerSecond: {
|
|
234
|
-
type: 'number',
|
|
235
|
-
optional: true,
|
|
236
|
-
description: 'Read operations per second',
|
|
237
|
-
},
|
|
238
|
-
writesPerSecond: {
|
|
239
|
-
type: 'number',
|
|
240
|
-
optional: true,
|
|
241
|
-
description: 'Write operations per second',
|
|
242
|
-
},
|
|
243
|
-
// Security
|
|
244
|
-
publicAccess: {
|
|
245
|
-
type: 'boolean',
|
|
246
|
-
optional: true,
|
|
247
|
-
description: 'Whether public access is enabled',
|
|
248
|
-
},
|
|
249
|
-
ipAllowlist: {
|
|
250
|
-
type: 'string',
|
|
251
|
-
array: true,
|
|
252
|
-
optional: true,
|
|
253
|
-
description: 'IP addresses allowed to connect',
|
|
254
|
-
},
|
|
255
|
-
},
|
|
256
|
-
relationships: {
|
|
257
|
-
project: {
|
|
258
|
-
type: 'App',
|
|
259
|
-
description: 'Parent project/app',
|
|
260
|
-
},
|
|
261
|
-
collections: {
|
|
262
|
-
type: 'Collection[]',
|
|
263
|
-
description: 'Database collections/tables',
|
|
264
|
-
},
|
|
265
|
-
backups: {
|
|
266
|
-
type: 'Backup[]',
|
|
267
|
-
description: 'Database backups',
|
|
268
|
-
},
|
|
269
|
-
},
|
|
270
|
-
actions: [
|
|
271
|
-
'create',
|
|
272
|
-
'update',
|
|
273
|
-
'delete',
|
|
274
|
-
'backup',
|
|
275
|
-
'restore',
|
|
276
|
-
'scale',
|
|
277
|
-
'enablePublicAccess',
|
|
278
|
-
'disablePublicAccess',
|
|
279
|
-
'setRules',
|
|
280
|
-
'importData',
|
|
281
|
-
'exportData',
|
|
282
|
-
],
|
|
283
|
-
events: [
|
|
284
|
-
'created',
|
|
285
|
-
'updated',
|
|
286
|
-
'deleted',
|
|
287
|
-
'backedUp',
|
|
288
|
-
'restored',
|
|
289
|
-
'scaled',
|
|
290
|
-
'accessChanged',
|
|
291
|
-
'rulesUpdated',
|
|
292
|
-
'imported',
|
|
293
|
-
'exported',
|
|
294
|
-
],
|
|
295
|
-
};
|
|
296
|
-
/**
|
|
297
|
-
* Collection entity
|
|
298
|
-
*/
|
|
299
|
-
export const Collection = {
|
|
300
|
-
singular: 'collection',
|
|
301
|
-
plural: 'collections',
|
|
302
|
-
description: 'A collection or table within a database',
|
|
303
|
-
properties: {
|
|
304
|
-
name: {
|
|
305
|
-
type: 'string',
|
|
306
|
-
description: 'Collection name',
|
|
307
|
-
},
|
|
308
|
-
documentCount: {
|
|
309
|
-
type: 'number',
|
|
310
|
-
optional: true,
|
|
311
|
-
description: 'Number of documents',
|
|
312
|
-
},
|
|
313
|
-
storageSize: {
|
|
314
|
-
type: 'number',
|
|
315
|
-
optional: true,
|
|
316
|
-
description: 'Storage size in bytes',
|
|
317
|
-
},
|
|
318
|
-
indexCount: {
|
|
319
|
-
type: 'number',
|
|
320
|
-
optional: true,
|
|
321
|
-
description: 'Number of indexes',
|
|
322
|
-
},
|
|
323
|
-
schema: {
|
|
324
|
-
type: 'json',
|
|
325
|
-
optional: true,
|
|
326
|
-
description: 'Collection schema definition',
|
|
327
|
-
},
|
|
328
|
-
},
|
|
329
|
-
relationships: {
|
|
330
|
-
database: {
|
|
331
|
-
type: 'Database',
|
|
332
|
-
backref: 'collections',
|
|
333
|
-
description: 'Parent database',
|
|
334
|
-
},
|
|
335
|
-
indexes: {
|
|
336
|
-
type: 'Index[]',
|
|
337
|
-
description: 'Collection indexes',
|
|
338
|
-
},
|
|
339
|
-
},
|
|
340
|
-
actions: [
|
|
341
|
-
'create',
|
|
342
|
-
'delete',
|
|
343
|
-
'rename',
|
|
344
|
-
'createIndex',
|
|
345
|
-
'dropIndex',
|
|
346
|
-
'query',
|
|
347
|
-
'aggregate',
|
|
348
|
-
'watch',
|
|
349
|
-
],
|
|
350
|
-
events: ['created', 'deleted', 'renamed', 'indexCreated', 'indexDropped', 'modified'],
|
|
351
|
-
};
|
|
352
|
-
/**
|
|
353
|
-
* Index entity
|
|
354
|
-
*/
|
|
355
|
-
export const Index = {
|
|
356
|
-
singular: 'index',
|
|
357
|
-
plural: 'indexes',
|
|
358
|
-
description: 'A database index for query optimization',
|
|
359
|
-
properties: {
|
|
360
|
-
name: {
|
|
361
|
-
type: 'string',
|
|
362
|
-
description: 'Index name',
|
|
363
|
-
},
|
|
364
|
-
fields: {
|
|
365
|
-
type: 'json',
|
|
366
|
-
description: 'Indexed fields and their sort order',
|
|
367
|
-
},
|
|
368
|
-
unique: {
|
|
369
|
-
type: 'boolean',
|
|
370
|
-
optional: true,
|
|
371
|
-
description: 'Whether index enforces uniqueness',
|
|
372
|
-
},
|
|
373
|
-
sparse: {
|
|
374
|
-
type: 'boolean',
|
|
375
|
-
optional: true,
|
|
376
|
-
description: 'Whether index is sparse',
|
|
377
|
-
},
|
|
378
|
-
status: {
|
|
379
|
-
type: 'string',
|
|
380
|
-
description: 'Index status: building, ready, failed',
|
|
381
|
-
examples: ['building', 'ready', 'failed'],
|
|
382
|
-
},
|
|
383
|
-
},
|
|
384
|
-
relationships: {
|
|
385
|
-
collection: {
|
|
386
|
-
type: 'Collection',
|
|
387
|
-
backref: 'indexes',
|
|
388
|
-
description: 'Parent collection',
|
|
389
|
-
},
|
|
390
|
-
},
|
|
391
|
-
actions: ['create', 'delete', 'rebuild'],
|
|
392
|
-
events: ['created', 'deleted', 'built', 'failed'],
|
|
393
|
-
};
|
|
394
|
-
// =============================================================================
|
|
395
|
-
// Hosting
|
|
396
|
-
// =============================================================================
|
|
397
|
-
/**
|
|
398
|
-
* Hosting entity
|
|
399
|
-
*
|
|
400
|
-
* Represents a web hosting deployment
|
|
401
|
-
*/
|
|
402
|
-
export const Hosting = {
|
|
403
|
-
singular: 'hosting',
|
|
404
|
-
plural: 'hostings',
|
|
405
|
-
description: 'A web hosting deployment',
|
|
406
|
-
properties: {
|
|
407
|
-
// Identity
|
|
408
|
-
name: {
|
|
409
|
-
type: 'string',
|
|
410
|
-
description: 'Site name',
|
|
411
|
-
},
|
|
412
|
-
domain: {
|
|
413
|
-
type: 'string',
|
|
414
|
-
optional: true,
|
|
415
|
-
description: 'Custom domain',
|
|
416
|
-
},
|
|
417
|
-
defaultDomain: {
|
|
418
|
-
type: 'string',
|
|
419
|
-
optional: true,
|
|
420
|
-
description: 'Default provider domain',
|
|
421
|
-
},
|
|
422
|
-
// Deployment
|
|
423
|
-
currentVersion: {
|
|
424
|
-
type: 'string',
|
|
425
|
-
optional: true,
|
|
426
|
-
description: 'Currently deployed version',
|
|
427
|
-
},
|
|
428
|
-
deployedAt: {
|
|
429
|
-
type: 'datetime',
|
|
430
|
-
optional: true,
|
|
431
|
-
description: 'Last deployment time',
|
|
432
|
-
},
|
|
433
|
-
deployedBy: {
|
|
434
|
-
type: 'string',
|
|
435
|
-
optional: true,
|
|
436
|
-
description: 'Who deployed',
|
|
437
|
-
},
|
|
438
|
-
// Configuration
|
|
439
|
-
framework: {
|
|
440
|
-
type: 'string',
|
|
441
|
-
optional: true,
|
|
442
|
-
description: 'Frontend framework detected',
|
|
443
|
-
},
|
|
444
|
-
buildCommand: {
|
|
445
|
-
type: 'string',
|
|
446
|
-
optional: true,
|
|
447
|
-
description: 'Build command',
|
|
448
|
-
},
|
|
449
|
-
outputDirectory: {
|
|
450
|
-
type: 'string',
|
|
451
|
-
optional: true,
|
|
452
|
-
description: 'Build output directory',
|
|
453
|
-
},
|
|
454
|
-
nodeVersion: {
|
|
455
|
-
type: 'string',
|
|
456
|
-
optional: true,
|
|
457
|
-
description: 'Node.js version',
|
|
458
|
-
},
|
|
459
|
-
// Features
|
|
460
|
-
httpsOnly: {
|
|
461
|
-
type: 'boolean',
|
|
462
|
-
optional: true,
|
|
463
|
-
description: 'Whether HTTPS is enforced',
|
|
464
|
-
},
|
|
465
|
-
previewsEnabled: {
|
|
466
|
-
type: 'boolean',
|
|
467
|
-
optional: true,
|
|
468
|
-
description: 'Whether deploy previews are enabled',
|
|
469
|
-
},
|
|
470
|
-
caching: {
|
|
471
|
-
type: 'json',
|
|
472
|
-
optional: true,
|
|
473
|
-
description: 'Caching configuration',
|
|
474
|
-
},
|
|
475
|
-
headers: {
|
|
476
|
-
type: 'json',
|
|
477
|
-
optional: true,
|
|
478
|
-
description: 'Custom headers configuration',
|
|
479
|
-
},
|
|
480
|
-
redirects: {
|
|
481
|
-
type: 'json',
|
|
482
|
-
optional: true,
|
|
483
|
-
description: 'Redirect rules',
|
|
484
|
-
},
|
|
485
|
-
rewrites: {
|
|
486
|
-
type: 'json',
|
|
487
|
-
optional: true,
|
|
488
|
-
description: 'Rewrite rules',
|
|
489
|
-
},
|
|
490
|
-
// Status
|
|
491
|
-
status: {
|
|
492
|
-
type: 'string',
|
|
493
|
-
description: 'Hosting status: active, building, error',
|
|
494
|
-
examples: ['active', 'building', 'error'],
|
|
495
|
-
},
|
|
496
|
-
},
|
|
497
|
-
relationships: {
|
|
498
|
-
project: {
|
|
499
|
-
type: 'App',
|
|
500
|
-
description: 'Parent project',
|
|
501
|
-
},
|
|
502
|
-
repository: {
|
|
503
|
-
type: 'Repository',
|
|
504
|
-
required: false,
|
|
505
|
-
description: 'Source repository',
|
|
506
|
-
},
|
|
507
|
-
deployments: {
|
|
508
|
-
type: 'Deployment[]',
|
|
509
|
-
description: 'Deployment history',
|
|
510
|
-
},
|
|
511
|
-
},
|
|
512
|
-
actions: [
|
|
513
|
-
'create',
|
|
514
|
-
'configure',
|
|
515
|
-
'deploy',
|
|
516
|
-
'rollback',
|
|
517
|
-
'delete',
|
|
518
|
-
'addDomain',
|
|
519
|
-
'removeDomain',
|
|
520
|
-
'verifySsl',
|
|
521
|
-
'purgeCache',
|
|
522
|
-
],
|
|
523
|
-
events: [
|
|
524
|
-
'created',
|
|
525
|
-
'configured',
|
|
526
|
-
'deployed',
|
|
527
|
-
'rolledBack',
|
|
528
|
-
'deleted',
|
|
529
|
-
'domainAdded',
|
|
530
|
-
'domainRemoved',
|
|
531
|
-
'sslVerified',
|
|
532
|
-
'cachePurged',
|
|
533
|
-
],
|
|
534
|
-
};
|
|
535
|
-
/**
|
|
536
|
-
* Deployment entity
|
|
537
|
-
*/
|
|
538
|
-
export const Deployment = {
|
|
539
|
-
singular: 'deployment',
|
|
540
|
-
plural: 'deployments',
|
|
541
|
-
description: 'A hosting deployment instance',
|
|
542
|
-
properties: {
|
|
543
|
-
version: {
|
|
544
|
-
type: 'string',
|
|
545
|
-
description: 'Deployment version/ID',
|
|
546
|
-
},
|
|
547
|
-
url: {
|
|
548
|
-
type: 'url',
|
|
549
|
-
optional: true,
|
|
550
|
-
description: 'Deployment URL',
|
|
551
|
-
},
|
|
552
|
-
status: {
|
|
553
|
-
type: 'string',
|
|
554
|
-
description: 'Deployment status: queued, building, ready, error, cancelled',
|
|
555
|
-
examples: ['queued', 'building', 'ready', 'error', 'cancelled'],
|
|
556
|
-
},
|
|
557
|
-
source: {
|
|
558
|
-
type: 'string',
|
|
559
|
-
optional: true,
|
|
560
|
-
description: 'Deployment source: cli, git, api',
|
|
561
|
-
examples: ['cli', 'git', 'api'],
|
|
562
|
-
},
|
|
563
|
-
branch: {
|
|
564
|
-
type: 'string',
|
|
565
|
-
optional: true,
|
|
566
|
-
description: 'Git branch deployed',
|
|
567
|
-
},
|
|
568
|
-
commit: {
|
|
569
|
-
type: 'string',
|
|
570
|
-
optional: true,
|
|
571
|
-
description: 'Git commit SHA',
|
|
572
|
-
},
|
|
573
|
-
buildDuration: {
|
|
574
|
-
type: 'number',
|
|
575
|
-
optional: true,
|
|
576
|
-
description: 'Build duration in seconds',
|
|
577
|
-
},
|
|
578
|
-
size: {
|
|
579
|
-
type: 'number',
|
|
580
|
-
optional: true,
|
|
581
|
-
description: 'Deployment size in bytes',
|
|
582
|
-
},
|
|
583
|
-
isProduction: {
|
|
584
|
-
type: 'boolean',
|
|
585
|
-
optional: true,
|
|
586
|
-
description: 'Whether this is a production deployment',
|
|
587
|
-
},
|
|
588
|
-
isPreview: {
|
|
589
|
-
type: 'boolean',
|
|
590
|
-
optional: true,
|
|
591
|
-
description: 'Whether this is a preview deployment',
|
|
592
|
-
},
|
|
593
|
-
},
|
|
594
|
-
relationships: {
|
|
595
|
-
hosting: {
|
|
596
|
-
type: 'Hosting',
|
|
597
|
-
backref: 'deployments',
|
|
598
|
-
description: 'Parent hosting',
|
|
599
|
-
},
|
|
600
|
-
triggeredBy: {
|
|
601
|
-
type: 'Contact',
|
|
602
|
-
required: false,
|
|
603
|
-
description: 'Who triggered the deployment',
|
|
604
|
-
},
|
|
605
|
-
},
|
|
606
|
-
actions: ['create', 'cancel', 'promote', 'delete', 'viewLogs'],
|
|
607
|
-
events: ['created', 'started', 'completed', 'failed', 'cancelled', 'promoted'],
|
|
608
|
-
};
|
|
609
|
-
// =============================================================================
|
|
610
|
-
// Function (Serverless Functions)
|
|
611
|
-
// =============================================================================
|
|
612
|
-
/**
|
|
613
|
-
* Function entity
|
|
614
|
-
*
|
|
615
|
-
* Represents a serverless function
|
|
616
|
-
*/
|
|
617
|
-
export const Function = {
|
|
618
|
-
singular: 'function',
|
|
619
|
-
plural: 'functions',
|
|
620
|
-
description: 'A serverless function',
|
|
621
|
-
properties: {
|
|
622
|
-
// Identity
|
|
623
|
-
name: {
|
|
624
|
-
type: 'string',
|
|
625
|
-
description: 'Function name',
|
|
626
|
-
},
|
|
627
|
-
entryPoint: {
|
|
628
|
-
type: 'string',
|
|
629
|
-
optional: true,
|
|
630
|
-
description: 'Entry point file/handler',
|
|
631
|
-
},
|
|
632
|
-
description: {
|
|
633
|
-
type: 'string',
|
|
634
|
-
optional: true,
|
|
635
|
-
description: 'Function description',
|
|
636
|
-
},
|
|
637
|
-
// Runtime
|
|
638
|
-
runtime: {
|
|
639
|
-
type: 'string',
|
|
640
|
-
description: 'Runtime environment: nodejs18, nodejs20, python311, etc.',
|
|
641
|
-
examples: ['nodejs18', 'nodejs20', 'python311', 'go121', 'ruby32'],
|
|
642
|
-
},
|
|
643
|
-
timeout: {
|
|
644
|
-
type: 'number',
|
|
645
|
-
optional: true,
|
|
646
|
-
description: 'Execution timeout in seconds',
|
|
647
|
-
},
|
|
648
|
-
memory: {
|
|
649
|
-
type: 'number',
|
|
650
|
-
optional: true,
|
|
651
|
-
description: 'Memory allocation in MB',
|
|
652
|
-
},
|
|
653
|
-
// Configuration
|
|
654
|
-
environmentVariables: {
|
|
655
|
-
type: 'json',
|
|
656
|
-
optional: true,
|
|
657
|
-
description: 'Environment variables',
|
|
658
|
-
},
|
|
659
|
-
secrets: {
|
|
660
|
-
type: 'string',
|
|
661
|
-
array: true,
|
|
662
|
-
optional: true,
|
|
663
|
-
description: 'Secret references',
|
|
664
|
-
},
|
|
665
|
-
// Trigger
|
|
666
|
-
trigger: {
|
|
667
|
-
type: 'string',
|
|
668
|
-
description: 'Trigger type: http, schedule, pubsub, storage, firestore',
|
|
669
|
-
examples: ['http', 'schedule', 'pubsub', 'storage', 'firestore', 'auth'],
|
|
670
|
-
},
|
|
671
|
-
httpPath: {
|
|
672
|
-
type: 'string',
|
|
673
|
-
optional: true,
|
|
674
|
-
description: 'HTTP endpoint path',
|
|
675
|
-
},
|
|
676
|
-
schedule: {
|
|
677
|
-
type: 'string',
|
|
678
|
-
optional: true,
|
|
679
|
-
description: 'Cron schedule expression',
|
|
680
|
-
},
|
|
681
|
-
// Status
|
|
682
|
-
status: {
|
|
683
|
-
type: 'string',
|
|
684
|
-
description: 'Function status: active, deploying, failed, deleted',
|
|
685
|
-
examples: ['active', 'deploying', 'failed', 'deleted'],
|
|
686
|
-
},
|
|
687
|
-
deployedAt: {
|
|
688
|
-
type: 'datetime',
|
|
689
|
-
optional: true,
|
|
690
|
-
description: 'Last deployment time',
|
|
691
|
-
},
|
|
692
|
-
version: {
|
|
693
|
-
type: 'string',
|
|
694
|
-
optional: true,
|
|
695
|
-
description: 'Deployed version',
|
|
696
|
-
},
|
|
697
|
-
// Metrics
|
|
698
|
-
invocations: {
|
|
699
|
-
type: 'number',
|
|
700
|
-
optional: true,
|
|
701
|
-
description: 'Total invocations',
|
|
702
|
-
},
|
|
703
|
-
errors: {
|
|
704
|
-
type: 'number',
|
|
705
|
-
optional: true,
|
|
706
|
-
description: 'Total errors',
|
|
707
|
-
},
|
|
708
|
-
avgDuration: {
|
|
709
|
-
type: 'number',
|
|
710
|
-
optional: true,
|
|
711
|
-
description: 'Average execution duration in ms',
|
|
712
|
-
},
|
|
713
|
-
},
|
|
714
|
-
relationships: {
|
|
715
|
-
project: {
|
|
716
|
-
type: 'App',
|
|
717
|
-
description: 'Parent project',
|
|
718
|
-
},
|
|
719
|
-
logs: {
|
|
720
|
-
type: 'FunctionLog[]',
|
|
721
|
-
description: 'Execution logs',
|
|
722
|
-
},
|
|
723
|
-
},
|
|
724
|
-
actions: [
|
|
725
|
-
'create',
|
|
726
|
-
'update',
|
|
727
|
-
'deploy',
|
|
728
|
-
'delete',
|
|
729
|
-
'invoke',
|
|
730
|
-
'viewLogs',
|
|
731
|
-
'setEnvironment',
|
|
732
|
-
'addSecret',
|
|
733
|
-
'removeSecret',
|
|
734
|
-
],
|
|
735
|
-
events: [
|
|
736
|
-
'created',
|
|
737
|
-
'updated',
|
|
738
|
-
'deployed',
|
|
739
|
-
'deleted',
|
|
740
|
-
'invoked',
|
|
741
|
-
'succeeded',
|
|
742
|
-
'failed',
|
|
743
|
-
'timedOut',
|
|
744
|
-
],
|
|
745
|
-
};
|
|
746
|
-
/**
|
|
747
|
-
* Function log entity
|
|
748
|
-
*/
|
|
749
|
-
export const FunctionLog = {
|
|
750
|
-
singular: 'function log',
|
|
751
|
-
plural: 'function logs',
|
|
752
|
-
description: 'A serverless function execution log',
|
|
753
|
-
properties: {
|
|
754
|
-
level: {
|
|
755
|
-
type: 'string',
|
|
756
|
-
description: 'Log level: debug, info, warn, error',
|
|
757
|
-
examples: ['debug', 'info', 'warn', 'error'],
|
|
758
|
-
},
|
|
759
|
-
message: {
|
|
760
|
-
type: 'string',
|
|
761
|
-
description: 'Log message',
|
|
762
|
-
},
|
|
763
|
-
executionId: {
|
|
764
|
-
type: 'string',
|
|
765
|
-
optional: true,
|
|
766
|
-
description: 'Execution/request ID',
|
|
767
|
-
},
|
|
768
|
-
duration: {
|
|
769
|
-
type: 'number',
|
|
770
|
-
optional: true,
|
|
771
|
-
description: 'Execution duration in ms',
|
|
772
|
-
},
|
|
773
|
-
memoryUsed: {
|
|
774
|
-
type: 'number',
|
|
775
|
-
optional: true,
|
|
776
|
-
description: 'Memory used in MB',
|
|
777
|
-
},
|
|
778
|
-
timestamp: {
|
|
779
|
-
type: 'datetime',
|
|
780
|
-
description: 'Log timestamp',
|
|
781
|
-
},
|
|
782
|
-
labels: {
|
|
783
|
-
type: 'json',
|
|
784
|
-
optional: true,
|
|
785
|
-
description: 'Log labels/metadata',
|
|
786
|
-
},
|
|
787
|
-
},
|
|
788
|
-
relationships: {
|
|
789
|
-
function: {
|
|
790
|
-
type: 'Function',
|
|
791
|
-
backref: 'logs',
|
|
792
|
-
description: 'Parent function',
|
|
793
|
-
},
|
|
794
|
-
},
|
|
795
|
-
actions: ['view', 'search', 'export', 'delete'],
|
|
796
|
-
events: ['created'],
|
|
797
|
-
};
|
|
798
|
-
// =============================================================================
|
|
799
|
-
// Auth (Authentication)
|
|
800
|
-
// =============================================================================
|
|
801
|
-
/**
|
|
802
|
-
* Identity entity
|
|
803
|
-
*
|
|
804
|
-
* Represents a user identity in an auth system
|
|
805
|
-
*/
|
|
806
|
-
export const Identity = {
|
|
807
|
-
singular: 'identity',
|
|
808
|
-
plural: 'identities',
|
|
809
|
-
description: 'A user identity in an authentication system',
|
|
810
|
-
properties: {
|
|
811
|
-
// Identity
|
|
812
|
-
uid: {
|
|
813
|
-
type: 'string',
|
|
814
|
-
description: 'Unique user ID',
|
|
815
|
-
},
|
|
816
|
-
email: {
|
|
817
|
-
type: 'string',
|
|
818
|
-
optional: true,
|
|
819
|
-
description: 'Email address',
|
|
820
|
-
},
|
|
821
|
-
emailVerified: {
|
|
822
|
-
type: 'boolean',
|
|
823
|
-
optional: true,
|
|
824
|
-
description: 'Whether email is verified',
|
|
825
|
-
},
|
|
826
|
-
phone: {
|
|
827
|
-
type: 'string',
|
|
828
|
-
optional: true,
|
|
829
|
-
description: 'Phone number',
|
|
830
|
-
},
|
|
831
|
-
phoneVerified: {
|
|
832
|
-
type: 'boolean',
|
|
833
|
-
optional: true,
|
|
834
|
-
description: 'Whether phone is verified',
|
|
835
|
-
},
|
|
836
|
-
// Profile
|
|
837
|
-
displayName: {
|
|
838
|
-
type: 'string',
|
|
839
|
-
optional: true,
|
|
840
|
-
description: 'Display name',
|
|
841
|
-
},
|
|
842
|
-
photoUrl: {
|
|
843
|
-
type: 'url',
|
|
844
|
-
optional: true,
|
|
845
|
-
description: 'Profile photo URL',
|
|
846
|
-
},
|
|
847
|
-
// Providers
|
|
848
|
-
providers: {
|
|
849
|
-
type: 'string',
|
|
850
|
-
array: true,
|
|
851
|
-
optional: true,
|
|
852
|
-
description: 'Linked auth providers',
|
|
853
|
-
},
|
|
854
|
-
providerData: {
|
|
855
|
-
type: 'json',
|
|
856
|
-
optional: true,
|
|
857
|
-
description: 'Provider-specific data',
|
|
858
|
-
},
|
|
859
|
-
// Status
|
|
860
|
-
disabled: {
|
|
861
|
-
type: 'boolean',
|
|
862
|
-
optional: true,
|
|
863
|
-
description: 'Whether account is disabled',
|
|
864
|
-
},
|
|
865
|
-
lastSignInAt: {
|
|
866
|
-
type: 'datetime',
|
|
867
|
-
optional: true,
|
|
868
|
-
description: 'Last sign-in time',
|
|
869
|
-
},
|
|
870
|
-
createdAt: {
|
|
871
|
-
type: 'datetime',
|
|
872
|
-
optional: true,
|
|
873
|
-
description: 'Account creation time',
|
|
874
|
-
},
|
|
875
|
-
// Security
|
|
876
|
-
mfaEnabled: {
|
|
877
|
-
type: 'boolean',
|
|
878
|
-
optional: true,
|
|
879
|
-
description: 'Whether MFA is enabled',
|
|
880
|
-
},
|
|
881
|
-
mfaMethods: {
|
|
882
|
-
type: 'string',
|
|
883
|
-
array: true,
|
|
884
|
-
optional: true,
|
|
885
|
-
description: 'Enabled MFA methods',
|
|
886
|
-
},
|
|
887
|
-
// Claims
|
|
888
|
-
customClaims: {
|
|
889
|
-
type: 'json',
|
|
890
|
-
optional: true,
|
|
891
|
-
description: 'Custom claims/roles',
|
|
892
|
-
},
|
|
893
|
-
},
|
|
894
|
-
relationships: {
|
|
895
|
-
sessions: {
|
|
896
|
-
type: 'Session[]',
|
|
897
|
-
description: 'Active sessions',
|
|
898
|
-
},
|
|
899
|
-
},
|
|
900
|
-
actions: [
|
|
901
|
-
'create',
|
|
902
|
-
'update',
|
|
903
|
-
'delete',
|
|
904
|
-
'disable',
|
|
905
|
-
'enable',
|
|
906
|
-
'linkProvider',
|
|
907
|
-
'unlinkProvider',
|
|
908
|
-
'setCustomClaims',
|
|
909
|
-
'revokeTokens',
|
|
910
|
-
'sendVerification',
|
|
911
|
-
'resetPassword',
|
|
912
|
-
'enrollMfa',
|
|
913
|
-
'unenrollMfa',
|
|
914
|
-
],
|
|
915
|
-
events: [
|
|
916
|
-
'created',
|
|
917
|
-
'updated',
|
|
918
|
-
'deleted',
|
|
919
|
-
'disabled',
|
|
920
|
-
'enabled',
|
|
921
|
-
'signedIn',
|
|
922
|
-
'signedOut',
|
|
923
|
-
'providerLinked',
|
|
924
|
-
'providerUnlinked',
|
|
925
|
-
'claimsUpdated',
|
|
926
|
-
'tokensRevoked',
|
|
927
|
-
'passwordReset',
|
|
928
|
-
'mfaEnrolled',
|
|
929
|
-
],
|
|
930
|
-
};
|
|
931
|
-
// =============================================================================
|
|
932
|
-
// Storage (Cloud Storage)
|
|
933
|
-
// =============================================================================
|
|
934
|
-
/**
|
|
935
|
-
* Bucket entity
|
|
936
|
-
*
|
|
937
|
-
* Represents a cloud storage bucket
|
|
938
|
-
*/
|
|
939
|
-
export const Bucket = {
|
|
940
|
-
singular: 'bucket',
|
|
941
|
-
plural: 'buckets',
|
|
942
|
-
description: 'A cloud storage bucket',
|
|
943
|
-
properties: {
|
|
944
|
-
// Identity
|
|
945
|
-
name: {
|
|
946
|
-
type: 'string',
|
|
947
|
-
description: 'Bucket name',
|
|
948
|
-
},
|
|
949
|
-
region: {
|
|
950
|
-
type: 'string',
|
|
951
|
-
optional: true,
|
|
952
|
-
description: 'Storage region',
|
|
953
|
-
},
|
|
954
|
-
// Configuration
|
|
955
|
-
storageClass: {
|
|
956
|
-
type: 'string',
|
|
957
|
-
optional: true,
|
|
958
|
-
description: 'Storage class: standard, nearline, coldline, archive',
|
|
959
|
-
examples: ['standard', 'nearline', 'coldline', 'archive'],
|
|
960
|
-
},
|
|
961
|
-
versioning: {
|
|
962
|
-
type: 'boolean',
|
|
963
|
-
optional: true,
|
|
964
|
-
description: 'Whether versioning is enabled',
|
|
965
|
-
},
|
|
966
|
-
lifecycle: {
|
|
967
|
-
type: 'json',
|
|
968
|
-
optional: true,
|
|
969
|
-
description: 'Lifecycle rules',
|
|
970
|
-
},
|
|
971
|
-
cors: {
|
|
972
|
-
type: 'json',
|
|
973
|
-
optional: true,
|
|
974
|
-
description: 'CORS configuration',
|
|
975
|
-
},
|
|
976
|
-
// Access
|
|
977
|
-
publicAccess: {
|
|
978
|
-
type: 'string',
|
|
979
|
-
optional: true,
|
|
980
|
-
description: 'Public access setting: enforced, inherited',
|
|
981
|
-
examples: ['enforced', 'inherited'],
|
|
982
|
-
},
|
|
983
|
-
defaultAcl: {
|
|
984
|
-
type: 'string',
|
|
985
|
-
optional: true,
|
|
986
|
-
description: 'Default ACL for new objects',
|
|
987
|
-
},
|
|
988
|
-
// Metrics
|
|
989
|
-
objectCount: {
|
|
990
|
-
type: 'number',
|
|
991
|
-
optional: true,
|
|
992
|
-
description: 'Number of objects',
|
|
993
|
-
},
|
|
994
|
-
storageUsed: {
|
|
995
|
-
type: 'number',
|
|
996
|
-
optional: true,
|
|
997
|
-
description: 'Storage used in bytes',
|
|
998
|
-
},
|
|
999
|
-
},
|
|
1000
|
-
relationships: {
|
|
1001
|
-
project: {
|
|
1002
|
-
type: 'App',
|
|
1003
|
-
description: 'Parent project',
|
|
1004
|
-
},
|
|
1005
|
-
objects: {
|
|
1006
|
-
type: 'StorageObject[]',
|
|
1007
|
-
description: 'Objects in bucket',
|
|
1008
|
-
},
|
|
1009
|
-
},
|
|
1010
|
-
actions: [
|
|
1011
|
-
'create',
|
|
1012
|
-
'delete',
|
|
1013
|
-
'setVersioning',
|
|
1014
|
-
'setLifecycle',
|
|
1015
|
-
'setCors',
|
|
1016
|
-
'setPublicAccess',
|
|
1017
|
-
'setAcl',
|
|
1018
|
-
'empty',
|
|
1019
|
-
],
|
|
1020
|
-
events: [
|
|
1021
|
-
'created',
|
|
1022
|
-
'deleted',
|
|
1023
|
-
'versioningChanged',
|
|
1024
|
-
'lifecycleChanged',
|
|
1025
|
-
'corsChanged',
|
|
1026
|
-
'accessChanged',
|
|
1027
|
-
],
|
|
1028
|
-
};
|
|
1029
|
-
/**
|
|
1030
|
-
* Storage object entity
|
|
1031
|
-
*/
|
|
1032
|
-
export const StorageObject = {
|
|
1033
|
-
singular: 'storage object',
|
|
1034
|
-
plural: 'storage objects',
|
|
1035
|
-
description: 'An object stored in cloud storage',
|
|
1036
|
-
properties: {
|
|
1037
|
-
name: {
|
|
1038
|
-
type: 'string',
|
|
1039
|
-
description: 'Object name/path',
|
|
1040
|
-
},
|
|
1041
|
-
contentType: {
|
|
1042
|
-
type: 'string',
|
|
1043
|
-
optional: true,
|
|
1044
|
-
description: 'Content MIME type',
|
|
1045
|
-
},
|
|
1046
|
-
size: {
|
|
1047
|
-
type: 'number',
|
|
1048
|
-
description: 'Object size in bytes',
|
|
1049
|
-
},
|
|
1050
|
-
md5Hash: {
|
|
1051
|
-
type: 'string',
|
|
1052
|
-
optional: true,
|
|
1053
|
-
description: 'MD5 hash',
|
|
1054
|
-
},
|
|
1055
|
-
crc32c: {
|
|
1056
|
-
type: 'string',
|
|
1057
|
-
optional: true,
|
|
1058
|
-
description: 'CRC32C checksum',
|
|
1059
|
-
},
|
|
1060
|
-
generation: {
|
|
1061
|
-
type: 'string',
|
|
1062
|
-
optional: true,
|
|
1063
|
-
description: 'Object generation (for versioning)',
|
|
1064
|
-
},
|
|
1065
|
-
metadata: {
|
|
1066
|
-
type: 'json',
|
|
1067
|
-
optional: true,
|
|
1068
|
-
description: 'Custom metadata',
|
|
1069
|
-
},
|
|
1070
|
-
cacheControl: {
|
|
1071
|
-
type: 'string',
|
|
1072
|
-
optional: true,
|
|
1073
|
-
description: 'Cache-Control header',
|
|
1074
|
-
},
|
|
1075
|
-
contentDisposition: {
|
|
1076
|
-
type: 'string',
|
|
1077
|
-
optional: true,
|
|
1078
|
-
description: 'Content-Disposition header',
|
|
1079
|
-
},
|
|
1080
|
-
downloadUrl: {
|
|
1081
|
-
type: 'url',
|
|
1082
|
-
optional: true,
|
|
1083
|
-
description: 'Public download URL',
|
|
1084
|
-
},
|
|
1085
|
-
},
|
|
1086
|
-
relationships: {
|
|
1087
|
-
bucket: {
|
|
1088
|
-
type: 'Bucket',
|
|
1089
|
-
backref: 'objects',
|
|
1090
|
-
description: 'Parent bucket',
|
|
1091
|
-
},
|
|
1092
|
-
},
|
|
1093
|
-
actions: [
|
|
1094
|
-
'upload',
|
|
1095
|
-
'download',
|
|
1096
|
-
'delete',
|
|
1097
|
-
'copy',
|
|
1098
|
-
'move',
|
|
1099
|
-
'setMetadata',
|
|
1100
|
-
'setAcl',
|
|
1101
|
-
'makePublic',
|
|
1102
|
-
'makePrivate',
|
|
1103
|
-
'getSignedUrl',
|
|
1104
|
-
],
|
|
1105
|
-
events: [
|
|
1106
|
-
'uploaded',
|
|
1107
|
-
'downloaded',
|
|
1108
|
-
'deleted',
|
|
1109
|
-
'copied',
|
|
1110
|
-
'moved',
|
|
1111
|
-
'metadataUpdated',
|
|
1112
|
-
'aclChanged',
|
|
1113
|
-
'madePublic',
|
|
1114
|
-
'madePrivate',
|
|
1115
|
-
],
|
|
1116
|
-
};
|
|
1117
|
-
// =============================================================================
|
|
1118
|
-
// Export all entities as a schema
|
|
1119
|
-
// =============================================================================
|
|
1120
|
-
/**
|
|
1121
|
-
* All infrastructure platform entity types
|
|
1122
|
-
*/
|
|
1123
|
-
export const InfrastructureEntities = {
|
|
1124
|
-
// Configuration
|
|
1125
|
-
Config,
|
|
1126
|
-
ConfigVersion,
|
|
1127
|
-
// Database
|
|
1128
|
-
Database,
|
|
1129
|
-
Collection,
|
|
1130
|
-
Index,
|
|
1131
|
-
// Hosting
|
|
1132
|
-
Hosting,
|
|
1133
|
-
Deployment,
|
|
1134
|
-
// Functions
|
|
1135
|
-
Function,
|
|
1136
|
-
FunctionLog,
|
|
1137
|
-
// Auth
|
|
1138
|
-
Identity,
|
|
1139
|
-
// Storage
|
|
1140
|
-
Bucket,
|
|
1141
|
-
StorageObject,
|
|
1142
|
-
};
|
|
1143
|
-
/**
|
|
1144
|
-
* Entity categories for organization
|
|
1145
|
-
*/
|
|
1146
|
-
export const InfrastructureCategories = {
|
|
1147
|
-
config: ['Config', 'ConfigVersion'],
|
|
1148
|
-
database: ['Database', 'Collection', 'Index'],
|
|
1149
|
-
hosting: ['Hosting', 'Deployment'],
|
|
1150
|
-
functions: ['Function', 'FunctionLog'],
|
|
1151
|
-
auth: ['Identity'],
|
|
1152
|
-
storage: ['Bucket', 'StorageObject'],
|
|
1153
|
-
};
|