@nexpress/core 0.3.0 → 0.3.2
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/dist/auth.d.ts +26 -3
- package/dist/auth.js +5 -3
- package/dist/{can-FKIEV54H.js → can-UJ2NAOIR.js} +3 -3
- package/dist/{chunk-CHQJG4BB.js → chunk-2N53KKIL.js} +2 -2
- package/dist/{chunk-DWG3RZH2.js → chunk-2VZZ7M26.js} +2 -2
- package/dist/{chunk-4EPNN4XG.js → chunk-54KUQF3S.js} +2 -2
- package/dist/{chunk-QYP6E5FP.js → chunk-6UV2P5MW.js} +63 -50
- package/dist/chunk-6UV2P5MW.js.map +1 -0
- package/dist/{chunk-QSJIKNQJ.js → chunk-ANZBCOEH.js} +9 -9
- package/dist/{chunk-TD4KNSEP.js → chunk-C6HXDY46.js} +19 -19
- package/dist/{chunk-26RYBFTF.js → chunk-LMPYQLMH.js} +37 -5
- package/dist/chunk-LMPYQLMH.js.map +1 -0
- package/dist/{chunk-EVOBLRHW.js → chunk-M2FWG5OJ.js} +5 -5
- package/dist/chunk-P5WGQRSG.js +180 -0
- package/dist/chunk-P5WGQRSG.js.map +1 -0
- package/dist/{chunk-HM46WM45.js → chunk-RDTTK27V.js} +6 -6
- package/dist/{chunk-PQBJWZ7D.js → chunk-RJ76SKWQ.js} +4 -4
- package/dist/{chunk-74CGJJDY.js → chunk-RKM4GDWM.js} +1 -1
- package/dist/{chunk-CKT4QZDC.js → chunk-WJJ5MBH5.js} +5 -5
- package/dist/{chunk-DPRBHEHI.js → chunk-YOFCLTBR.js} +7 -4
- package/dist/chunk-YOFCLTBR.js.map +1 -0
- package/dist/{chunk-HTDDXBMY.js → chunk-ZA3IRJUQ.js} +81 -131
- package/dist/chunk-ZA3IRJUQ.js.map +1 -0
- package/dist/community.d.ts +1 -1
- package/dist/community.js +20 -19
- package/dist/{config-2Y2YGD25.js → config-O7QM2OQS.js} +8 -7
- package/dist/db-schema.d.ts +2 -2
- package/dist/db.d.ts +3 -3
- package/dist/db.js +1 -1
- package/dist/fields.d.ts +54 -0
- package/dist/fields.js +14 -0
- package/dist/{host-YSADWU7J.js → host-NI3LR774.js} +6 -5
- package/dist/i18n.d.ts +1 -1
- package/dist/i18n.js +1 -1
- package/dist/{index-9IhVtFfA.d.ts → index-CPp-zGgL.d.ts} +2 -2
- package/dist/{index-CXuqW_Gl.d.ts → index-DKoSaszT.d.ts} +1 -1
- package/dist/{index-ClcinJ29.d.ts → index-DymnczhP.d.ts} +1 -1
- package/dist/{index-7_PBSyOq.d.ts → index-UZn29S3i.d.ts} +1 -1
- package/dist/index.d.ts +102 -16
- package/dist/index.js +191 -79
- package/dist/index.js.map +1 -1
- package/dist/jobs.d.ts +2 -2
- package/dist/jobs.js +2 -2
- package/dist/media.d.ts +2 -2
- package/dist/media.js +2 -2
- package/dist/{mentions-NCQR4B72.js → mentions-U4JACYI6.js} +3 -3
- package/dist/{mutes-FJSSU2JP.js → mutes-MNQP6ACF.js} +3 -3
- package/dist/{scheduled-F77QCDOG.js → scheduled-BWJG35Z2.js} +7 -6
- package/dist/seo.d.ts +16 -3
- package/dist/seo.js +6 -5
- package/dist/{settings-JODDWMDB.js → settings-OZWM6L2K.js} +2 -2
- package/dist/settings-OZWM6L2K.js.map +1 -0
- package/dist/strings-4EWJYDOG.js +1 -1
- package/dist/{types-DI3gxsiY.d.ts → types-D31ppGJw.d.ts} +294 -2
- package/package.json +6 -1
- package/dist/chunk-26RYBFTF.js.map +0 -1
- package/dist/chunk-DPRBHEHI.js.map +0 -1
- package/dist/chunk-HTDDXBMY.js.map +0 -1
- package/dist/chunk-QYP6E5FP.js.map +0 -1
- /package/dist/{can-FKIEV54H.js.map → can-UJ2NAOIR.js.map} +0 -0
- /package/dist/{chunk-CHQJG4BB.js.map → chunk-2N53KKIL.js.map} +0 -0
- /package/dist/{chunk-DWG3RZH2.js.map → chunk-2VZZ7M26.js.map} +0 -0
- /package/dist/{chunk-4EPNN4XG.js.map → chunk-54KUQF3S.js.map} +0 -0
- /package/dist/{chunk-QSJIKNQJ.js.map → chunk-ANZBCOEH.js.map} +0 -0
- /package/dist/{chunk-TD4KNSEP.js.map → chunk-C6HXDY46.js.map} +0 -0
- /package/dist/{chunk-EVOBLRHW.js.map → chunk-M2FWG5OJ.js.map} +0 -0
- /package/dist/{chunk-HM46WM45.js.map → chunk-RDTTK27V.js.map} +0 -0
- /package/dist/{chunk-PQBJWZ7D.js.map → chunk-RJ76SKWQ.js.map} +0 -0
- /package/dist/{chunk-74CGJJDY.js.map → chunk-RKM4GDWM.js.map} +0 -0
- /package/dist/{chunk-CKT4QZDC.js.map → chunk-WJJ5MBH5.js.map} +0 -0
- /package/dist/{config-2Y2YGD25.js.map → config-O7QM2OQS.js.map} +0 -0
- /package/dist/{host-YSADWU7J.js.map → fields.js.map} +0 -0
- /package/dist/{mentions-NCQR4B72.js.map → host-NI3LR774.js.map} +0 -0
- /package/dist/{mutes-FJSSU2JP.js.map → mentions-U4JACYI6.js.map} +0 -0
- /package/dist/{scheduled-F77QCDOG.js.map → mutes-MNQP6ACF.js.map} +0 -0
- /package/dist/{settings-JODDWMDB.js.map → scheduled-BWJG35Z2.js.map} +0 -0
package/dist/community.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
2
|
-
import {
|
|
2
|
+
import { H as NpPrincipal, e as NpAuthUser } from './types-D31ppGJw.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Community role registry. Maps a role name + scope type to the
|
package/dist/community.js
CHANGED
|
@@ -33,18 +33,28 @@ import {
|
|
|
33
33
|
unfollow,
|
|
34
34
|
unresolvedReportCount,
|
|
35
35
|
updateComment
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-C6HXDY46.js";
|
|
37
|
+
import "./chunk-54KUQF3S.js";
|
|
37
38
|
import {
|
|
38
39
|
buildDigestEmail,
|
|
39
40
|
runDigestSweep
|
|
40
41
|
} from "./chunk-LN6NTH6E.js";
|
|
42
|
+
import {
|
|
43
|
+
assertNotBanned,
|
|
44
|
+
getCommunityRole,
|
|
45
|
+
listCommunityRoles,
|
|
46
|
+
memberCan,
|
|
47
|
+
registerCommunityRole,
|
|
48
|
+
resetCommunityRoles,
|
|
49
|
+
withMemberWrite
|
|
50
|
+
} from "./chunk-RJ76SKWQ.js";
|
|
41
51
|
import {
|
|
42
52
|
getMutedTargetIds,
|
|
43
53
|
isMuted,
|
|
44
54
|
listMutes,
|
|
45
55
|
muteMember,
|
|
46
56
|
unmuteMember
|
|
47
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-WJJ5MBH5.js";
|
|
48
58
|
import {
|
|
49
59
|
getMemberNotificationPrefs,
|
|
50
60
|
isNotificationKindEnabled,
|
|
@@ -66,7 +76,7 @@ import {
|
|
|
66
76
|
markNotificationsRead,
|
|
67
77
|
resolveMentionedMembers,
|
|
68
78
|
unreadNotificationCount
|
|
69
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-RDTTK27V.js";
|
|
70
80
|
import {
|
|
71
81
|
applyReputation,
|
|
72
82
|
getReputationAdapter,
|
|
@@ -83,17 +93,9 @@ import {
|
|
|
83
93
|
resetProfanityAdapter,
|
|
84
94
|
setProfanityAdapter
|
|
85
95
|
} from "./chunk-KU5M27ZC.js";
|
|
86
|
-
import "./chunk-
|
|
87
|
-
import
|
|
88
|
-
|
|
89
|
-
getCommunityRole,
|
|
90
|
-
listCommunityRoles,
|
|
91
|
-
memberCan,
|
|
92
|
-
registerCommunityRole,
|
|
93
|
-
resetCommunityRoles,
|
|
94
|
-
withMemberWrite
|
|
95
|
-
} from "./chunk-PQBJWZ7D.js";
|
|
96
|
-
import "./chunk-HTDDXBMY.js";
|
|
96
|
+
import "./chunk-2N53KKIL.js";
|
|
97
|
+
import "./chunk-ZA3IRJUQ.js";
|
|
98
|
+
import "./chunk-2VZZ7M26.js";
|
|
97
99
|
import "./chunk-EQ2Z3KMD.js";
|
|
98
100
|
import {
|
|
99
101
|
listAuditEvents,
|
|
@@ -104,16 +106,15 @@ import {
|
|
|
104
106
|
getCommunitySettings,
|
|
105
107
|
updateCommunitySettings,
|
|
106
108
|
validateCommunitySettingsPatch
|
|
107
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-RKM4GDWM.js";
|
|
110
|
+
import "./chunk-P5WGQRSG.js";
|
|
108
111
|
import "./chunk-4ZLMEKFX.js";
|
|
109
112
|
import "./chunk-U4QCCLAW.js";
|
|
110
|
-
import "./chunk-ZCINJSS4.js";
|
|
111
113
|
import "./chunk-SBCVAC2Z.js";
|
|
114
|
+
import "./chunk-ZCINJSS4.js";
|
|
112
115
|
import "./chunk-LSHHRDVR.js";
|
|
113
|
-
import "./chunk-WV272MPW.js";
|
|
114
|
-
import "./chunk-CHQJG4BB.js";
|
|
115
|
-
import "./chunk-DWG3RZH2.js";
|
|
116
116
|
import "./chunk-V2UNHGAP.js";
|
|
117
|
+
import "./chunk-WV272MPW.js";
|
|
117
118
|
import "./chunk-OROPGO65.js";
|
|
118
119
|
import "./chunk-NFHS7CFV.js";
|
|
119
120
|
import "./chunk-XANPEOJC.js";
|
|
@@ -5,17 +5,18 @@ import {
|
|
|
5
5
|
isVersionedPluginConfig,
|
|
6
6
|
pluginConfigCacheTag,
|
|
7
7
|
setPluginConfig
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-M2FWG5OJ.js";
|
|
9
|
+
import "./chunk-ZA3IRJUQ.js";
|
|
10
|
+
import "./chunk-2VZZ7M26.js";
|
|
11
|
+
import "./chunk-LMPYQLMH.js";
|
|
11
12
|
import "./chunk-2KNG5KMM.js";
|
|
13
|
+
import "./chunk-P5WGQRSG.js";
|
|
12
14
|
import "./chunk-4ZLMEKFX.js";
|
|
13
15
|
import "./chunk-U4QCCLAW.js";
|
|
14
|
-
import "./chunk-ZCINJSS4.js";
|
|
15
16
|
import "./chunk-SBCVAC2Z.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-DWG3RZH2.js";
|
|
17
|
+
import "./chunk-ZCINJSS4.js";
|
|
18
18
|
import "./chunk-V2UNHGAP.js";
|
|
19
|
+
import "./chunk-WV272MPW.js";
|
|
19
20
|
import "./chunk-OROPGO65.js";
|
|
20
21
|
import "./chunk-NFHS7CFV.js";
|
|
21
22
|
import "./chunk-XANPEOJC.js";
|
|
@@ -29,4 +30,4 @@ export {
|
|
|
29
30
|
pluginConfigCacheTag,
|
|
30
31
|
setPluginConfig
|
|
31
32
|
};
|
|
32
|
-
//# sourceMappingURL=config-
|
|
33
|
+
//# sourceMappingURL=config-O7QM2OQS.js.map
|
package/dist/db-schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-
|
|
1
|
+
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-DKoSaszT.js';
|
|
2
2
|
import 'drizzle-orm/pg-core';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-D31ppGJw.js';
|
|
4
4
|
import 'drizzle-orm';
|
package/dist/db.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as CreateDbConnectionConfig, c as createDbConnection, a as generateDrizzleSchema, b as generateTypeScript, d as getDb, s as setDb } from './index-
|
|
2
|
-
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-
|
|
1
|
+
export { C as CreateDbConnectionConfig, c as createDbConnection, a as generateDrizzleSchema, b as generateTypeScript, d as getDb, s as setDb } from './index-CPp-zGgL.js';
|
|
2
|
+
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-DKoSaszT.js';
|
|
3
3
|
import 'drizzle-orm/node-postgres';
|
|
4
4
|
import 'pg';
|
|
5
|
-
import './types-
|
|
5
|
+
import './types-D31ppGJw.js';
|
|
6
6
|
import 'drizzle-orm/pg-core';
|
|
7
7
|
import 'drizzle-orm';
|
package/dist/db.js
CHANGED
package/dist/fields.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { n as NpFieldConfig, B as NpFieldCondition, C as NpFieldConditionExpr, d as NpCollectionConfig } from './types-D31ppGJw.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Evaluate a field condition — handles both the legacy function
|
|
6
|
+
* form (`NpFieldCondition`, server-side only) and the serializable
|
|
7
|
+
* expression form (`NpFieldConditionExpr`, works in both env).
|
|
8
|
+
* Unset → returns true (field shows / required holds).
|
|
9
|
+
*
|
|
10
|
+
* Used by `collectHiddenFieldNames` server-side and by the admin
|
|
11
|
+
* editor's `passesCondition` client-side. The same evaluator runs
|
|
12
|
+
* both places so server validation + client visibility never
|
|
13
|
+
* disagree.
|
|
14
|
+
*/
|
|
15
|
+
declare function evaluateFieldCondition(condition: NpFieldCondition | NpFieldConditionExpr | undefined, data: Record<string, unknown>): boolean;
|
|
16
|
+
declare function buildZodSchema(fields: NpFieldConfig[],
|
|
17
|
+
/**
|
|
18
|
+
* Field names whose `admin.condition` returned false against
|
|
19
|
+
* the current document data. `required` is dropped for these
|
|
20
|
+
* — a hidden field can't be filled in by the operator, so
|
|
21
|
+
* enforcing required on save would block writes the operator
|
|
22
|
+
* can't fix. Pass an empty set (the default) for static
|
|
23
|
+
* contexts that don't have current data to evaluate
|
|
24
|
+
* conditions against; the schema then enforces every `required`
|
|
25
|
+
* verbatim, matching pre-#759 behavior.
|
|
26
|
+
*/
|
|
27
|
+
hiddenByCondition?: ReadonlySet<string>): z.ZodObject<Record<string, z.ZodTypeAny>>;
|
|
28
|
+
/**
|
|
29
|
+
* Walk fields recursively, evaluating `admin.condition` against
|
|
30
|
+
* `data` and collecting the names of fields the condition would
|
|
31
|
+
* hide. Used by the pipeline + admin client to drop required
|
|
32
|
+
* checks for fields the operator can't see / set.
|
|
33
|
+
*
|
|
34
|
+
* When a `group` field's own condition hides the group, every
|
|
35
|
+
* nested name is added too — operators can't see the inner
|
|
36
|
+
* fields, so requiring them would block save with an invisible
|
|
37
|
+
* error. Nested fields with their own conditions are evaluated
|
|
38
|
+
* normally when the group is visible.
|
|
39
|
+
*/
|
|
40
|
+
declare function collectHiddenFieldNames(fields: NpFieldConfig[], data: Record<string, unknown>): Set<string>;
|
|
41
|
+
declare function getCollectionZodSchema(config: NpCollectionConfig,
|
|
42
|
+
/**
|
|
43
|
+
* Current document data. When provided, `admin.condition` is
|
|
44
|
+
* evaluated against it and `required` is dropped for fields
|
|
45
|
+
* the condition hides — mirrors the admin client's
|
|
46
|
+
* condition-aware resolver so a hidden field can't bypass
|
|
47
|
+
* the editor and still fail server validation.
|
|
48
|
+
*
|
|
49
|
+
* Pass `undefined` (or omit) for code paths that need the
|
|
50
|
+
* unconditional schema — pre-#759 behavior.
|
|
51
|
+
*/
|
|
52
|
+
forData?: Record<string, unknown>): z.ZodSchema;
|
|
53
|
+
|
|
54
|
+
export { buildZodSchema, collectHiddenFieldNames, evaluateFieldCondition, getCollectionZodSchema };
|
package/dist/fields.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildZodSchema,
|
|
3
|
+
collectHiddenFieldNames,
|
|
4
|
+
evaluateFieldCondition,
|
|
5
|
+
getCollectionZodSchema
|
|
6
|
+
} from "./chunk-P5WGQRSG.js";
|
|
7
|
+
import "./chunk-PZ5AY32C.js";
|
|
8
|
+
export {
|
|
9
|
+
buildZodSchema,
|
|
10
|
+
collectHiddenFieldNames,
|
|
11
|
+
evaluateFieldCondition,
|
|
12
|
+
getCollectionZodSchema
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -16,14 +16,15 @@ import {
|
|
|
16
16
|
runHookAndCollect,
|
|
17
17
|
runPluginScheduledTask,
|
|
18
18
|
schedulePluginTask
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZA3IRJUQ.js";
|
|
20
|
+
import "./chunk-2VZZ7M26.js";
|
|
21
|
+
import "./chunk-P5WGQRSG.js";
|
|
20
22
|
import "./chunk-4ZLMEKFX.js";
|
|
21
23
|
import "./chunk-U4QCCLAW.js";
|
|
22
|
-
import "./chunk-ZCINJSS4.js";
|
|
23
24
|
import "./chunk-SBCVAC2Z.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-DWG3RZH2.js";
|
|
25
|
+
import "./chunk-ZCINJSS4.js";
|
|
26
26
|
import "./chunk-V2UNHGAP.js";
|
|
27
|
+
import "./chunk-WV272MPW.js";
|
|
27
28
|
import "./chunk-OROPGO65.js";
|
|
28
29
|
import "./chunk-NFHS7CFV.js";
|
|
29
30
|
import "./chunk-XANPEOJC.js";
|
|
@@ -48,4 +49,4 @@ export {
|
|
|
48
49
|
runPluginScheduledTask,
|
|
49
50
|
schedulePluginTask
|
|
50
51
|
};
|
|
51
|
-
//# sourceMappingURL=host-
|
|
52
|
+
//# sourceMappingURL=host-NI3LR774.js.map
|
package/dist/i18n.d.ts
CHANGED
package/dist/i18n.js
CHANGED
|
@@ -31,8 +31,8 @@ import {
|
|
|
31
31
|
setI18nConfig
|
|
32
32
|
} from "./chunk-4ZLMEKFX.js";
|
|
33
33
|
import "./chunk-U4QCCLAW.js";
|
|
34
|
-
import "./chunk-ZCINJSS4.js";
|
|
35
34
|
import "./chunk-SBCVAC2Z.js";
|
|
35
|
+
import "./chunk-ZCINJSS4.js";
|
|
36
36
|
import "./chunk-NFHS7CFV.js";
|
|
37
37
|
import "./chunk-XANPEOJC.js";
|
|
38
38
|
import "./chunk-X7K5F2UI.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as drizzle_orm_node_postgres from 'drizzle-orm/node-postgres';
|
|
2
2
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
3
3
|
import { Pool } from 'pg';
|
|
4
|
-
import { V as schema } from './index-
|
|
5
|
-
import { d as NpCollectionConfig } from './types-
|
|
4
|
+
import { V as schema } from './index-DKoSaszT.js';
|
|
5
|
+
import { d as NpCollectionConfig } from './types-D31ppGJw.js';
|
|
6
6
|
|
|
7
7
|
declare function setDb(db: NodePgDatabase<Record<string, unknown>>): void;
|
|
8
8
|
declare function getDb(): NodePgDatabase<Record<string, unknown>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
2
|
-
import { N as NpRichTextContent, a as NpNavItem, b as NpBlockInstance } from './types-
|
|
2
|
+
import { N as NpRichTextContent, a as NpNavItem, b as NpBlockInstance } from './types-D31ppGJw.js';
|
|
3
3
|
import * as drizzle_orm from 'drizzle-orm';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as NpFindResult,
|
|
1
|
+
import { i as NpFindResult, J as NpImageSize, n as NpFieldConfig } from './types-D31ppGJw.js';
|
|
2
2
|
import { and } from 'drizzle-orm';
|
|
3
3
|
import { PgTable } from 'drizzle-orm/pg-core';
|
|
4
4
|
import { ReadableStream } from 'node:stream/web';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as NpJobType, d as NpCollectionConfig, e as NpAuthUser, H as NpPrincipal } from './types-D31ppGJw.js';
|
|
2
2
|
import { ConstructorOptions, PgBoss } from 'pg-boss';
|
|
3
3
|
import { N as NpLogLevel } from './logger-DqGaOU_j.js';
|
|
4
4
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { c as NpConfig, d as NpCollectionConfig, e as NpAuthUser, f as NpSaveOptions, g as NpSaveResult, h as NpFindOptions, i as NpFindResult,
|
|
2
|
-
export { p as NpAccessFunction, q as
|
|
3
|
-
export { ARGON2_OPTIONS, ArcticLikeProvider, ArcticLikeTokens, FromArcticOptions, IssuedOAuthState, NpCapability, NpConsumeMemberEmailVerifyResult, NpConsumeMemberResetResult, NpConsumeResetTokenOptions, NpConsumeResetTokenResult, NpCreateResetTokenOptions, NpIssuedMemberToken, NpIssuedResetToken, NpMemberAuthRow, NpMemberIdentityRow, NpMemberResetRequestResult, NpMemberTokenPayload, NpPasswordResetPurpose, NpResetRequestResult, NpTokenPayload, NpUserIdentityRow, OAuthAuthorizeParams, OAuthExchangeParams, OAuthProfile, OAuthProvider, OAuthStatePayload, ResolveMemberOAuthLoginInput, ResolveMemberOAuthLoginResult, ResolveOAuthLoginInput, ResolveOAuthLoginResult, ResolvedOAuthMember, ResolvedOAuthUser, VerifyOAuthStateResult, authenticated, can, consumeMemberEmailVerifyToken, consumeMemberPasswordReset, consumePasswordResetToken, createMemberEmailVerifyToken, createPasswordResetToken, fromArctic, getMemberFromTokenPayload, getOAuthProvider, hashPassword, invalidateAllMemberSessions, invalidateAllSessions, isAdmin, isEditorOrAbove, isOwnerOrAdmin, isTokenVerificationError, issueOAuthState, listMemberIdentities, listOAuthProviders, listUserIdentities, registerOAuthProvider, requestMemberPasswordReset, requestPasswordReset, resetOAuthProviders, resolveMemberOAuthLogin, resolveOAuthLogin, revokeMemberIdentity, revokeUserIdentity, sha256, signMemberToken, signToken, verifyCsrf, verifyMemberToken, verifyOAuthState, verifyPassword, verifyToken, verifyTokenFull } from './auth.js';
|
|
4
|
-
import { SQL } from 'drizzle-orm';
|
|
1
|
+
import { c as NpConfig, d as NpCollectionConfig, e as NpAuthUser, f as NpSaveOptions, g as NpSaveResult, h as NpFindOptions, i as NpFindResult, a as NpNavItem, j as NpRegisteredTheme, k as NpThemeFieldRequirement, l as NpThemeManifest, m as NpUserRole, n as NpFieldConfig, o as NpPluginConfig } from './types-D31ppGJw.js';
|
|
2
|
+
export { p as NpAccessFunction, q as NpAdminGroupMeta, r as NpArrayField, s as NpBlockConfig, b as NpBlockInstance, t as NpBlocksField, u as NpCheckboxField, v as NpCollapsibleField, w as NpCollectionHook, x as NpDateField, y as NpDocumentStatus, z as NpEditorConfig, A as NpEmailField, B as NpFieldCondition, C as NpFieldConditionExpr, D as NpFieldValidator, E as NpFindWhere, F as NpFindWhereSystemTokens, G as NpGroupField, H as NpHookPrincipal, I as NpI18nConfig, J as NpImageSize, K as NpJobType, L as NpJsonField, M as NpNumberField, O as NpPluginContext, H as NpPrincipal, P as NpRadioField, Q as NpRelationshipField, R as NpResolvedPluginLike, N as NpRichTextContent, S as NpRichTextField, T as NpRowField, U as NpSelectField, V as NpTextField, W as NpTextareaField, X as NpThemeCollectionKind, Y as NpThemeCollectionRequirement, Z as NpUploadConfig, _ as NpUploadField, $ as ROLE_HIERARCHY } from './types-D31ppGJw.js';
|
|
3
|
+
export { ARGON2_OPTIONS, ArcticLikeProvider, ArcticLikeTokens, FromArcticOptions, IssuedOAuthState, NpCapability, NpConsumeMemberEmailVerifyResult, NpConsumeMemberResetResult, NpConsumeResetTokenOptions, NpConsumeResetTokenResult, NpCreateResetTokenOptions, NpIssuedMemberToken, NpIssuedResetToken, NpMemberAuthRow, NpMemberIdentityRow, NpMemberResetRequestResult, NpMemberTokenPayload, NpPasswordResetPurpose, NpResetRequestResult, NpTokenPayload, NpUserBasic, NpUserIdentityRow, OAuthAuthorizeParams, OAuthExchangeParams, OAuthProfile, OAuthProvider, OAuthStatePayload, ResolveMemberOAuthLoginInput, ResolveMemberOAuthLoginResult, ResolveOAuthLoginInput, ResolveOAuthLoginResult, ResolvedOAuthMember, ResolvedOAuthUser, VerifyOAuthStateResult, authenticated, can, consumeMemberEmailVerifyToken, consumeMemberPasswordReset, consumePasswordResetToken, createMemberEmailVerifyToken, createPasswordResetToken, fromArctic, getMemberFromTokenPayload, getOAuthProvider, getUserById, hashPassword, invalidateAllMemberSessions, invalidateAllSessions, isAdmin, isEditorOrAbove, isOwnerOrAdmin, isTokenVerificationError, issueOAuthState, listMemberIdentities, listOAuthProviders, listUserIdentities, registerOAuthProvider, requestMemberPasswordReset, requestPasswordReset, resetOAuthProviders, resolveMemberOAuthLogin, resolveOAuthLogin, revokeMemberIdentity, revokeUserIdentity, sha256, signMemberToken, signToken, verifyCsrf, verifyMemberToken, verifyOAuthState, verifyPassword, verifyToken, verifyTokenFull } from './auth.js';
|
|
4
|
+
import { SQL, sql } from 'drizzle-orm';
|
|
5
5
|
import { NpSitemapEntry, NpFeedEntry } from './seo.js';
|
|
6
6
|
export { ArticleJsonLd, ArticleJsonLdInput, BuildAtomFeedOptions, BuildJsonLdContext, BuildSitemapOptions, DEFAULT_SITE_SEO_SETTINGS, DiscussionForumPostingJsonLd, NpPageMetadata, NpPageMetadataInput, NpSeoSettingsPatch, NpSiteSeoSettings, NpSitemapIndexEntry, PersonJsonLd, PersonJsonLdInput, WebSiteJsonLd, buildArticleJsonLd, buildAtomFeed, buildDiscussionForumPostingJsonLd, buildPageMetadata, buildPersonJsonLd, buildSitemap, buildWebSiteJsonLd, getSiteSeoSettings, renderAtomFeed, renderSitemapIndexXml, renderSitemapXml, validateSeoSettingsPatch } from './seo.js';
|
|
7
|
-
export { c as createDbConnection, g as generateDocumentsModule, a as generateDrizzleSchema, b as generateTypeScript, d as getDb, s as setDb } from './index-
|
|
7
|
+
export { c as createDbConnection, g as generateDocumentsModule, a as generateDrizzleSchema, b as generateTypeScript, d as getDb, s as setDb } from './index-CPp-zGgL.js';
|
|
8
|
+
import { PgTable } from 'drizzle-orm/pg-core';
|
|
9
|
+
export { buildZodSchema, collectHiddenFieldNames, evaluateFieldCondition, getCollectionZodSchema } from './fields.js';
|
|
8
10
|
import { z, ZodTypeAny } from 'zod';
|
|
9
|
-
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-
|
|
10
|
-
export { D as DEFAULT_JOB_LOG_RETENTION_MS, L as ListJobLogsOptions, N as NpJobCountOptions, a as NpJobHandler, b as NpJobListOptions, c as NpJobListResult, d as NpJobLogEntry, e as NpJobQueue, f as NpJobState, g as NpJobStateCounts, h as NpJobSummary, i as NpJobsPauseState, j as NpPluginScheduleStats, k as NpReconcileSchedulesResult, l as NpScheduleSummary, m as NpWorkerHealthSummary, n as NpWorkerHeartbeat, P as PAUSE_SYNC_INTERVAL_MS, o as PgBossAdapter, S as SetJobsPauseStateInput, W as WORKER_HEARTBEAT_INTERVAL_MS, p as WORKER_STALE_THRESHOLD_MS, q as configureBuiltinJobContext, r as countAliveWorkers, s as countJobLogs, t as enqueueJob, u as getAllJobHandlers, v as getCurrentJobId, w as getJobHandler, x as getJobQueue, y as getJobsPauseState, z as getOptionalJobQueue, A as listJobLogs, B as listWorkerHealth, C as markWorkerStopped, E as pruneJobLogsOlderThan, F as purgeStaleWorkers, G as recordHeartbeat, H as recordJobLog, I as registerBuiltinHandlers, J as registerJobHandler, K as runInJobContext, M as setJobQueue, O as setJobsPauseState, Q as startProducer, R as startWorker, T as stopProducer, U as stopWorker } from './index-
|
|
11
|
-
import { N as NpStorageAdapter, a as NpFileMetadata } from './index-
|
|
12
|
-
export { D as DEFAULT_IMAGE_SIZES, b as NpGetMediaUrlOptions, c as NpMediaUploader, d as NpMediaUploaderKindFilter, e as NpMediaVariantName, f as NpProcessedImageResult, g as NpProcessedImageVariant, h as cleanupDeletedMedia, i as deleteMedia, j as extractMediaIds, k as getMediaById, l as getMediaUrl, m as getStorageAdapter, n as listMedia, p as processImage, o as processMediaImage, s as setStorageAdapter, u as uploadMedia } from './index-
|
|
11
|
+
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-DKoSaszT.js';
|
|
12
|
+
export { D as DEFAULT_JOB_LOG_RETENTION_MS, L as ListJobLogsOptions, N as NpJobCountOptions, a as NpJobHandler, b as NpJobListOptions, c as NpJobListResult, d as NpJobLogEntry, e as NpJobQueue, f as NpJobState, g as NpJobStateCounts, h as NpJobSummary, i as NpJobsPauseState, j as NpPluginScheduleStats, k as NpReconcileSchedulesResult, l as NpScheduleSummary, m as NpWorkerHealthSummary, n as NpWorkerHeartbeat, P as PAUSE_SYNC_INTERVAL_MS, o as PgBossAdapter, S as SetJobsPauseStateInput, W as WORKER_HEARTBEAT_INTERVAL_MS, p as WORKER_STALE_THRESHOLD_MS, q as configureBuiltinJobContext, r as countAliveWorkers, s as countJobLogs, t as enqueueJob, u as getAllJobHandlers, v as getCurrentJobId, w as getJobHandler, x as getJobQueue, y as getJobsPauseState, z as getOptionalJobQueue, A as listJobLogs, B as listWorkerHealth, C as markWorkerStopped, E as pruneJobLogsOlderThan, F as purgeStaleWorkers, G as recordHeartbeat, H as recordJobLog, I as registerBuiltinHandlers, J as registerJobHandler, K as runInJobContext, M as setJobQueue, O as setJobsPauseState, Q as startProducer, R as startWorker, T as stopProducer, U as stopWorker } from './index-UZn29S3i.js';
|
|
13
|
+
import { N as NpStorageAdapter, a as NpFileMetadata } from './index-DymnczhP.js';
|
|
14
|
+
export { D as DEFAULT_IMAGE_SIZES, b as NpGetMediaUrlOptions, c as NpMediaUploader, d as NpMediaUploaderKindFilter, e as NpMediaVariantName, f as NpProcessedImageResult, g as NpProcessedImageVariant, h as cleanupDeletedMedia, i as deleteMedia, j as extractMediaIds, k as getMediaById, l as getMediaUrl, m as getStorageAdapter, n as listMedia, p as processImage, o as processMediaImage, s as setStorageAdapter, u as uploadMedia } from './index-DymnczhP.js';
|
|
13
15
|
import { ReadableStream } from 'node:stream/web';
|
|
14
16
|
export { NpLocaleDirection, NpResolveLocaleInput, NpResolveLocaleResult, NpStringOverrideRow, NpTranslationBundle, NpTranslationParams, addStrings, clearStringOverrideCacheForSite, deleteStringOverride, formatDate, formatNumber, formatRelativeTime, getAllStrings, getCurrentLocale, getI18nConfig, getLocaleDirection, getStringOverride, getStringOverridesForSite, getStrings, listStringOverridesForSite, loadStringOverridesForSite, resetI18nConfig, resetIntlFormatterCache, resetStringOverrideCache, resetStrings, resetTranslationCache, resolveLocale, setI18nConfig, setStringOverride, setStrings, t, tSync } from './i18n.js';
|
|
15
17
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
@@ -20,7 +22,6 @@ export { AuditActor, AuditActorKind, AuditEventRow, BanKind, BanScope, BuildDige
|
|
|
20
22
|
export { NpCustomRoute, clearCustomRoutes, getCustomRoutes, registerCustomRoute } from './routes.js';
|
|
21
23
|
import '@node-rs/argon2';
|
|
22
24
|
import 'pg';
|
|
23
|
-
import 'drizzle-orm/pg-core';
|
|
24
25
|
import 'pg-boss';
|
|
25
26
|
|
|
26
27
|
/**
|
|
@@ -202,6 +203,75 @@ declare function getCollectionTable(slug: string): unknown;
|
|
|
202
203
|
declare function getCollectionRegistration(slug: string): CollectionRegistration;
|
|
203
204
|
declare function getAllCollectionSlugs(): string[];
|
|
204
205
|
|
|
206
|
+
type QueryCondition = ReturnType<typeof sql>;
|
|
207
|
+
interface SelectQuery extends Promise<unknown[]> {
|
|
208
|
+
where(condition: QueryCondition): SelectQuery;
|
|
209
|
+
orderBy(order: QueryCondition): SelectQuery;
|
|
210
|
+
limit(limit: number): SelectQuery;
|
|
211
|
+
offset(offset: number): SelectQuery;
|
|
212
|
+
}
|
|
213
|
+
interface InsertValuesQuery extends Promise<unknown> {
|
|
214
|
+
returning(): Promise<unknown[]>;
|
|
215
|
+
}
|
|
216
|
+
interface DrizzleTransactionLike {
|
|
217
|
+
insert(table: PgTable): {
|
|
218
|
+
values(values: Record<string, unknown> | Record<string, unknown>[]): InsertValuesQuery;
|
|
219
|
+
};
|
|
220
|
+
update(table: PgTable): {
|
|
221
|
+
set(values: Record<string, unknown>): {
|
|
222
|
+
where(condition: QueryCondition): {
|
|
223
|
+
returning(): Promise<unknown[]>;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
delete(table: PgTable): {
|
|
228
|
+
where(condition: QueryCondition): Promise<unknown>;
|
|
229
|
+
};
|
|
230
|
+
select(selection?: Record<string, unknown>): {
|
|
231
|
+
from(table: PgTable): SelectQuery;
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Opaque transaction handle that external callers can thread into
|
|
236
|
+
* pipeline write functions to make a sequence of writes atomic.
|
|
237
|
+
*
|
|
238
|
+
* Today only `deleteDocument` accepts a `{ tx }` option (used by
|
|
239
|
+
* `wipeSeededContent` so a multi-row wipe rolls back as a unit on
|
|
240
|
+
* failure). Callers obtain a handle by wrapping their batch in
|
|
241
|
+
* Drizzle's `db.transaction(async (tx) => { … })`; the `tx` value
|
|
242
|
+
* passed to the callback IS the handle to thread on through.
|
|
243
|
+
*
|
|
244
|
+
* The shape is intentionally minimal — just the Drizzle methods
|
|
245
|
+
* the pipeline actually uses — to keep external code from poking
|
|
246
|
+
* Drizzle internals and to leave room for swapping the backing
|
|
247
|
+
* implementation if `getDb()` ever moves off Drizzle.
|
|
248
|
+
*/
|
|
249
|
+
type NpTransaction = DrizzleTransactionLike;
|
|
250
|
+
/**
|
|
251
|
+
* Wrap a callback in a "deferred post-commit" scope. Any
|
|
252
|
+
* `runPostCommit` calls made during the callback queue their work
|
|
253
|
+
* instead of firing. After the callback resolves successfully,
|
|
254
|
+
* queued hooks drain in FIFO order — each wrapped in its own
|
|
255
|
+
* try/catch (failures are logged, never surfaced to the caller,
|
|
256
|
+
* subsequent hooks still fire). If the callback throws, the queue
|
|
257
|
+
* is discarded and hooks never run.
|
|
258
|
+
*
|
|
259
|
+
* Use this around batch operations that pair an outer transaction
|
|
260
|
+
* with per-row post-commit side-effects — the reseed POST handler
|
|
261
|
+
* is the motivating case: wipe + setActiveThemeId + seed run inside
|
|
262
|
+
* one `db.transaction`; without deferral the per-row
|
|
263
|
+
* `content:afterDelete` / `content:afterSave` hooks would fire
|
|
264
|
+
* during the tx (committing audit log writes and pg-boss job
|
|
265
|
+
* inserts through separate connections) even if the tx later
|
|
266
|
+
* rolls back, leaving ghost entries that don't match the final DB
|
|
267
|
+
* state. With deferral the queue drains only after commit and
|
|
268
|
+
* vanishes on rollback.
|
|
269
|
+
*
|
|
270
|
+
* Re-entrant: nested calls run their inner queue independently;
|
|
271
|
+
* the inner queue drains when the inner callback resolves, before
|
|
272
|
+
* control returns to the outer.
|
|
273
|
+
*/
|
|
274
|
+
declare function withDeferredPostCommit<T>(callback: () => Promise<T>): Promise<T>;
|
|
205
275
|
declare function saveDocument(collection: string, docId: string | null, data: Record<string, unknown>, user: NpAuthUser, options?: NpSaveOptions): Promise<NpSaveResult>;
|
|
206
276
|
/**
|
|
207
277
|
* Member-side document create. Only valid when
|
|
@@ -253,7 +323,9 @@ declare function autosaveRevision(collection: string, documentId: string, data:
|
|
|
253
323
|
createdAt: Date;
|
|
254
324
|
reused: boolean;
|
|
255
325
|
}>;
|
|
256
|
-
declare function deleteDocument(collection: string, docId: string, user: NpAuthUser
|
|
326
|
+
declare function deleteDocument(collection: string, docId: string, user: NpAuthUser, options?: {
|
|
327
|
+
tx?: NpTransaction;
|
|
328
|
+
}): Promise<void>;
|
|
257
329
|
/**
|
|
258
330
|
* Member-side delete. Owner-only — the existing row's
|
|
259
331
|
* `member_author_id` must match the caller. Fires
|
|
@@ -504,9 +576,6 @@ declare function getSearchAdapter(): NpSearchAdapter | null;
|
|
|
504
576
|
/** Reset to no adapter. Tests use this between cases. */
|
|
505
577
|
declare function resetSearchAdapter(): void;
|
|
506
578
|
|
|
507
|
-
declare function buildZodSchema(fields: NpFieldConfig[]): z.ZodObject<Record<string, z.ZodTypeAny>>;
|
|
508
|
-
declare function getCollectionZodSchema(config: NpCollectionConfig): z.ZodSchema;
|
|
509
|
-
|
|
510
579
|
interface TranslationRow {
|
|
511
580
|
id: string;
|
|
512
581
|
locale: string;
|
|
@@ -588,6 +657,15 @@ declare function getTranslationProgress(): Promise<NpTranslationProgress | null>
|
|
|
588
657
|
interface NpThemeColors {
|
|
589
658
|
primary: string;
|
|
590
659
|
primaryForeground: string;
|
|
660
|
+
/**
|
|
661
|
+
* Soft / tinted variant of `primary` — used for backgrounds
|
|
662
|
+
* behind links and accent regions. Optional; themes that omit
|
|
663
|
+
* it inherit a CSS-side `color-mix(in oklab, var(--np-color-primary) 10%, transparent)`
|
|
664
|
+
* fallback wherever the var is referenced. The framework still
|
|
665
|
+
* emits the var when a value is set so themes can pick a
|
|
666
|
+
* branded tint rather than the algorithmic mix.
|
|
667
|
+
*/
|
|
668
|
+
primarySoft?: string;
|
|
591
669
|
background: string;
|
|
592
670
|
foreground: string;
|
|
593
671
|
muted: string;
|
|
@@ -983,8 +1061,16 @@ declare function getActiveTheme(): Promise<NpRegisteredTheme | null>;
|
|
|
983
1061
|
* an admin can't pick a string that doesn't resolve to anything
|
|
984
1062
|
* (which would silently fall back to the default and confuse
|
|
985
1063
|
* the operator).
|
|
1064
|
+
*
|
|
1065
|
+
* Accepts an optional outer transaction so the active-theme flip
|
|
1066
|
+
* can sit inside the same atomic scope as a wipe + seed batch
|
|
1067
|
+
* (see `wipeSeededContent` / `seedAll`'s `tx` option). Without
|
|
1068
|
+
* an outer tx, the write runs against the pool handle and
|
|
1069
|
+
* commits standalone.
|
|
986
1070
|
*/
|
|
987
|
-
declare function setActiveThemeId(id: string, updatedBy?: string | null
|
|
1071
|
+
declare function setActiveThemeId(id: string, updatedBy?: string | null, options?: {
|
|
1072
|
+
tx?: unknown;
|
|
1073
|
+
}): Promise<void>;
|
|
988
1074
|
/**
|
|
989
1075
|
* Phase 11.3 — surface the active theme's templates for a
|
|
990
1076
|
* given collection so admin pickers and the catch-all renderer
|
|
@@ -2060,4 +2146,4 @@ declare function checkNexpressCompat(manifest: {
|
|
|
2060
2146
|
};
|
|
2061
2147
|
}, framework?: string): NexpressCompatResult;
|
|
2062
2148
|
|
|
2063
|
-
export { type CreateSiteInput, DEFAULT_THEME, LocalStorageAdapter, NP_DEFAULT_SITE_ID, type NexpressCompatResult, NoopEmailAdapter, NpAuthError, NpAuthUser, NpCollectionConfig, type NpCollectionTranslationProgress, NpConfig, NpConflictError, type NpDeleteSiteOptions, type NpEmailAdapter, type NpEmailMessage, type NpEmailTemplate, NpError, type NpErrorCode, type NpErrorCodeInput, NpFeedEntry, NpFieldConfig, NpFileMetadata, NpFindOptions, NpFindResult, NpForbiddenError, type NpListPendingDocsOptions, type NpListPendingDocsResult, NpNavItem, NpNotFoundError, type NpPasswordResetTemplateData, type NpPendingDocSummary, NpPluginConfig, type NpPluginConfigResult, type NpPluginState, type NpPluginStateUpdate, NpRateLimitError, NpRegisteredTheme, type NpRevision, type NpRevisionListOptions, type NpRevisionListResult, type NpRevisionStatus, type NpRevisionSummary, NpSaveOptions, NpSaveResult, type NpSearchAdapter, type NpSearchAdapterContext, type NpSearchVectorParts, type NpSite, NpSiteContextMissingError, type NpSiteUsage, NpSitemapEntry, NpStorageAdapter, type NpThemeColors, NpThemeFieldRequirement, NpThemeManifest, type NpThemeNavLocationDescriptor, type NpThemeRequirementMissingField, type NpThemeRequirementRelationConflict, type NpThemeRequirementResult, type NpThemeRequirementTypeConflict, type NpThemeSeoHooksExtracted, type NpThemeSettingsArrayField, type NpThemeSettingsBooleanField, type NpThemeSettingsColorField, type NpThemeSettingsEnumField, type NpThemeSettingsField, type NpThemeSettingsNumberField, type NpThemeSettingsObjectField, type NpThemeSettingsResult, type NpThemeSettingsTextField, type NpThemeSettingsTextareaField, type NpThemeSettingsUnsupportedField, type NpThemeSettingsUrlField, type NpThemeShape, type NpThemeTemplateSummary, type NpThemeTokens, type NpThemeTokensOverlay, type NpThemeTypography, type NpTranslationProgress, type NpTranslationProgressLocaleStats, NpUserRole, NpValidationError, type PluginAdminExtension, type PluginHookHandler, type PluginPageRouteEntry, type PluginRouteHandler, type PluginRouteRequest, type PluginRouteResponse, type PublishScheduledResult, type ReindexResult, type ResolvedCollectionTab, type ResolvedDashboardWidget, S3StorageAdapter, type SearchCollectionsOptions, type SearchResult, type SearchResultItem, type SiteMembership, SmtpEmailAdapter, type SmtpEmailAdapterOptions, activeThemeContributesSeo, autosaveRevision, buildInviteEmail, buildResetEmail, buildSearchVector, buildSearchVectorParts, buildWeightedSearchVectorSql,
|
|
2149
|
+
export { type CreateSiteInput, DEFAULT_THEME, LocalStorageAdapter, NP_DEFAULT_SITE_ID, type NexpressCompatResult, NoopEmailAdapter, NpAuthError, NpAuthUser, NpCollectionConfig, type NpCollectionTranslationProgress, NpConfig, NpConflictError, type NpDeleteSiteOptions, type NpEmailAdapter, type NpEmailMessage, type NpEmailTemplate, NpError, type NpErrorCode, type NpErrorCodeInput, NpFeedEntry, NpFieldConfig, NpFileMetadata, NpFindOptions, NpFindResult, NpForbiddenError, type NpListPendingDocsOptions, type NpListPendingDocsResult, NpNavItem, NpNotFoundError, type NpPasswordResetTemplateData, type NpPendingDocSummary, NpPluginConfig, type NpPluginConfigResult, type NpPluginState, type NpPluginStateUpdate, NpRateLimitError, NpRegisteredTheme, type NpRevision, type NpRevisionListOptions, type NpRevisionListResult, type NpRevisionStatus, type NpRevisionSummary, NpSaveOptions, NpSaveResult, type NpSearchAdapter, type NpSearchAdapterContext, type NpSearchVectorParts, type NpSite, NpSiteContextMissingError, type NpSiteUsage, NpSitemapEntry, NpStorageAdapter, type NpThemeColors, NpThemeFieldRequirement, NpThemeManifest, type NpThemeNavLocationDescriptor, type NpThemeRequirementMissingField, type NpThemeRequirementRelationConflict, type NpThemeRequirementResult, type NpThemeRequirementTypeConflict, type NpThemeSeoHooksExtracted, type NpThemeSettingsArrayField, type NpThemeSettingsBooleanField, type NpThemeSettingsColorField, type NpThemeSettingsEnumField, type NpThemeSettingsField, type NpThemeSettingsNumberField, type NpThemeSettingsObjectField, type NpThemeSettingsResult, type NpThemeSettingsTextField, type NpThemeSettingsTextareaField, type NpThemeSettingsUnsupportedField, type NpThemeSettingsUrlField, type NpThemeShape, type NpThemeTemplateSummary, type NpThemeTokens, type NpThemeTokensOverlay, type NpThemeTypography, type NpTransaction, type NpTranslationProgress, type NpTranslationProgressLocaleStats, NpUserRole, NpValidationError, type PluginAdminExtension, type PluginHookHandler, type PluginPageRouteEntry, type PluginRouteHandler, type PluginRouteRequest, type PluginRouteResponse, type PublishScheduledResult, type ReindexResult, type ResolvedCollectionTab, type ResolvedDashboardWidget, S3StorageAdapter, type SearchCollectionsOptions, type SearchResult, type SearchResultItem, type SiteMembership, SmtpEmailAdapter, type SmtpEmailAdapterOptions, activeThemeContributesSeo, autosaveRevision, buildInviteEmail, buildResetEmail, buildSearchVector, buildSearchVectorParts, buildWeightedSearchVectorSql, checkNexpressCompat, checkThemeRequirements, collectionConfigSchema, compareSemver, createMemberDocument, createSite, createStorageAdapter, createTranslation, defineCollection, defineConfig, deleteDocument, deleteMemberDocument, deleteSite, dispatchPluginAction, ensureDefaultSite, extractErrorComponent, extractMembersNotFoundComponent, extractNotFoundComponent, extractSeoHooks, findDocuments, findPosts, findSlugRedirect, findTranslations, getActiveTheme, getActiveThemeError, getActiveThemeId, getActiveThemeMembersNotFound, getActiveThemeNavLocations, getActiveThemeNotFound, getActiveThemeSeoHooks, getAllCollectionSlugs, getAllPageSlugs, getAllPluginIds, getCollectionConfig, getCollectionRegistration, getCollectionTable, getCollectionTabsForSlug, getCurrentSiteId, getDashboardWidgetsFromPlugins, getDefaultSite, getDocumentById, getEmailAdapter, getFrameworkVersion, getMembership, getNavigation, getPageBySlug, getPluginAdminExtension, getPluginConfig, getPluginConfigWithStatus, getPluginPageRoutes, getPluginRegistration, getPluginRoutes, getPluginState, getPluginTemplatesForCollection, getPostBySlug, getRegisteredPluginSchedules, getRegisteredThemes, getRevision, getSearchAdapter, getSetting, getSiteByHostname, getSiteById, getSiteUsageSummary, getTheme, getThemeById, getThemeSettings, getThemeSettingsWithStatus, getThemeTemplateSummaries, getTranslationProgress, grantSiteMembership, hasRoleOnSite, introspectThemeSettingsSchema, invalidatePluginEnabled, isPluginEnabled, isSuperAdmin, listMembershipsForUser, listPendingMemberDocs, listPluginStates, listRevisions, listSiteMemberships, listSites, loadPlugins, mergeThemeRequirements, npConfigSchema, pluginConfigCacheTag, promoteMemberDocument, publishScheduledDocuments, registerCollection, registerPluginTemplates, registerThemes, reindexCollection, resetCurrentSiteResolver, resetEmailAdapter, resetPluginTemplates, resetPlugins, resetSearchAdapter, resetThemes, resolveSiteForHostname, resolveTemplateComponent, resolveUserRoleOnSite, restoreRevision, revokeSiteMembership, runHook, runHookAndCollect, runPluginScheduledTask, sanitizeTokenValue, saveDocument, schedulePluginTask, searchCollections, setActiveThemeId, setCurrentSiteResolver, setEmailAdapter, setPluginConfig, setSearchAdapter, setSuperAdmin, setThemeSettings, syncPluginRegistrations, updateMemberDocument, updatePluginState, updateSite, withCurrentSite, withDeferredPostCommit };
|