@memberjunction/core-actions 5.36.0 → 5.38.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/README.md +19 -1
- package/dist/custom/data/run-adhoc-query.action.d.ts +14 -1
- package/dist/custom/data/run-adhoc-query.action.d.ts.map +1 -1
- package/dist/custom/data/run-adhoc-query.action.js +27 -12
- package/dist/custom/data/run-adhoc-query.action.js.map +1 -1
- package/dist/custom/interactive-forms/_shared.d.ts +144 -0
- package/dist/custom/interactive-forms/_shared.d.ts.map +1 -0
- package/dist/custom/interactive-forms/_shared.js +300 -0
- package/dist/custom/interactive-forms/_shared.js.map +1 -0
- package/dist/custom/interactive-forms/activate-interactive-form-version.action.d.ts +31 -0
- package/dist/custom/interactive-forms/activate-interactive-form-version.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/activate-interactive-form-version.action.js +139 -0
- package/dist/custom/interactive-forms/activate-interactive-form-version.action.js.map +1 -0
- package/dist/custom/interactive-forms/create-interactive-form.action.d.ts +32 -0
- package/dist/custom/interactive-forms/create-interactive-form.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/create-interactive-form.action.js +162 -0
- package/dist/custom/interactive-forms/create-interactive-form.action.js.map +1 -0
- package/dist/custom/interactive-forms/get-active-form-for-entity.action.d.ts +46 -0
- package/dist/custom/interactive-forms/get-active-form-for-entity.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/get-active-form-for-entity.action.js +179 -0
- package/dist/custom/interactive-forms/get-active-form-for-entity.action.js.map +1 -0
- package/dist/custom/interactive-forms/get-default-form-scaffold.action.d.ts +32 -0
- package/dist/custom/interactive-forms/get-default-form-scaffold.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/get-default-form-scaffold.action.js +87 -0
- package/dist/custom/interactive-forms/get-default-form-scaffold.action.js.map +1 -0
- package/dist/custom/interactive-forms/get-entity-schema-for-form.action.d.ts +34 -0
- package/dist/custom/interactive-forms/get-entity-schema-for-form.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/get-entity-schema-for-form.action.js +103 -0
- package/dist/custom/interactive-forms/get-entity-schema-for-form.action.js.map +1 -0
- package/dist/custom/interactive-forms/index.d.ts +8 -0
- package/dist/custom/interactive-forms/index.d.ts.map +1 -0
- package/dist/custom/interactive-forms/index.js +8 -0
- package/dist/custom/interactive-forms/index.js.map +1 -0
- package/dist/custom/interactive-forms/modify-interactive-form.action.d.ts +54 -0
- package/dist/custom/interactive-forms/modify-interactive-form.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/modify-interactive-form.action.js +300 -0
- package/dist/custom/interactive-forms/modify-interactive-form.action.js.map +1 -0
- package/dist/custom/interactive-forms/revert-interactive-form.action.d.ts +39 -0
- package/dist/custom/interactive-forms/revert-interactive-form.action.d.ts.map +1 -0
- package/dist/custom/interactive-forms/revert-interactive-form.action.js +155 -0
- package/dist/custom/interactive-forms/revert-interactive-form.action.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +34 -32
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { BaseAction } from "@memberjunction/actions";
|
|
8
|
+
import { Metadata, LogError } from "@memberjunction/core";
|
|
9
|
+
import { RegisterClass } from "@memberjunction/global";
|
|
10
|
+
import { addOutput, bumpVersion, checkOverrideOwnership, failure, getStringParam, insertComponent, insertOverride, lintFormSpec, loadComponent, loadOverride, mapToComponentStatus, parseSpecParam, parseVersionBumpKind, } from "./_shared.js";
|
|
11
|
+
/**
|
|
12
|
+
* Modify an existing interactive-form override.
|
|
13
|
+
*
|
|
14
|
+
* Behavior is driven by the **`VersionBumpKind` input** and the **source
|
|
15
|
+
* Override's status** (Override is the canonical "is this live" signal —
|
|
16
|
+
* Component.Status can drift independently):
|
|
17
|
+
*
|
|
18
|
+
* | Source Status | VersionBumpKind | Behavior |
|
|
19
|
+
* |---------------|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
20
|
+
* | Pending | `in-place` (default) | Overwrite the existing Pending Component row in place. No new version. Iteration-loop behavior. |
|
|
21
|
+
* | Pending | `patch` / `minor` / `major` | **Demote** the existing Pending → Inactive, then insert a new Pending Component v(bumped) + new Pending Override pointing at it. Creates rollback. |
|
|
22
|
+
* | Active | `in-place` | **Rejected** — would corrupt the live Active row. Returns `INVALID_BUMP_FOR_STATUS`. |
|
|
23
|
+
* | Active | `patch` / `minor` (default) / `major` | Insert new Pending Component v(bumped) + new Pending Override. Active is untouched — user explicitly Activates later. |
|
|
24
|
+
* | Inactive | `in-place` | **Rejected** — overwriting a dead row achieves nothing. Use 'Revert Interactive Form' to re-activate first, or supply a bump kind. |
|
|
25
|
+
* | Inactive | `patch` (default) / `minor` / `major` | Branch-from-historical. Insert new Pending Component v(bumped) sourced from this Inactive spec. The Inactive source is left alone (already historical). |
|
|
26
|
+
*
|
|
27
|
+
* **Defaults** preserve historical behavior: omit `VersionBumpKind` and
|
|
28
|
+
* Pending sources stay in-place, Active sources bump minor, Inactive
|
|
29
|
+
* sources bump patch (the conservative branch-from-historical case).
|
|
30
|
+
*
|
|
31
|
+
* **Security clamp.** Modify *always* writes a User-scope Pending Override,
|
|
32
|
+
* regardless of the original override's scope. Even if the caller is
|
|
33
|
+
* modifying a Role-scope or Global override (which they have permission to
|
|
34
|
+
* read because they pass the ownership check), the new Pending sibling
|
|
35
|
+
* is always User-scoped to the calling user. Scope promotion (User → Role
|
|
36
|
+
* → Global) is a separate, deliberate human action with its own permission
|
|
37
|
+
* gate in Component Studio / Form Builder. The agent cannot widen scope
|
|
38
|
+
* through Modify any more than through Create.
|
|
39
|
+
*
|
|
40
|
+
* **Ownership check.** The caller must own (or have role membership for, or
|
|
41
|
+
* be admin over) the existing override they're modifying. See
|
|
42
|
+
* `checkOverrideOwnership` in `_shared.ts`. Returns FORBIDDEN if rejected.
|
|
43
|
+
*
|
|
44
|
+
* Inputs:
|
|
45
|
+
* - `OverrideID` (required, string) — the override to modify
|
|
46
|
+
* - `Spec` (required, ComponentSpec | string) — the new form spec
|
|
47
|
+
* - `Notes` (optional, string) — appended to the override's Notes column
|
|
48
|
+
* - `VersionBumpKind` (optional, 'in-place' | 'patch' | 'minor' | 'major') — see table above
|
|
49
|
+
*
|
|
50
|
+
* Outputs:
|
|
51
|
+
* - `ComponentID` — the Component row that now holds the spec (new for snapshots, same for in-place)
|
|
52
|
+
* - `OverrideID` — the Override row that points at it
|
|
53
|
+
* - `Mode` — 'in-place' or 'new-version'
|
|
54
|
+
* - `Version` — the Component's resulting Version string
|
|
55
|
+
*/
|
|
56
|
+
let ModifyInteractiveFormAction = class ModifyInteractiveFormAction extends BaseAction {
|
|
57
|
+
async InternalRunAction(params) {
|
|
58
|
+
try {
|
|
59
|
+
const overrideID = getStringParam(params, "OverrideID");
|
|
60
|
+
if (!overrideID) {
|
|
61
|
+
return failure("MISSING_PARAMETER", "Parameter 'OverrideID' is required.");
|
|
62
|
+
}
|
|
63
|
+
const specRaw = this.findParam(params, "Spec");
|
|
64
|
+
if (specRaw == null) {
|
|
65
|
+
return failure("MISSING_PARAMETER", "Parameter 'Spec' is required.");
|
|
66
|
+
}
|
|
67
|
+
const parsed = parseSpecParam(specRaw);
|
|
68
|
+
if ('error' in parsed) {
|
|
69
|
+
return failure("LINT_FAILED", `Spec is not valid JSON: ${parsed.error}`);
|
|
70
|
+
}
|
|
71
|
+
const spec = parsed;
|
|
72
|
+
const notes = getStringParam(params, "Notes");
|
|
73
|
+
const provider = params.Provider ?? Metadata.Provider;
|
|
74
|
+
if (!provider)
|
|
75
|
+
return failure("NO_PROVIDER", "No metadata provider available.");
|
|
76
|
+
const user = params.ContextUser;
|
|
77
|
+
if (!user)
|
|
78
|
+
return failure("NO_USER", "Action requires a ContextUser.");
|
|
79
|
+
const override = await loadOverride(provider, user, overrideID);
|
|
80
|
+
if (!override) {
|
|
81
|
+
return failure("OVERRIDE_NOT_FOUND", `EntityFormOverride '${overrideID}' not found.`);
|
|
82
|
+
}
|
|
83
|
+
// Defense-in-depth ownership check — see _shared.ts.
|
|
84
|
+
const ownershipFail = checkOverrideOwnership(override, user);
|
|
85
|
+
if (ownershipFail)
|
|
86
|
+
return ownershipFail;
|
|
87
|
+
const existingComponent = await loadComponent(provider, user, override.ComponentID);
|
|
88
|
+
if (!existingComponent) {
|
|
89
|
+
return failure("COMPONENT_NOT_FOUND", `Override ${overrideID} points at Component ${override.ComponentID} which no longer exists.`);
|
|
90
|
+
}
|
|
91
|
+
// Lineage identity guard. Component lineage is collapsed by Name
|
|
92
|
+
// in the Form Builder version rail — different Name = different
|
|
93
|
+
// lineage, no rollback link between them. The agent must NOT
|
|
94
|
+
// rename across Modify calls (e.g. sanitizing "Contemporary AI
|
|
95
|
+
// Models Form" → "ContemporaryAIModelsForm" to satisfy
|
|
96
|
+
// component-name-mismatch lint silently forks the user's form
|
|
97
|
+
// into a phantom new lineage). Reject mismatches with a clear
|
|
98
|
+
// error so the agent retries with the right name. The function
|
|
99
|
+
// name inside spec.code MUST match spec.name (enforced by
|
|
100
|
+
// component-name-mismatch lint) — keep spec.name pinned to the
|
|
101
|
+
// existing Component.Name and sanitize the function name to
|
|
102
|
+
// match, never the other way around.
|
|
103
|
+
if (spec.name && spec.name !== existingComponent.Name) {
|
|
104
|
+
return failure("LINEAGE_NAME_MISMATCH", `Modify requires spec.name to match the existing Component name '${existingComponent.Name}', got '${spec.name}'. Modify operates on a Component lineage — its identity is the Name and cannot change between versions. Update spec.name and the function declaration in spec.code to '${existingComponent.Name}' and retry. (If the user wants a renamed form, that's a Create on the new entity or a manual rename in Form Builder, not a Modify.)`);
|
|
105
|
+
}
|
|
106
|
+
// Pin Name and Title to the existing row regardless — covers
|
|
107
|
+
// the case where the agent omitted spec.name entirely.
|
|
108
|
+
spec.name = existingComponent.Name;
|
|
109
|
+
if (existingComponent.Title && !spec.title)
|
|
110
|
+
spec.title = existingComponent.Title;
|
|
111
|
+
// Lint AFTER the lineage guard so any name/title pinning is
|
|
112
|
+
// visible to the linter (function-name match, etc.).
|
|
113
|
+
const lintFail = await lintFormSpec(spec, user);
|
|
114
|
+
if (lintFail)
|
|
115
|
+
return lintFail;
|
|
116
|
+
// Resolve VersionBumpKind: explicit param wins; otherwise default
|
|
117
|
+
// by source status to preserve historical behavior — Pending →
|
|
118
|
+
// in-place (iteration loop), Active → minor (snapshot).
|
|
119
|
+
//
|
|
120
|
+
// Route off the OVERRIDE's status, not the Component's. The Override
|
|
121
|
+
// is what determines whether a form is live; Component.Status can
|
|
122
|
+
// drift independently (manual edits, partial activations) and using
|
|
123
|
+
// it for routing risks demoting an Active override on the assumption
|
|
124
|
+
// it's a Pending iteration.
|
|
125
|
+
const overrideStatus = override.Status ?? 'Pending';
|
|
126
|
+
const sourceStatus = overrideStatus === 'Active' ? 'Active' :
|
|
127
|
+
overrideStatus === 'Pending' ? 'Pending' : 'Inactive';
|
|
128
|
+
const isPendingSource = sourceStatus === 'Pending';
|
|
129
|
+
const rawKind = getStringParam(params, "VersionBumpKind");
|
|
130
|
+
let bumpKind;
|
|
131
|
+
if (rawKind) {
|
|
132
|
+
const parsed = parseVersionBumpKind(rawKind);
|
|
133
|
+
if (!parsed) {
|
|
134
|
+
return failure("INVALID_BUMP_KIND", `Unknown VersionBumpKind '${rawKind}'. Expected one of: 'in-place', 'patch', 'minor', 'major'.`);
|
|
135
|
+
}
|
|
136
|
+
bumpKind = parsed;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
// Default behavior by source status. Inactive defaults to
|
|
140
|
+
// 'patch' (the conservative branch-from-historical case);
|
|
141
|
+
// any explicit kind still wins above.
|
|
142
|
+
bumpKind = isPendingSource ? 'in-place' : (sourceStatus === 'Inactive' ? 'patch' : 'minor');
|
|
143
|
+
}
|
|
144
|
+
// 'in-place' is only meaningful against a Pending source — it
|
|
145
|
+
// overwrites the iteration's Spec on the same row. Against
|
|
146
|
+
// Active (would clobber live) or Inactive (overwriting a dead
|
|
147
|
+
// row achieves nothing — won't re-activate it; use Revert for
|
|
148
|
+
// that) we reject loudly so the caller corrects intent.
|
|
149
|
+
if (bumpKind === 'in-place' && !isPendingSource) {
|
|
150
|
+
return failure("INVALID_BUMP_FOR_STATUS", `'in-place' is only valid against a Pending Override (got Status='${overrideStatus}'). Use 'patch', 'minor', or 'major' to snapshot a new Pending version from this source; use 'Revert Interactive Form' to re-activate an Inactive historical version.`);
|
|
151
|
+
}
|
|
152
|
+
if (bumpKind === 'in-place') {
|
|
153
|
+
// ── in-place modify of the Pending Component ─────────────
|
|
154
|
+
existingComponent.Specification = JSON.stringify(spec);
|
|
155
|
+
// Refresh Title/Description if the new spec moves them.
|
|
156
|
+
if (spec.title)
|
|
157
|
+
existingComponent.Title = spec.title;
|
|
158
|
+
if (spec.description)
|
|
159
|
+
existingComponent.Description = spec.description;
|
|
160
|
+
const saved = await existingComponent.Save();
|
|
161
|
+
if (!saved) {
|
|
162
|
+
return failure("PERSIST_FAILED", `Component in-place update failed: ${existingComponent.LatestResult?.CompleteMessage ?? 'unknown error'}`);
|
|
163
|
+
}
|
|
164
|
+
if (notes) {
|
|
165
|
+
// Append a line of human-readable notes. The Notes column
|
|
166
|
+
// accepts NVARCHAR(MAX), so this scales.
|
|
167
|
+
const existingNotes = override.Notes ?? '';
|
|
168
|
+
override.Notes = existingNotes
|
|
169
|
+
? `${existingNotes}\n${notes}`
|
|
170
|
+
: notes;
|
|
171
|
+
await override.Save();
|
|
172
|
+
}
|
|
173
|
+
addOutput(params, "ComponentID", existingComponent.ID);
|
|
174
|
+
addOutput(params, "OverrideID", override.ID);
|
|
175
|
+
addOutput(params, "Mode", "in-place");
|
|
176
|
+
addOutput(params, "Version", existingComponent.Version);
|
|
177
|
+
return {
|
|
178
|
+
Success: true, ResultCode: "SUCCESS",
|
|
179
|
+
Message: JSON.stringify({
|
|
180
|
+
Mode: 'in-place',
|
|
181
|
+
ComponentID: existingComponent.ID,
|
|
182
|
+
OverrideID: override.ID,
|
|
183
|
+
Version: existingComponent.Version,
|
|
184
|
+
}),
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
// ── new-version path: snapshot to a new Pending Component +
|
|
188
|
+
// sibling Override. Works for Active sources (preserves the
|
|
189
|
+
// live Active row), Pending sources (where we demote the existing
|
|
190
|
+
// Pending → Inactive to keep the rollback history without producing
|
|
191
|
+
// two concurrent Pendings), and Inactive sources (branch-from-
|
|
192
|
+
// historical — no demote needed since source is already Inactive,
|
|
193
|
+
// and the user explicitly opened it to fork from there).
|
|
194
|
+
const newVersion = bumpVersion(existingComponent.Version, bumpKind);
|
|
195
|
+
const newSequence = (existingComponent.VersionSequence ?? 0) + 1;
|
|
196
|
+
const componentInsert = await insertComponent({
|
|
197
|
+
provider, user, spec,
|
|
198
|
+
fallbackName: existingComponent.Name,
|
|
199
|
+
description: existingComponent.Description,
|
|
200
|
+
version: newVersion,
|
|
201
|
+
versionSequence: newSequence,
|
|
202
|
+
componentStatus: 'Pending',
|
|
203
|
+
});
|
|
204
|
+
if ('error' in componentInsert)
|
|
205
|
+
return componentInsert.error;
|
|
206
|
+
const newComponentID = componentInsert.id;
|
|
207
|
+
// New Pending Override at the same scope as the existing one. We
|
|
208
|
+
// do not widen scope: if existing is User-scoped, new is too. If
|
|
209
|
+
// somehow existing is Role/Global (manual promotion), we still
|
|
210
|
+
// honor that — Modify is a content change, not a scope change.
|
|
211
|
+
const overrideInsert = await insertOverride({
|
|
212
|
+
provider, user,
|
|
213
|
+
entityID: override.EntityID,
|
|
214
|
+
componentID: newComponentID,
|
|
215
|
+
name: override.Name,
|
|
216
|
+
description: override.Description,
|
|
217
|
+
notes,
|
|
218
|
+
status: 'Pending',
|
|
219
|
+
priority: override.Priority,
|
|
220
|
+
});
|
|
221
|
+
if ('error' in overrideInsert) {
|
|
222
|
+
return failure("PERSIST_FAILED", `${overrideInsert.error.Message} (Component ${newComponentID} was persisted; its sibling override row failed to write.)`);
|
|
223
|
+
}
|
|
224
|
+
// Demote the prior Pending source — both the Component row and
|
|
225
|
+
// its Override row — to Inactive. This preserves the rollback
|
|
226
|
+
// history (the row stays in the version rail and can be
|
|
227
|
+
// re-Activated later) without leaving two concurrent Pendings
|
|
228
|
+
// for the same lineage. Failures here are non-fatal: the new
|
|
229
|
+
// version is already persisted, so we log and continue rather
|
|
230
|
+
// than tearing down what we just wrote.
|
|
231
|
+
let demotedComponentID = null;
|
|
232
|
+
let demotedOverrideID = null;
|
|
233
|
+
if (isPendingSource) {
|
|
234
|
+
// Component table uses 'Draft'/'Published'/'Deprecated' —
|
|
235
|
+
// map our 'Inactive' lifecycle to the table's 'Deprecated'.
|
|
236
|
+
try {
|
|
237
|
+
existingComponent.Status = mapToComponentStatus('Inactive');
|
|
238
|
+
const ok = await existingComponent.Save();
|
|
239
|
+
if (ok)
|
|
240
|
+
demotedComponentID = existingComponent.ID;
|
|
241
|
+
else
|
|
242
|
+
LogError(`ModifyInteractiveFormAction: failed to demote prior Pending Component ${existingComponent.ID}: ${existingComponent.LatestResult?.CompleteMessage ?? 'unknown error'}`);
|
|
243
|
+
}
|
|
244
|
+
catch (err) {
|
|
245
|
+
LogError(`ModifyInteractiveFormAction: error demoting prior Pending Component ${existingComponent.ID}: ${err instanceof Error ? err.message : String(err)}`);
|
|
246
|
+
}
|
|
247
|
+
try {
|
|
248
|
+
override.Status = 'Inactive';
|
|
249
|
+
const ok = await override.Save();
|
|
250
|
+
if (ok)
|
|
251
|
+
demotedOverrideID = override.ID;
|
|
252
|
+
else
|
|
253
|
+
LogError(`ModifyInteractiveFormAction: failed to demote prior Pending Override ${override.ID}: ${override.LatestResult?.CompleteMessage ?? 'unknown error'}`);
|
|
254
|
+
}
|
|
255
|
+
catch (err) {
|
|
256
|
+
LogError(`ModifyInteractiveFormAction: error demoting prior Pending Override ${override.ID}: ${err instanceof Error ? err.message : String(err)}`);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
addOutput(params, "ComponentID", newComponentID);
|
|
260
|
+
addOutput(params, "OverrideID", overrideInsert.id);
|
|
261
|
+
addOutput(params, "Mode", "new-version");
|
|
262
|
+
addOutput(params, "Version", newVersion);
|
|
263
|
+
return {
|
|
264
|
+
Success: true, ResultCode: "SUCCESS",
|
|
265
|
+
Message: JSON.stringify({
|
|
266
|
+
Mode: 'new-version',
|
|
267
|
+
ComponentID: newComponentID,
|
|
268
|
+
OverrideID: overrideInsert.id,
|
|
269
|
+
Version: newVersion,
|
|
270
|
+
BumpKind: bumpKind,
|
|
271
|
+
PreviousComponentID: existingComponent.ID,
|
|
272
|
+
PreviousOverrideID: override.ID,
|
|
273
|
+
PreviousSourceStatus: sourceStatus,
|
|
274
|
+
DemotedComponentID: demotedComponentID,
|
|
275
|
+
DemotedOverrideID: demotedOverrideID,
|
|
276
|
+
}),
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
catch (err) {
|
|
280
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
281
|
+
LogError(`ModifyInteractiveFormAction: ${message}`);
|
|
282
|
+
return failure("UNEXPECTED_ERROR", message);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
findParam(params, name) {
|
|
286
|
+
const p = params.Params.find(x => x.Name?.trim().toLowerCase() === name.toLowerCase());
|
|
287
|
+
return p?.Value;
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
ModifyInteractiveFormAction = __decorate([
|
|
291
|
+
RegisterClass(BaseAction, "__ModifyInteractiveForm")
|
|
292
|
+
], ModifyInteractiveFormAction);
|
|
293
|
+
export { ModifyInteractiveFormAction };
|
|
294
|
+
/** Tree-shaking guard. */
|
|
295
|
+
export function LoadModifyInteractiveFormAction() {
|
|
296
|
+
if (false) {
|
|
297
|
+
const _ = ModifyInteractiveFormAction;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
//# sourceMappingURL=modify-interactive-form.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modify-interactive-form.action.js","sourceRoot":"","sources":["../../../src/custom/interactive-forms/modify-interactive-form.action.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EACH,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,OAAO,EAAE,cAAc,EACvE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAC1E,oBAAoB,EAAE,cAAc,EAAE,oBAAoB,GAE7D,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,UAAU;IAE7C,KAAK,CAAC,iBAAiB,CAAC,MAAuB;QACrD,IAAI,CAAC;YACD,MAAM,UAAU,GAAG,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;YACxD,IAAI,CAAC,UAAU,EAAE,CAAC;gBACd,OAAO,OAAO,CAAC,mBAAmB,EAAE,qCAAqC,CAAC,CAAC;YAC/E,CAAC;YACD,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC/C,IAAI,OAAO,IA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B;IAC3C,IAAI,KAAgB,EAAE,CAAC;QACnB,MAAM,CAAC,GAAY,2BAA2B,CAAC;IACnD,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ActionResultSimple, RunActionParams } from "@memberjunction/actions-base";
|
|
2
|
+
import { BaseAction } from "@memberjunction/actions";
|
|
3
|
+
/**
|
|
4
|
+
* Revert the user's Active override to an older Component version. Pure
|
|
5
|
+
* re-point: no new Component is created, no new Override row is created.
|
|
6
|
+
*
|
|
7
|
+
* Behaviour:
|
|
8
|
+
* - Identify the **Active** Override for the (entity, user) — we either
|
|
9
|
+
* take it from the input `ActiveOverrideID` if supplied, or look it up
|
|
10
|
+
* using the target Component's EntityID.
|
|
11
|
+
* - Identify the target Component to revert to — by `TargetComponentID`
|
|
12
|
+
* or by `TargetVersionSequence` (relative to the Component lineage
|
|
13
|
+
* sharing the same Name as the currently-active Component).
|
|
14
|
+
* - Set Active Override's `ComponentID` to the target → save.
|
|
15
|
+
* - Flip the previously-pointed Component to Status='Inactive', target
|
|
16
|
+
* Component to Status='Active'.
|
|
17
|
+
*
|
|
18
|
+
* Old Component rows are never deleted — they remain as immutable history.
|
|
19
|
+
* A subsequent revert can move forward again to any version.
|
|
20
|
+
*
|
|
21
|
+
* Inputs:
|
|
22
|
+
* - `ActiveOverrideID` (required, string) — the Active override to re-point
|
|
23
|
+
* - One of:
|
|
24
|
+
* - `TargetComponentID` (string) — explicit Component to revert to, or
|
|
25
|
+
* - `TargetVersionSequence` (number) — pick the Component with this
|
|
26
|
+
* VersionSequence in the same Name lineage
|
|
27
|
+
*
|
|
28
|
+
* Outputs:
|
|
29
|
+
* - `OverrideID` — echoed
|
|
30
|
+
* - `ComponentID` — the newly-Active component
|
|
31
|
+
* - `PreviousComponentID` — the component we demoted
|
|
32
|
+
* - `Version` — version string of the now-Active component
|
|
33
|
+
*/
|
|
34
|
+
export declare class RevertInteractiveFormAction extends BaseAction {
|
|
35
|
+
protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
|
|
36
|
+
}
|
|
37
|
+
/** Tree-shaking guard. */
|
|
38
|
+
export declare function LoadRevertInteractiveFormAction(): void;
|
|
39
|
+
//# sourceMappingURL=revert-interactive-form.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revert-interactive-form.action.d.ts","sourceRoot":"","sources":["../../../src/custom/interactive-forms/revert-interactive-form.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAOrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBACa,2BAA4B,SAAQ,UAAU;cAEvC,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA8G1F;AAED,0BAA0B;AAC1B,wBAAgB,+BAA+B,IAAI,IAAI,CAItD"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { BaseAction } from "@memberjunction/actions";
|
|
8
|
+
import { Metadata, LogError, RunView } from "@memberjunction/core";
|
|
9
|
+
import { RegisterClass, UUIDsEqual } from "@memberjunction/global";
|
|
10
|
+
import { addOutput, checkOverrideOwnership, failure, getNumberParam, getStringParam, loadComponent, loadOverride, mapToComponentStatus, } from "./_shared.js";
|
|
11
|
+
/**
|
|
12
|
+
* Revert the user's Active override to an older Component version. Pure
|
|
13
|
+
* re-point: no new Component is created, no new Override row is created.
|
|
14
|
+
*
|
|
15
|
+
* Behaviour:
|
|
16
|
+
* - Identify the **Active** Override for the (entity, user) — we either
|
|
17
|
+
* take it from the input `ActiveOverrideID` if supplied, or look it up
|
|
18
|
+
* using the target Component's EntityID.
|
|
19
|
+
* - Identify the target Component to revert to — by `TargetComponentID`
|
|
20
|
+
* or by `TargetVersionSequence` (relative to the Component lineage
|
|
21
|
+
* sharing the same Name as the currently-active Component).
|
|
22
|
+
* - Set Active Override's `ComponentID` to the target → save.
|
|
23
|
+
* - Flip the previously-pointed Component to Status='Inactive', target
|
|
24
|
+
* Component to Status='Active'.
|
|
25
|
+
*
|
|
26
|
+
* Old Component rows are never deleted — they remain as immutable history.
|
|
27
|
+
* A subsequent revert can move forward again to any version.
|
|
28
|
+
*
|
|
29
|
+
* Inputs:
|
|
30
|
+
* - `ActiveOverrideID` (required, string) — the Active override to re-point
|
|
31
|
+
* - One of:
|
|
32
|
+
* - `TargetComponentID` (string) — explicit Component to revert to, or
|
|
33
|
+
* - `TargetVersionSequence` (number) — pick the Component with this
|
|
34
|
+
* VersionSequence in the same Name lineage
|
|
35
|
+
*
|
|
36
|
+
* Outputs:
|
|
37
|
+
* - `OverrideID` — echoed
|
|
38
|
+
* - `ComponentID` — the newly-Active component
|
|
39
|
+
* - `PreviousComponentID` — the component we demoted
|
|
40
|
+
* - `Version` — version string of the now-Active component
|
|
41
|
+
*/
|
|
42
|
+
let RevertInteractiveFormAction = class RevertInteractiveFormAction extends BaseAction {
|
|
43
|
+
async InternalRunAction(params) {
|
|
44
|
+
try {
|
|
45
|
+
const activeOverrideID = getStringParam(params, "ActiveOverrideID");
|
|
46
|
+
if (!activeOverrideID) {
|
|
47
|
+
return failure("MISSING_PARAMETER", "Parameter 'ActiveOverrideID' is required.");
|
|
48
|
+
}
|
|
49
|
+
const targetComponentID = getStringParam(params, "TargetComponentID");
|
|
50
|
+
const targetVersionSequence = getNumberParam(params, "TargetVersionSequence");
|
|
51
|
+
if (!targetComponentID && targetVersionSequence == null) {
|
|
52
|
+
return failure("MISSING_PARAMETER", "Either 'TargetComponentID' or 'TargetVersionSequence' is required.");
|
|
53
|
+
}
|
|
54
|
+
const provider = params.Provider ?? Metadata.Provider;
|
|
55
|
+
if (!provider)
|
|
56
|
+
return failure("NO_PROVIDER", "No metadata provider available.");
|
|
57
|
+
const user = params.ContextUser;
|
|
58
|
+
if (!user)
|
|
59
|
+
return failure("NO_USER", "Action requires a ContextUser.");
|
|
60
|
+
const override = await loadOverride(provider, user, activeOverrideID);
|
|
61
|
+
if (!override) {
|
|
62
|
+
return failure("OVERRIDE_NOT_FOUND", `EntityFormOverride '${activeOverrideID}' not found.`);
|
|
63
|
+
}
|
|
64
|
+
const ownershipFail = checkOverrideOwnership(override, user);
|
|
65
|
+
if (ownershipFail)
|
|
66
|
+
return ownershipFail;
|
|
67
|
+
if (override.Status !== 'Active') {
|
|
68
|
+
return failure("NOT_ACTIVE", `Override ${activeOverrideID} is not Active (current Status=${override.Status}). Reverting only operates on the Active override row.`);
|
|
69
|
+
}
|
|
70
|
+
const currentComponent = await loadComponent(provider, user, override.ComponentID);
|
|
71
|
+
if (!currentComponent) {
|
|
72
|
+
return failure("COMPONENT_NOT_FOUND", `Active override points at Component ${override.ComponentID} which no longer exists.`);
|
|
73
|
+
}
|
|
74
|
+
// Resolve target Component
|
|
75
|
+
let target = null;
|
|
76
|
+
if (targetComponentID) {
|
|
77
|
+
const c = await loadComponent(provider, user, targetComponentID);
|
|
78
|
+
if (!c) {
|
|
79
|
+
return failure("COMPONENT_NOT_FOUND", `TargetComponentID '${targetComponentID}' not found.`);
|
|
80
|
+
}
|
|
81
|
+
// Confirm same lineage (same Name).
|
|
82
|
+
if ((c.Name ?? '') !== (currentComponent.Name ?? '')) {
|
|
83
|
+
return failure("LINEAGE_MISMATCH", `Target Component name '${c.Name}' differs from current '${currentComponent.Name}'. Revert is restricted to the same Name lineage.`);
|
|
84
|
+
}
|
|
85
|
+
target = { ID: c.ID, Version: c.Version };
|
|
86
|
+
}
|
|
87
|
+
else if (targetVersionSequence != null) {
|
|
88
|
+
const rv = RunView.FromMetadataProvider(provider);
|
|
89
|
+
const r = await rv.RunView({
|
|
90
|
+
EntityName: "MJ: Components",
|
|
91
|
+
ExtraFilter: `Name='${currentComponent.Name?.replace(/'/g, "''")}' AND VersionSequence=${targetVersionSequence}`,
|
|
92
|
+
Fields: ['ID', 'Version', 'VersionSequence'],
|
|
93
|
+
ResultType: 'simple',
|
|
94
|
+
MaxRows: 1,
|
|
95
|
+
}, user);
|
|
96
|
+
if (!r.Success || (r.Results ?? []).length === 0) {
|
|
97
|
+
return failure("COMPONENT_NOT_FOUND", `No Component with VersionSequence=${targetVersionSequence} in lineage '${currentComponent.Name}'.`);
|
|
98
|
+
}
|
|
99
|
+
target = { ID: r.Results[0].ID, Version: r.Results[0].Version };
|
|
100
|
+
}
|
|
101
|
+
if (!target) {
|
|
102
|
+
return failure("COMPONENT_NOT_FOUND", "Could not resolve target Component.");
|
|
103
|
+
}
|
|
104
|
+
if (UUIDsEqual(target.ID, currentComponent.ID)) {
|
|
105
|
+
addOutput(params, "OverrideID", override.ID);
|
|
106
|
+
addOutput(params, "ComponentID", target.ID);
|
|
107
|
+
addOutput(params, "PreviousComponentID", null);
|
|
108
|
+
addOutput(params, "Version", target.Version);
|
|
109
|
+
return { Success: true, ResultCode: "SUCCESS",
|
|
110
|
+
Message: JSON.stringify({ noop: true, reason: 'TargetComponent is already the Active component.' }) };
|
|
111
|
+
}
|
|
112
|
+
// Re-point the override.
|
|
113
|
+
override.ComponentID = target.ID;
|
|
114
|
+
const oSaved = await override.Save();
|
|
115
|
+
if (!oSaved) {
|
|
116
|
+
return failure("PERSIST_FAILED", `Could not re-point Override: ${override.LatestResult?.CompleteMessage ?? 'unknown error'}`);
|
|
117
|
+
}
|
|
118
|
+
// Flip Component statuses to reflect the new active selection.
|
|
119
|
+
const newActive = await loadComponent(provider, user, target.ID);
|
|
120
|
+
if (newActive) {
|
|
121
|
+
newActive.Status = mapToComponentStatus('Active');
|
|
122
|
+
await newActive.Save();
|
|
123
|
+
}
|
|
124
|
+
currentComponent.Status = mapToComponentStatus('Inactive');
|
|
125
|
+
await currentComponent.Save();
|
|
126
|
+
addOutput(params, "OverrideID", override.ID);
|
|
127
|
+
addOutput(params, "ComponentID", target.ID);
|
|
128
|
+
addOutput(params, "PreviousComponentID", currentComponent.ID);
|
|
129
|
+
addOutput(params, "Version", target.Version);
|
|
130
|
+
return { Success: true, ResultCode: "SUCCESS",
|
|
131
|
+
Message: JSON.stringify({
|
|
132
|
+
OverrideID: override.ID,
|
|
133
|
+
ComponentID: target.ID,
|
|
134
|
+
PreviousComponentID: currentComponent.ID,
|
|
135
|
+
Version: target.Version,
|
|
136
|
+
}) };
|
|
137
|
+
}
|
|
138
|
+
catch (err) {
|
|
139
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
140
|
+
LogError(`RevertInteractiveFormAction: ${message}`);
|
|
141
|
+
return failure("UNEXPECTED_ERROR", message);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
RevertInteractiveFormAction = __decorate([
|
|
146
|
+
RegisterClass(BaseAction, "__RevertInteractiveForm")
|
|
147
|
+
], RevertInteractiveFormAction);
|
|
148
|
+
export { RevertInteractiveFormAction };
|
|
149
|
+
/** Tree-shaking guard. */
|
|
150
|
+
export function LoadRevertInteractiveFormAction() {
|
|
151
|
+
if (false) {
|
|
152
|
+
const _ = RevertInteractiveFormAction;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=revert-interactive-form.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revert-interactive-form.action.js","sourceRoot":"","sources":["../../../src/custom/interactive-forms/revert-interactive-form.action.ts"],"names":[],"mappings":";;;;;;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AAC,CAAC;YAC7C,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;YAC5C,SAAS,CAAC,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,CAAC,EAAE,CAAC,CAAC;YAC9D,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;YAC7C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS;gBACzC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;oBACpB,UAAU,EAAE,QAAQ,CAAC,EAAE;oBACvB,WAAW,EAAE,MAAM,CAAC,EAAE;oBACtB,mBAAmB,EAAE,gBAAgB,CAAC,EAAE;oBACxC,OAAO,EAAE,MAAM,CAAC,OAAO;iBAC1B,CAAC,EAAE,CAAC;QACb,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjE,QAAQ,CAAC,gCAAgC,OAAO,EAAE,CAAC,CAAC;YACpD,OAAO,OAAO,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;QAChD,CAAC;IACL,CAAC;CACJ,CAAA;AAhHY,2BAA2B;IADvC,aAAa,CAAC,UAAU,EAAE,yBAAyB,CAAC;GACxC,2BAA2B,CAgHvC;;AAED,0BAA0B;AAC1B,MAAM,UAAU,+BAA+B;IAC3C,IAAI,KAAgB,EAAE,CAAC;QACnB,MAAM,CAAC,GAAY,2BAA2B,CAAC;IACnD,CAAC;AACL,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './custom/utilities/external-change-detection.action.js';
|
|
|
21
21
|
export * from './custom/utilities/qr-code.action.js';
|
|
22
22
|
export * from './custom/utilities/address-services.action.js';
|
|
23
23
|
export * from './custom/geo/scheduled-geocoding.action.js';
|
|
24
|
+
export * from './custom/interactive-forms/index.js';
|
|
24
25
|
export * from './custom/web/web-search.action.js';
|
|
25
26
|
export * from './custom/web/web-page-content.action.js';
|
|
26
27
|
export * from './custom/web/url-link-validator.action.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AAGjD,cAAc,mDAAmD,CAAC;AAClE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAG5D,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AAGnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AAGpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oDAAoD,CAAC;AACnE,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,qDAAqD,CAAC;AACpE,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAG3D,cAAc,yCAAyC,CAAC;AAGxD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,wCAAwC,CAAC;AACvD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AAGzD,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sCA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CAAC;AACrE,cAAc,yDAAyD,CAAC;AACxE,cAAc,sDAAsD,CAAC;AACrE,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAG5D,cAAc,cAAc,CAAC;AAE7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,8 @@ export * from './custom/utilities/qr-code.action.js';
|
|
|
26
26
|
export * from './custom/utilities/address-services.action.js';
|
|
27
27
|
// Geo Actions
|
|
28
28
|
export * from './custom/geo/scheduled-geocoding.action.js';
|
|
29
|
+
// Interactive Forms Actions (Phase C: AI authoring of runtime forms)
|
|
30
|
+
export * from './custom/interactive-forms/index.js';
|
|
29
31
|
// Web Actions
|
|
30
32
|
export * from './custom/web/web-search.action.js';
|
|
31
33
|
export * from './custom/web/web-page-content.action.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AAEjD,wBAAwB;AACxB,cAAc,mDAAmD,CAAC;AAClE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAE5D,eAAe;AACf,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AAEnD,eAAe;AACf,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AAEpD,kBAAkB;AAClB,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oDAAoD,CAAC;AACnE,cAAc,0CAA0C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