@wordrhyme/db 0.1.0-alpha.14
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/README.md +66 -0
- package/dist/acl-policy.d.ts +86 -0
- package/dist/acl-policy.d.ts.map +1 -0
- package/dist/chunk-3TTVLSF5.js +3390 -0
- package/dist/chunk-3TTVLSF5.js.map +1 -0
- package/dist/chunk-DCJM6GN5.js +264 -0
- package/dist/chunk-DCJM6GN5.js.map +1 -0
- package/dist/chunk-KWWJRUIK.js +54 -0
- package/dist/chunk-KWWJRUIK.js.map +1 -0
- package/dist/chunk-XAIEVBMU.js +212 -0
- package/dist/chunk-XAIEVBMU.js.map +1 -0
- package/dist/delete-policy.d.ts +11 -0
- package/dist/delete-policy.d.ts.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +545 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +110 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +21 -0
- package/dist/plugin.js.map +1 -0
- package/dist/relations/index.d.ts +105 -0
- package/dist/relations/index.d.ts.map +1 -0
- package/dist/relations/index.js +9 -0
- package/dist/relations/index.js.map +1 -0
- package/dist/schema/action-journal.d.ts +386 -0
- package/dist/schema/action-journal.d.ts.map +1 -0
- package/dist/schema/audit-archive.d.ts +934 -0
- package/dist/schema/audit-archive.d.ts.map +1 -0
- package/dist/schema/audit-events.d.ts +502 -0
- package/dist/schema/audit-events.d.ts.map +1 -0
- package/dist/schema/audit-logs.d.ts +418 -0
- package/dist/schema/audit-logs.d.ts.map +1 -0
- package/dist/schema/auth.d.ts +2727 -0
- package/dist/schema/auth.d.ts.map +1 -0
- package/dist/schema/billing.d.ts +3969 -0
- package/dist/schema/billing.d.ts.map +1 -0
- package/dist/schema/common.d.ts +87 -0
- package/dist/schema/common.d.ts.map +1 -0
- package/dist/schema/currency.d.ts +791 -0
- package/dist/schema/currency.d.ts.map +1 -0
- package/dist/schema/entity-extensions.d.ts +314 -0
- package/dist/schema/entity-extensions.d.ts.map +1 -0
- package/dist/schema/entity-ownerships.d.ts +862 -0
- package/dist/schema/entity-ownerships.d.ts.map +1 -0
- package/dist/schema/feature-flags.d.ts +770 -0
- package/dist/schema/feature-flags.d.ts.map +1 -0
- package/dist/schema/geo.d.ts +824 -0
- package/dist/schema/geo.d.ts.map +1 -0
- package/dist/schema/i18n.d.ts +1109 -0
- package/dist/schema/i18n.d.ts.map +1 -0
- package/dist/schema/index.d.ts +43 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +507 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/media.d.ts +1147 -0
- package/dist/schema/media.d.ts.map +1 -0
- package/dist/schema/menus.d.ts +636 -0
- package/dist/schema/menus.d.ts.map +1 -0
- package/dist/schema/notification-channels.d.ts +288 -0
- package/dist/schema/notification-channels.d.ts.map +1 -0
- package/dist/schema/notification-preferences.d.ts +300 -0
- package/dist/schema/notification-preferences.d.ts.map +1 -0
- package/dist/schema/notification-templates.d.ts +476 -0
- package/dist/schema/notification-templates.d.ts.map +1 -0
- package/dist/schema/notifications.d.ts +1139 -0
- package/dist/schema/notifications.d.ts.map +1 -0
- package/dist/schema/permission-fields.d.ts +96 -0
- package/dist/schema/permission-fields.d.ts.map +1 -0
- package/dist/schema/permissions.d.ts +173 -0
- package/dist/schema/permissions.d.ts.map +1 -0
- package/dist/schema/plugin-migrations.d.ts +204 -0
- package/dist/schema/plugin-migrations.d.ts.map +1 -0
- package/dist/schema/plugins.d.ts +1977 -0
- package/dist/schema/plugins.d.ts.map +1 -0
- package/dist/schema/relationships.d.ts +221 -0
- package/dist/schema/relationships.d.ts.map +1 -0
- package/dist/schema/role-permissions.d.ts +305 -0
- package/dist/schema/role-permissions.d.ts.map +1 -0
- package/dist/schema/roles.d.ts +260 -0
- package/dist/schema/roles.d.ts.map +1 -0
- package/dist/schema/scheduled-tasks.d.ts +1334 -0
- package/dist/schema/scheduled-tasks.d.ts.map +1 -0
- package/dist/schema/settings.d.ts +819 -0
- package/dist/schema/settings.d.ts.map +1 -0
- package/dist/schema/site-presentation.d.ts +1587 -0
- package/dist/schema/site-presentation.d.ts.map +1 -0
- package/dist/schema/teams.d.ts +381 -0
- package/dist/schema/teams.d.ts.map +1 -0
- package/dist/schema/web-design.d.ts +1542 -0
- package/dist/schema/web-design.d.ts.map +1 -0
- package/dist/schema/webhooks.d.ts +1016 -0
- package/dist/schema/webhooks.d.ts.map +1 -0
- package/dist/zod/index.d.ts +2 -0
- package/dist/zod/index.d.ts.map +1 -0
- package/dist/zod/index.js +6 -0
- package/dist/zod/index.js.map +1 -0
- package/package.json +63 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @wordrhyme/db - Shared Database Types and Schemas
|
|
3
|
+
*
|
|
4
|
+
* This package provides shared database schema definitions and Zod schemas
|
|
5
|
+
* for use across frontend and backend applications.
|
|
6
|
+
*
|
|
7
|
+
* ## Architecture
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* Drizzle Schema (source of truth)
|
|
11
|
+
* ↓
|
|
12
|
+
* drizzle-orm/zod (generates)
|
|
13
|
+
* ↓
|
|
14
|
+
* Zod Schemas (runtime validation)
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* // Import Drizzle tables and types
|
|
20
|
+
* import { i18nLanguages, i18nMessages, type I18nLanguage } from '@wordrhyme/db';
|
|
21
|
+
*
|
|
22
|
+
* // Import Zod schemas for forms/tables
|
|
23
|
+
* import { selectI18nLanguageSchema } from '@wordrhyme/db/zod';
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export * from "./schema";
|
|
27
|
+
export * from "./relations";
|
|
28
|
+
export * from "./plugin";
|
|
29
|
+
export { ACL_POLICY_SETTINGS_PREFIX, clearAclPolicyOverrides, getEffectiveAclPolicy, getRegisteredAclPolicies, loadAclPolicyOverrides, removeAclPolicyOverride, resolveAclTags, setAclPolicyOverride, type DefaultAclPolicy, type DefaultAclPolicyPrincipal, } from "./acl-policy";
|
|
30
|
+
export { getTableSoftDeleteCapability, setTableSoftDeleteCapability, } from "./delete-policy";
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,cAAc,UAAU,CAAC;AAGzB,cAAc,aAAa,CAAC;AAG5B,cAAc,UAAU,CAAC;AAGzB,OAAO,EACH,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,GACjC,MAAM,cAAc,CAAC;AAEtB,OAAO,EACH,4BAA4B,EAC5B,4BAA4B,GAC/B,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ACL_POLICY_SETTINGS_PREFIX,
|
|
3
|
+
PLUGIN_AUDIT_ACTOR_TYPES,
|
|
4
|
+
buildPluginTableName,
|
|
5
|
+
clearAclPolicyOverrides,
|
|
6
|
+
createPluginInsertSchema,
|
|
7
|
+
createPluginSelectSchema,
|
|
8
|
+
getEffectiveAclPolicy,
|
|
9
|
+
getRegisteredAclPolicies,
|
|
10
|
+
getTableSoftDeleteCapability,
|
|
11
|
+
loadAclPolicyOverrides,
|
|
12
|
+
normalizePluginId,
|
|
13
|
+
pluginTable,
|
|
14
|
+
removeAclPolicyOverride,
|
|
15
|
+
resolveAclTags,
|
|
16
|
+
setAclPolicyOverride,
|
|
17
|
+
setTableSoftDeleteCapability
|
|
18
|
+
} from "./chunk-DCJM6GN5.js";
|
|
19
|
+
import {
|
|
20
|
+
relations
|
|
21
|
+
} from "./chunk-XAIEVBMU.js";
|
|
22
|
+
import {
|
|
23
|
+
ACTION_JOURNAL_ACTIVE_STATUSES,
|
|
24
|
+
ACTION_JOURNAL_STATUSES,
|
|
25
|
+
AccessLevel,
|
|
26
|
+
CREDENTIAL_ACCOUNT_ISSUER,
|
|
27
|
+
ENTITY_EXTENSION_PROJECTION_STATUSES,
|
|
28
|
+
ENTITY_EXTENSION_VALUE_TYPES,
|
|
29
|
+
I18N_MESSAGE_FORMATS,
|
|
30
|
+
MARKET_REGIONS,
|
|
31
|
+
NotificationTypeEnum,
|
|
32
|
+
PLUGIN_INSTALL_JOB_STATUSES,
|
|
33
|
+
PLUGIN_INSTALL_OPERATIONS,
|
|
34
|
+
PLUGIN_INSTALL_SOURCES,
|
|
35
|
+
PLUGIN_MARKETPLACE_STATES,
|
|
36
|
+
PLUGIN_TRUST_LEVELS,
|
|
37
|
+
ROLE_PERMISSIONS,
|
|
38
|
+
SYS_INBOX_CODE,
|
|
39
|
+
ScopeType,
|
|
40
|
+
WEB_DOMAIN_CERTIFICATE_STATUSES,
|
|
41
|
+
WEB_DOMAIN_STATUSES,
|
|
42
|
+
WEB_PAGE_RESERVED_PATHS,
|
|
43
|
+
WEB_PAGE_RESERVED_PREFIXES,
|
|
44
|
+
WEB_PAGE_STATUSES,
|
|
45
|
+
WEB_THEME_REVISION_STATUSES,
|
|
46
|
+
WEB_THEME_SELECTION_STATUSES,
|
|
47
|
+
account,
|
|
48
|
+
accountSchema,
|
|
49
|
+
actionExecutionJournal,
|
|
50
|
+
actionExecutionOutbox,
|
|
51
|
+
activateWebThemeMutation,
|
|
52
|
+
activateWebThemeRevisionMutation,
|
|
53
|
+
apikey,
|
|
54
|
+
apikeySchema,
|
|
55
|
+
appendPluginUploadMutation,
|
|
56
|
+
auditEventSchema,
|
|
57
|
+
auditEvents,
|
|
58
|
+
auditEventsArchive,
|
|
59
|
+
auditEventsArchiveSchema,
|
|
60
|
+
auditLogSchema,
|
|
61
|
+
auditLogs,
|
|
62
|
+
auditLogsArchive,
|
|
63
|
+
auditLogsArchiveSchema,
|
|
64
|
+
batchUpdateMessagesMutation,
|
|
65
|
+
billingEventOutbox,
|
|
66
|
+
billingEventOutboxSchema,
|
|
67
|
+
capabilities,
|
|
68
|
+
capabilitySchema,
|
|
69
|
+
checkFeatureFlagQuery,
|
|
70
|
+
completePluginUploadMutation,
|
|
71
|
+
countryCode2Schema,
|
|
72
|
+
countryCode3Schema,
|
|
73
|
+
createMenuSchema,
|
|
74
|
+
createPluginUploadMutation,
|
|
75
|
+
createWebDomainMutation,
|
|
76
|
+
createWebPageMutation,
|
|
77
|
+
currencies,
|
|
78
|
+
currencySchema,
|
|
79
|
+
deleteFeatureFlagMutation,
|
|
80
|
+
deleteMenuMutation,
|
|
81
|
+
deleteSettingMutation,
|
|
82
|
+
deleteWebDomainMutation,
|
|
83
|
+
disableWebDomainMutation,
|
|
84
|
+
entityOwnershipSchema,
|
|
85
|
+
entityOwnerships,
|
|
86
|
+
exchangeRateSchema,
|
|
87
|
+
exchangeRates,
|
|
88
|
+
extProjection,
|
|
89
|
+
featureFlagOverrideSchema,
|
|
90
|
+
featureFlagOverrides,
|
|
91
|
+
featureFlagSchema,
|
|
92
|
+
featureFlags,
|
|
93
|
+
flagConditionSchema,
|
|
94
|
+
geoCountries,
|
|
95
|
+
geoCountrySchema,
|
|
96
|
+
geoNameSchema,
|
|
97
|
+
geoSubdivisionSchema,
|
|
98
|
+
geoSubdivisions,
|
|
99
|
+
getFeatureFlagQuery,
|
|
100
|
+
getGeoCountryQuery,
|
|
101
|
+
getGeoSubdivisionQuery,
|
|
102
|
+
getI18nBundlesQuery,
|
|
103
|
+
getI18nBundlesResultSchema,
|
|
104
|
+
getI18nMessagesQuery,
|
|
105
|
+
getMenuQuery,
|
|
106
|
+
getPluginInstallJobQuery,
|
|
107
|
+
getSettingQuery,
|
|
108
|
+
getWebDomainQuery,
|
|
109
|
+
getWebPageDocumentQuery,
|
|
110
|
+
getWebThemeQuery,
|
|
111
|
+
getWebThemeRevisionQuery,
|
|
112
|
+
i18nBundleSchema,
|
|
113
|
+
i18nBundleVersions,
|
|
114
|
+
i18nDirectionSchema,
|
|
115
|
+
i18nLanguageSchema,
|
|
116
|
+
i18nLanguages,
|
|
117
|
+
i18nMessageFormatSchema,
|
|
118
|
+
i18nMessageSchema,
|
|
119
|
+
i18nMessageSourceSchema,
|
|
120
|
+
i18nMessageTypeSchema,
|
|
121
|
+
i18nMessages,
|
|
122
|
+
importMediaFromUrlMutation,
|
|
123
|
+
installPluginFromRegistryMutation,
|
|
124
|
+
invitation,
|
|
125
|
+
invitationSchema,
|
|
126
|
+
issueWebThemePreviewMutation,
|
|
127
|
+
listAllMenusQuery,
|
|
128
|
+
listFeatureFlagsQuery,
|
|
129
|
+
listFlagOverridesQuery,
|
|
130
|
+
listGeoCountriesQuery,
|
|
131
|
+
listGeoSubdivisionsQuery,
|
|
132
|
+
listI18nLanguagesQuery,
|
|
133
|
+
listI18nMessagesQuery,
|
|
134
|
+
listMarketRegionsQuery,
|
|
135
|
+
listMenusQuery,
|
|
136
|
+
listPluginCatalogQuery,
|
|
137
|
+
listSettingsQuery,
|
|
138
|
+
listWebThemeRevisionsQuery,
|
|
139
|
+
localeSchema,
|
|
140
|
+
media,
|
|
141
|
+
mediaInsertSchema,
|
|
142
|
+
mediaSelectSchema,
|
|
143
|
+
member,
|
|
144
|
+
memberSchema,
|
|
145
|
+
menuSchema,
|
|
146
|
+
menus,
|
|
147
|
+
notificationChannelSchema,
|
|
148
|
+
notificationChannels,
|
|
149
|
+
notificationPreferenceSchema,
|
|
150
|
+
notificationPreferences,
|
|
151
|
+
notificationSchema,
|
|
152
|
+
notificationTemplateSchema,
|
|
153
|
+
notificationTemplates,
|
|
154
|
+
notifications,
|
|
155
|
+
organization,
|
|
156
|
+
organizationSchema,
|
|
157
|
+
ownershipAuditLog,
|
|
158
|
+
ownershipAuditLogSchema,
|
|
159
|
+
permissionSchema,
|
|
160
|
+
permissions,
|
|
161
|
+
planItemSchema,
|
|
162
|
+
planItems,
|
|
163
|
+
planSchema,
|
|
164
|
+
planSubscriptionSchema,
|
|
165
|
+
planSubscriptions,
|
|
166
|
+
plans,
|
|
167
|
+
pluginCatalogReleaseSchema,
|
|
168
|
+
pluginCatalogReleases,
|
|
169
|
+
pluginConfigSchema,
|
|
170
|
+
pluginConfigs,
|
|
171
|
+
pluginInstallJobSchema,
|
|
172
|
+
pluginInstallJobs,
|
|
173
|
+
pluginInstanceSchema,
|
|
174
|
+
pluginInstances,
|
|
175
|
+
pluginMigrationSchema,
|
|
176
|
+
pluginMigrations,
|
|
177
|
+
pluginRegistrySyncState,
|
|
178
|
+
pluginSchema,
|
|
179
|
+
plugins,
|
|
180
|
+
publishWebPageMutation,
|
|
181
|
+
publishWebThemeDraftMutation,
|
|
182
|
+
recoverWebThemeMutation,
|
|
183
|
+
relationship,
|
|
184
|
+
relationshipSchema,
|
|
185
|
+
removeFlagOverrideMutation,
|
|
186
|
+
requestWebDomainCertificateMutation,
|
|
187
|
+
rolePermissionSchema,
|
|
188
|
+
rolePermissions,
|
|
189
|
+
roleSchema,
|
|
190
|
+
roles,
|
|
191
|
+
rollbackPluginInstallMutation,
|
|
192
|
+
rollbackWebThemeRevisionMutation,
|
|
193
|
+
saveWebPageDocumentMutation,
|
|
194
|
+
saveWebThemeDraftMutation,
|
|
195
|
+
scheduledTaskSchema,
|
|
196
|
+
scheduledTasks,
|
|
197
|
+
schedulerProviderSchema,
|
|
198
|
+
schedulerProviders,
|
|
199
|
+
session,
|
|
200
|
+
sessionSchema,
|
|
201
|
+
setDefaultLanguageMutation,
|
|
202
|
+
setFlagOverrideMutation,
|
|
203
|
+
setPrimaryWebDomainMutation,
|
|
204
|
+
setSettingMutation,
|
|
205
|
+
setWebThemeEnabledMutation,
|
|
206
|
+
settingSchema,
|
|
207
|
+
settingSchemaSchema,
|
|
208
|
+
settingSchemas,
|
|
209
|
+
settingScopeSchema,
|
|
210
|
+
settingValueTypeSchema,
|
|
211
|
+
settings,
|
|
212
|
+
subdivisionFullCodeSchema,
|
|
213
|
+
taskExecutionSchema,
|
|
214
|
+
taskExecutions,
|
|
215
|
+
team,
|
|
216
|
+
teamMember,
|
|
217
|
+
teamMemberSchema,
|
|
218
|
+
teamSchema,
|
|
219
|
+
tenantQuotaSchema,
|
|
220
|
+
tenantQuotas,
|
|
221
|
+
toggleMenuVisibilityMutation,
|
|
222
|
+
transactionSchema,
|
|
223
|
+
transactions,
|
|
224
|
+
translationsObjectSchema,
|
|
225
|
+
uninstallPluginFromInstanceMutation,
|
|
226
|
+
updateFeatureFlagMutation,
|
|
227
|
+
updateMenuMutation,
|
|
228
|
+
updateMenuSchema,
|
|
229
|
+
updateProfileMutation,
|
|
230
|
+
updateWebDomainCertificateStatusMutation,
|
|
231
|
+
updateWebPageMutation,
|
|
232
|
+
usageRecordSchema,
|
|
233
|
+
usageRecords,
|
|
234
|
+
user,
|
|
235
|
+
userQuotaSchema,
|
|
236
|
+
userQuotas,
|
|
237
|
+
userSchema,
|
|
238
|
+
verification,
|
|
239
|
+
verificationSchema,
|
|
240
|
+
verifyWebDomainMutation,
|
|
241
|
+
walletSchema,
|
|
242
|
+
wallets,
|
|
243
|
+
webDesignDocumentSchema,
|
|
244
|
+
webDomainHostnameSchema,
|
|
245
|
+
webDomainSchema,
|
|
246
|
+
webDomainSelectSchema,
|
|
247
|
+
webDomains,
|
|
248
|
+
webPagePathSchema,
|
|
249
|
+
webPageSchema,
|
|
250
|
+
webPageSelectSchema,
|
|
251
|
+
webPages,
|
|
252
|
+
webThemeAdapterConfigSchema,
|
|
253
|
+
webThemeAdapterSelectionSchema,
|
|
254
|
+
webThemeHomeTargetSchema,
|
|
255
|
+
webThemeRevisionSchema,
|
|
256
|
+
webThemeRevisionSelectSchema,
|
|
257
|
+
webThemeRevisions,
|
|
258
|
+
webThemeSelectionSchema,
|
|
259
|
+
webThemeSelectionSelectSchema,
|
|
260
|
+
webThemeSelections,
|
|
261
|
+
webhookDeliveries,
|
|
262
|
+
webhookDeliverySchema,
|
|
263
|
+
webhookEndpointSchema,
|
|
264
|
+
webhookEndpoints,
|
|
265
|
+
webhookOutbox,
|
|
266
|
+
webhookOutboxSchema
|
|
267
|
+
} from "./chunk-3TTVLSF5.js";
|
|
268
|
+
import {
|
|
269
|
+
TagPrefix,
|
|
270
|
+
createLbacIndexes,
|
|
271
|
+
lbacFields,
|
|
272
|
+
ownerFields,
|
|
273
|
+
permissionFields,
|
|
274
|
+
scopeFields
|
|
275
|
+
} from "./chunk-KWWJRUIK.js";
|
|
276
|
+
export {
|
|
277
|
+
ACL_POLICY_SETTINGS_PREFIX,
|
|
278
|
+
ACTION_JOURNAL_ACTIVE_STATUSES,
|
|
279
|
+
ACTION_JOURNAL_STATUSES,
|
|
280
|
+
AccessLevel,
|
|
281
|
+
CREDENTIAL_ACCOUNT_ISSUER,
|
|
282
|
+
ENTITY_EXTENSION_PROJECTION_STATUSES,
|
|
283
|
+
ENTITY_EXTENSION_VALUE_TYPES,
|
|
284
|
+
I18N_MESSAGE_FORMATS,
|
|
285
|
+
MARKET_REGIONS,
|
|
286
|
+
NotificationTypeEnum,
|
|
287
|
+
PLUGIN_AUDIT_ACTOR_TYPES,
|
|
288
|
+
PLUGIN_INSTALL_JOB_STATUSES,
|
|
289
|
+
PLUGIN_INSTALL_OPERATIONS,
|
|
290
|
+
PLUGIN_INSTALL_SOURCES,
|
|
291
|
+
PLUGIN_MARKETPLACE_STATES,
|
|
292
|
+
PLUGIN_TRUST_LEVELS,
|
|
293
|
+
ROLE_PERMISSIONS,
|
|
294
|
+
SYS_INBOX_CODE,
|
|
295
|
+
ScopeType,
|
|
296
|
+
TagPrefix,
|
|
297
|
+
WEB_DOMAIN_CERTIFICATE_STATUSES,
|
|
298
|
+
WEB_DOMAIN_STATUSES,
|
|
299
|
+
WEB_PAGE_RESERVED_PATHS,
|
|
300
|
+
WEB_PAGE_RESERVED_PREFIXES,
|
|
301
|
+
WEB_PAGE_STATUSES,
|
|
302
|
+
WEB_THEME_REVISION_STATUSES,
|
|
303
|
+
WEB_THEME_SELECTION_STATUSES,
|
|
304
|
+
account,
|
|
305
|
+
accountSchema,
|
|
306
|
+
actionExecutionJournal,
|
|
307
|
+
actionExecutionOutbox,
|
|
308
|
+
activateWebThemeMutation,
|
|
309
|
+
activateWebThemeRevisionMutation,
|
|
310
|
+
apikey,
|
|
311
|
+
apikeySchema,
|
|
312
|
+
appendPluginUploadMutation,
|
|
313
|
+
auditEventSchema,
|
|
314
|
+
auditEvents,
|
|
315
|
+
auditEventsArchive,
|
|
316
|
+
auditEventsArchiveSchema,
|
|
317
|
+
auditLogSchema,
|
|
318
|
+
auditLogs,
|
|
319
|
+
auditLogsArchive,
|
|
320
|
+
auditLogsArchiveSchema,
|
|
321
|
+
batchUpdateMessagesMutation,
|
|
322
|
+
billingEventOutbox,
|
|
323
|
+
billingEventOutboxSchema,
|
|
324
|
+
buildPluginTableName,
|
|
325
|
+
capabilities,
|
|
326
|
+
capabilitySchema,
|
|
327
|
+
checkFeatureFlagQuery,
|
|
328
|
+
clearAclPolicyOverrides,
|
|
329
|
+
completePluginUploadMutation,
|
|
330
|
+
countryCode2Schema,
|
|
331
|
+
countryCode3Schema,
|
|
332
|
+
createLbacIndexes,
|
|
333
|
+
createMenuSchema,
|
|
334
|
+
createPluginInsertSchema,
|
|
335
|
+
createPluginSelectSchema,
|
|
336
|
+
createPluginUploadMutation,
|
|
337
|
+
createWebDomainMutation,
|
|
338
|
+
createWebPageMutation,
|
|
339
|
+
currencies,
|
|
340
|
+
currencySchema,
|
|
341
|
+
deleteFeatureFlagMutation,
|
|
342
|
+
deleteMenuMutation,
|
|
343
|
+
deleteSettingMutation,
|
|
344
|
+
deleteWebDomainMutation,
|
|
345
|
+
disableWebDomainMutation,
|
|
346
|
+
entityOwnershipSchema,
|
|
347
|
+
entityOwnerships,
|
|
348
|
+
exchangeRateSchema,
|
|
349
|
+
exchangeRates,
|
|
350
|
+
extProjection,
|
|
351
|
+
featureFlagOverrideSchema,
|
|
352
|
+
featureFlagOverrides,
|
|
353
|
+
featureFlagSchema,
|
|
354
|
+
featureFlags,
|
|
355
|
+
flagConditionSchema,
|
|
356
|
+
geoCountries,
|
|
357
|
+
geoCountrySchema,
|
|
358
|
+
geoNameSchema,
|
|
359
|
+
geoSubdivisionSchema,
|
|
360
|
+
geoSubdivisions,
|
|
361
|
+
getEffectiveAclPolicy,
|
|
362
|
+
getFeatureFlagQuery,
|
|
363
|
+
getGeoCountryQuery,
|
|
364
|
+
getGeoSubdivisionQuery,
|
|
365
|
+
getI18nBundlesQuery,
|
|
366
|
+
getI18nBundlesResultSchema,
|
|
367
|
+
getI18nMessagesQuery,
|
|
368
|
+
getMenuQuery,
|
|
369
|
+
getPluginInstallJobQuery,
|
|
370
|
+
getRegisteredAclPolicies,
|
|
371
|
+
getSettingQuery,
|
|
372
|
+
getTableSoftDeleteCapability,
|
|
373
|
+
getWebDomainQuery,
|
|
374
|
+
getWebPageDocumentQuery,
|
|
375
|
+
getWebThemeQuery,
|
|
376
|
+
getWebThemeRevisionQuery,
|
|
377
|
+
i18nBundleSchema,
|
|
378
|
+
i18nBundleVersions,
|
|
379
|
+
i18nDirectionSchema,
|
|
380
|
+
i18nLanguageSchema,
|
|
381
|
+
i18nLanguages,
|
|
382
|
+
i18nMessageFormatSchema,
|
|
383
|
+
i18nMessageSchema,
|
|
384
|
+
i18nMessageSourceSchema,
|
|
385
|
+
i18nMessageTypeSchema,
|
|
386
|
+
i18nMessages,
|
|
387
|
+
importMediaFromUrlMutation,
|
|
388
|
+
installPluginFromRegistryMutation,
|
|
389
|
+
invitation,
|
|
390
|
+
invitationSchema,
|
|
391
|
+
issueWebThemePreviewMutation,
|
|
392
|
+
lbacFields,
|
|
393
|
+
listAllMenusQuery,
|
|
394
|
+
listFeatureFlagsQuery,
|
|
395
|
+
listFlagOverridesQuery,
|
|
396
|
+
listGeoCountriesQuery,
|
|
397
|
+
listGeoSubdivisionsQuery,
|
|
398
|
+
listI18nLanguagesQuery,
|
|
399
|
+
listI18nMessagesQuery,
|
|
400
|
+
listMarketRegionsQuery,
|
|
401
|
+
listMenusQuery,
|
|
402
|
+
listPluginCatalogQuery,
|
|
403
|
+
listSettingsQuery,
|
|
404
|
+
listWebThemeRevisionsQuery,
|
|
405
|
+
loadAclPolicyOverrides,
|
|
406
|
+
localeSchema,
|
|
407
|
+
media,
|
|
408
|
+
mediaInsertSchema,
|
|
409
|
+
mediaSelectSchema,
|
|
410
|
+
member,
|
|
411
|
+
memberSchema,
|
|
412
|
+
menuSchema,
|
|
413
|
+
menus,
|
|
414
|
+
normalizePluginId,
|
|
415
|
+
notificationChannelSchema,
|
|
416
|
+
notificationChannels,
|
|
417
|
+
notificationPreferenceSchema,
|
|
418
|
+
notificationPreferences,
|
|
419
|
+
notificationSchema,
|
|
420
|
+
notificationTemplateSchema,
|
|
421
|
+
notificationTemplates,
|
|
422
|
+
notifications,
|
|
423
|
+
organization,
|
|
424
|
+
organizationSchema,
|
|
425
|
+
ownerFields,
|
|
426
|
+
ownershipAuditLog,
|
|
427
|
+
ownershipAuditLogSchema,
|
|
428
|
+
permissionFields,
|
|
429
|
+
permissionSchema,
|
|
430
|
+
permissions,
|
|
431
|
+
planItemSchema,
|
|
432
|
+
planItems,
|
|
433
|
+
planSchema,
|
|
434
|
+
planSubscriptionSchema,
|
|
435
|
+
planSubscriptions,
|
|
436
|
+
plans,
|
|
437
|
+
pluginCatalogReleaseSchema,
|
|
438
|
+
pluginCatalogReleases,
|
|
439
|
+
pluginConfigSchema,
|
|
440
|
+
pluginConfigs,
|
|
441
|
+
pluginInstallJobSchema,
|
|
442
|
+
pluginInstallJobs,
|
|
443
|
+
pluginInstanceSchema,
|
|
444
|
+
pluginInstances,
|
|
445
|
+
pluginMigrationSchema,
|
|
446
|
+
pluginMigrations,
|
|
447
|
+
pluginRegistrySyncState,
|
|
448
|
+
pluginSchema,
|
|
449
|
+
pluginTable,
|
|
450
|
+
plugins,
|
|
451
|
+
publishWebPageMutation,
|
|
452
|
+
publishWebThemeDraftMutation,
|
|
453
|
+
recoverWebThemeMutation,
|
|
454
|
+
relations,
|
|
455
|
+
relationship,
|
|
456
|
+
relationshipSchema,
|
|
457
|
+
removeAclPolicyOverride,
|
|
458
|
+
removeFlagOverrideMutation,
|
|
459
|
+
requestWebDomainCertificateMutation,
|
|
460
|
+
resolveAclTags,
|
|
461
|
+
rolePermissionSchema,
|
|
462
|
+
rolePermissions,
|
|
463
|
+
roleSchema,
|
|
464
|
+
roles,
|
|
465
|
+
rollbackPluginInstallMutation,
|
|
466
|
+
rollbackWebThemeRevisionMutation,
|
|
467
|
+
saveWebPageDocumentMutation,
|
|
468
|
+
saveWebThemeDraftMutation,
|
|
469
|
+
scheduledTaskSchema,
|
|
470
|
+
scheduledTasks,
|
|
471
|
+
schedulerProviderSchema,
|
|
472
|
+
schedulerProviders,
|
|
473
|
+
scopeFields,
|
|
474
|
+
session,
|
|
475
|
+
sessionSchema,
|
|
476
|
+
setAclPolicyOverride,
|
|
477
|
+
setDefaultLanguageMutation,
|
|
478
|
+
setFlagOverrideMutation,
|
|
479
|
+
setPrimaryWebDomainMutation,
|
|
480
|
+
setSettingMutation,
|
|
481
|
+
setTableSoftDeleteCapability,
|
|
482
|
+
setWebThemeEnabledMutation,
|
|
483
|
+
settingSchema,
|
|
484
|
+
settingSchemaSchema,
|
|
485
|
+
settingSchemas,
|
|
486
|
+
settingScopeSchema,
|
|
487
|
+
settingValueTypeSchema,
|
|
488
|
+
settings,
|
|
489
|
+
subdivisionFullCodeSchema,
|
|
490
|
+
taskExecutionSchema,
|
|
491
|
+
taskExecutions,
|
|
492
|
+
team,
|
|
493
|
+
teamMember,
|
|
494
|
+
teamMemberSchema,
|
|
495
|
+
teamSchema,
|
|
496
|
+
tenantQuotaSchema,
|
|
497
|
+
tenantQuotas,
|
|
498
|
+
toggleMenuVisibilityMutation,
|
|
499
|
+
transactionSchema,
|
|
500
|
+
transactions,
|
|
501
|
+
translationsObjectSchema,
|
|
502
|
+
uninstallPluginFromInstanceMutation,
|
|
503
|
+
updateFeatureFlagMutation,
|
|
504
|
+
updateMenuMutation,
|
|
505
|
+
updateMenuSchema,
|
|
506
|
+
updateProfileMutation,
|
|
507
|
+
updateWebDomainCertificateStatusMutation,
|
|
508
|
+
updateWebPageMutation,
|
|
509
|
+
usageRecordSchema,
|
|
510
|
+
usageRecords,
|
|
511
|
+
user,
|
|
512
|
+
userQuotaSchema,
|
|
513
|
+
userQuotas,
|
|
514
|
+
userSchema,
|
|
515
|
+
verification,
|
|
516
|
+
verificationSchema,
|
|
517
|
+
verifyWebDomainMutation,
|
|
518
|
+
walletSchema,
|
|
519
|
+
wallets,
|
|
520
|
+
webDesignDocumentSchema,
|
|
521
|
+
webDomainHostnameSchema,
|
|
522
|
+
webDomainSchema,
|
|
523
|
+
webDomainSelectSchema,
|
|
524
|
+
webDomains,
|
|
525
|
+
webPagePathSchema,
|
|
526
|
+
webPageSchema,
|
|
527
|
+
webPageSelectSchema,
|
|
528
|
+
webPages,
|
|
529
|
+
webThemeAdapterConfigSchema,
|
|
530
|
+
webThemeAdapterSelectionSchema,
|
|
531
|
+
webThemeHomeTargetSchema,
|
|
532
|
+
webThemeRevisionSchema,
|
|
533
|
+
webThemeRevisionSelectSchema,
|
|
534
|
+
webThemeRevisions,
|
|
535
|
+
webThemeSelectionSchema,
|
|
536
|
+
webThemeSelectionSelectSchema,
|
|
537
|
+
webThemeSelections,
|
|
538
|
+
webhookDeliveries,
|
|
539
|
+
webhookDeliverySchema,
|
|
540
|
+
webhookEndpointSchema,
|
|
541
|
+
webhookEndpoints,
|
|
542
|
+
webhookOutbox,
|
|
543
|
+
webhookOutboxSchema
|
|
544
|
+
};
|
|
545
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { type InferInsertModel, type InferSelectModel, type Table } from "drizzle-orm";
|
|
2
|
+
import { type AnyPgColumnBuilder, type PgBuildColumns, type PgBuildExtraConfigColumns, type PgTableExtraConfig, type PgTableExtraConfigValue, type PgTableWithColumns } from "drizzle-orm/pg-core";
|
|
3
|
+
import type { PgColumnsBuilders } from "drizzle-orm/pg-core/columns/all";
|
|
4
|
+
import { type BuildRefine, type BuildSchema, type NoUnknownKeys } from "drizzle-orm/zod";
|
|
5
|
+
import type { z } from "zod/v4";
|
|
6
|
+
import { type DefaultAclPolicy } from "./acl-policy";
|
|
7
|
+
export type { DefaultAclPolicy };
|
|
8
|
+
export { TagPrefix, type TagPrefixType } from "./schema/permission-fields";
|
|
9
|
+
export declare const PLUGIN_AUDIT_ACTOR_TYPES: readonly ["user", "system", "plugin", "api-token"];
|
|
10
|
+
export type PluginAuditActorType = (typeof PLUGIN_AUDIT_ACTOR_TYPES)[number];
|
|
11
|
+
declare function createPluginPolicyFields(): {
|
|
12
|
+
organizationId: import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>;
|
|
13
|
+
aclTags: import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").SetDimensions<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, 1>>>;
|
|
14
|
+
denyTags: import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").SetDimensions<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, 1>>>;
|
|
15
|
+
};
|
|
16
|
+
declare function createPluginAuditFields(): {
|
|
17
|
+
createdAt: import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTimestampBuilder>>;
|
|
18
|
+
updatedAt: import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTimestampBuilder>>>;
|
|
19
|
+
createdBy: import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>;
|
|
20
|
+
createdByType: import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, "user" | "plugin" | "system" | "api-token">;
|
|
21
|
+
updatedBy: import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>;
|
|
22
|
+
updatedByType: import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, "user" | "plugin" | "system" | "api-token">;
|
|
23
|
+
};
|
|
24
|
+
declare function createPluginDeleteFields(): {
|
|
25
|
+
deletedAt: import("drizzle-orm/pg-core").PgTimestampBuilder;
|
|
26
|
+
deletedBy: import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>;
|
|
27
|
+
deletedByType: import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>, "user" | "plugin" | "system" | "api-token">;
|
|
28
|
+
};
|
|
29
|
+
type PluginPolicyFieldBuilders = ReturnType<typeof createPluginPolicyFields>;
|
|
30
|
+
type PluginAuditFieldBuilders = ReturnType<typeof createPluginAuditFields>;
|
|
31
|
+
type PluginDeleteFieldBuilders = ReturnType<typeof createPluginDeleteFields>;
|
|
32
|
+
type NoPluginDeleteFields = Record<never, never>;
|
|
33
|
+
type PluginColumnMap<TColumnsMap extends Record<string, AnyPgColumnBuilder>, TSoftDelete extends boolean = false> = Omit<PluginAuditFieldBuilders, keyof TColumnsMap> & (TSoftDelete extends true ? Omit<PluginDeleteFieldBuilders, keyof TColumnsMap> : NoPluginDeleteFields) & Omit<TColumnsMap, keyof PluginPolicyFieldBuilders> & PluginPolicyFieldBuilders;
|
|
34
|
+
type PluginTableResult<TTableName extends string, TColumnsMap extends Record<string, AnyPgColumnBuilder>, TSoftDelete extends boolean = false> = PgTableWithColumns<{
|
|
35
|
+
name: TTableName;
|
|
36
|
+
schema: undefined;
|
|
37
|
+
columns: PgBuildColumns<TTableName, PluginColumnMap<TColumnsMap, TSoftDelete>>;
|
|
38
|
+
dialect: "pg";
|
|
39
|
+
}>;
|
|
40
|
+
type PluginExtraConfig<TColumnsMap extends Record<string, AnyPgColumnBuilder>, TSoftDelete extends boolean = false> = (self: PgBuildExtraConfigColumns<PluginColumnMap<TColumnsMap, TSoftDelete>>) => PgTableExtraConfig | PgTableExtraConfigValue[];
|
|
41
|
+
export interface PluginTableOptions {
|
|
42
|
+
acl?: {
|
|
43
|
+
defaultPolicy: DefaultAclPolicy;
|
|
44
|
+
};
|
|
45
|
+
softDelete?: boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare function normalizePluginId(pluginId: string): string;
|
|
48
|
+
export declare function buildPluginTableName(shortName: string): string;
|
|
49
|
+
export declare function pluginTable<TTableName extends string, TColumnsMap extends Record<string, AnyPgColumnBuilder>>(name: TTableName, columns: TColumnsMap, options: PluginTableOptions & {
|
|
50
|
+
softDelete: true;
|
|
51
|
+
}): PluginTableResult<TTableName, TColumnsMap, true>;
|
|
52
|
+
export declare function pluginTable<TTableName extends string, TColumnsMap extends Record<string, AnyPgColumnBuilder>>(name: TTableName, columns: TColumnsMap, extraConfig?: PluginExtraConfig<TColumnsMap>): PluginTableResult<TTableName, TColumnsMap>;
|
|
53
|
+
export declare function pluginTable<TTableName extends string, TColumnsMap extends Record<string, AnyPgColumnBuilder>>(name: TTableName, columns: TColumnsMap, options?: PluginTableOptions): PluginTableResult<TTableName, TColumnsMap>;
|
|
54
|
+
export declare function pluginTable<TTableName extends string, TColumnsMap extends Record<string, AnyPgColumnBuilder>>(name: TTableName, columns: TColumnsMap, extraConfig: PluginExtraConfig<TColumnsMap, true>, options: PluginTableOptions & {
|
|
55
|
+
softDelete: true;
|
|
56
|
+
}): PluginTableResult<TTableName, TColumnsMap, true>;
|
|
57
|
+
export declare function pluginTable<TTableName extends string, TColumnsMap extends Record<string, AnyPgColumnBuilder>>(name: TTableName, columns: TColumnsMap, extraConfig: PluginExtraConfig<TColumnsMap>, options?: PluginTableOptions): PluginTableResult<TTableName, TColumnsMap>;
|
|
58
|
+
export declare function pluginTable<TTableName extends string, TColumnsMap extends Record<string, AnyPgColumnBuilder>>(name: TTableName, columns: (columnTypes: PgColumnsBuilders) => TColumnsMap, options: PluginTableOptions & {
|
|
59
|
+
softDelete: true;
|
|
60
|
+
}): PluginTableResult<TTableName, TColumnsMap, true>;
|
|
61
|
+
export declare function pluginTable<TTableName extends string, TColumnsMap extends Record<string, AnyPgColumnBuilder>>(name: TTableName, columns: (columnTypes: PgColumnsBuilders) => TColumnsMap, extraConfig?: PluginExtraConfig<TColumnsMap>): PluginTableResult<TTableName, TColumnsMap>;
|
|
62
|
+
export declare function pluginTable<TTableName extends string, TColumnsMap extends Record<string, AnyPgColumnBuilder>>(name: TTableName, columns: (columnTypes: PgColumnsBuilders) => TColumnsMap, options?: PluginTableOptions): PluginTableResult<TTableName, TColumnsMap>;
|
|
63
|
+
export declare function pluginTable<TTableName extends string, TColumnsMap extends Record<string, AnyPgColumnBuilder>>(name: TTableName, columns: (columnTypes: PgColumnsBuilders) => TColumnsMap, extraConfig: PluginExtraConfig<TColumnsMap, true>, options: PluginTableOptions & {
|
|
64
|
+
softDelete: true;
|
|
65
|
+
}): PluginTableResult<TTableName, TColumnsMap, true>;
|
|
66
|
+
export declare function pluginTable<TTableName extends string, TColumnsMap extends Record<string, AnyPgColumnBuilder>>(name: TTableName, columns: (columnTypes: PgColumnsBuilders) => TColumnsMap, extraConfig: PluginExtraConfig<TColumnsMap>, options?: PluginTableOptions): PluginTableResult<TTableName, TColumnsMap>;
|
|
67
|
+
/**
|
|
68
|
+
* Platform-managed fields automatically injected by `pluginTable()`.
|
|
69
|
+
* These are managed by ScopedDb at runtime and must never appear in API inputs.
|
|
70
|
+
*/
|
|
71
|
+
declare const MANAGED_FIELD_OMIT: {
|
|
72
|
+
readonly organizationId: true;
|
|
73
|
+
readonly aclTags: true;
|
|
74
|
+
readonly denyTags: true;
|
|
75
|
+
readonly createdAt: true;
|
|
76
|
+
readonly updatedAt: true;
|
|
77
|
+
readonly createdBy: true;
|
|
78
|
+
readonly createdByType: true;
|
|
79
|
+
readonly updatedBy: true;
|
|
80
|
+
readonly updatedByType: true;
|
|
81
|
+
readonly deletedAt: true;
|
|
82
|
+
readonly deletedBy: true;
|
|
83
|
+
readonly deletedByType: true;
|
|
84
|
+
};
|
|
85
|
+
type ManagedFieldKey = keyof typeof MANAGED_FIELD_OMIT;
|
|
86
|
+
type OmitManagedFields<TSchema> = TSchema extends z.ZodObject<infer TShape, infer TConfig> ? z.ZodObject<Omit<TShape, ManagedFieldKey>, TConfig> : TSchema;
|
|
87
|
+
/**
|
|
88
|
+
* Create a Zod insert schema for a plugin table, automatically omitting
|
|
89
|
+
* platform-managed fields such as tenant policy and audit columns.
|
|
90
|
+
*
|
|
91
|
+
* Drop-in replacement for `createInsertSchema()` from `drizzle-orm/zod`.
|
|
92
|
+
* Plugin developers should use this instead to avoid leaking infra concerns.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* import { pluginTable, createPluginInsertSchema } from '@wordrhyme/db/plugin';
|
|
97
|
+
*
|
|
98
|
+
* export const myTable = pluginTable('items', { ... });
|
|
99
|
+
* export const insertItemSchema = createPluginInsertSchema(myTable);
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export declare function createPluginInsertSchema<TTable extends Table>(table: TTable): OmitManagedFields<BuildSchema<"insert", TTable["_"]["columns"], undefined, undefined>>;
|
|
103
|
+
export declare function createPluginInsertSchema<TTable extends Table, TRefine extends BuildRefine<Pick<TTable["_"]["columns"], keyof InferInsertModel<TTable>>, undefined>>(table: TTable, refine?: NoUnknownKeys<TRefine, InferInsertModel<TTable>>): OmitManagedFields<BuildSchema<"insert", TTable["_"]["columns"], TRefine, undefined>>;
|
|
104
|
+
/**
|
|
105
|
+
* Create a Zod select schema for public plugin API contracts. Host-managed
|
|
106
|
+
* policy, audit, and deletion fields stay internal to ScopedDb and the Host.
|
|
107
|
+
*/
|
|
108
|
+
export declare function createPluginSelectSchema<TTable extends Table>(table: TTable): OmitManagedFields<BuildSchema<"select", TTable["_"]["columns"], undefined, undefined>>;
|
|
109
|
+
export declare function createPluginSelectSchema<TTable extends Table, TRefine extends BuildRefine<TTable["_"]["columns"], undefined>>(table: TTable, refine?: NoUnknownKeys<TRefine, InferSelectModel<TTable>>): OmitManagedFields<BuildSchema<"select", TTable["_"]["columns"], TRefine, undefined>>;
|
|
110
|
+
//# sourceMappingURL=plugin.d.ts.map
|