@memberjunction/core-actions 5.35.0 → 5.36.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/dist/custom/communication/send-to-audience.action.d.ts +36 -0
- package/dist/custom/communication/send-to-audience.action.d.ts.map +1 -0
- package/dist/custom/communication/send-to-audience.action.js +148 -0
- package/dist/custom/communication/send-to-audience.action.js.map +1 -0
- package/dist/custom/lists/_action-helpers.d.ts +12 -0
- package/dist/custom/lists/_action-helpers.d.ts.map +1 -0
- package/dist/custom/lists/_action-helpers.js +42 -0
- package/dist/custom/lists/_action-helpers.js.map +1 -0
- package/dist/custom/lists/add-view-results-to-list.action.d.ts +21 -0
- package/dist/custom/lists/add-view-results-to-list.action.d.ts.map +1 -0
- package/dist/custom/lists/add-view-results-to-list.action.js +50 -0
- package/dist/custom/lists/add-view-results-to-list.action.js.map +1 -0
- package/dist/custom/lists/bulk-update-list-item-status.action.d.ts +6 -0
- package/dist/custom/lists/bulk-update-list-item-status.action.d.ts.map +1 -0
- package/dist/custom/lists/bulk-update-list-item-status.action.js +89 -0
- package/dist/custom/lists/bulk-update-list-item-status.action.js.map +1 -0
- package/dist/custom/lists/compose-lists.action.d.ts +30 -0
- package/dist/custom/lists/compose-lists.action.d.ts.map +1 -0
- package/dist/custom/lists/compose-lists.action.js +90 -0
- package/dist/custom/lists/compose-lists.action.js.map +1 -0
- package/dist/custom/lists/index.d.ts +17 -2
- package/dist/custom/lists/index.d.ts.map +1 -1
- package/dist/custom/lists/index.js +17 -2
- package/dist/custom/lists/index.js.map +1 -1
- package/dist/custom/lists/invite-to-list.action.d.ts +17 -0
- package/dist/custom/lists/invite-to-list.action.d.ts.map +1 -0
- package/dist/custom/lists/invite-to-list.action.js +52 -0
- package/dist/custom/lists/invite-to-list.action.js.map +1 -0
- package/dist/custom/lists/materialize-list-from-view.action.d.ts +26 -0
- package/dist/custom/lists/materialize-list-from-view.action.d.ts.map +1 -0
- package/dist/custom/lists/materialize-list-from-view.action.js +71 -0
- package/dist/custom/lists/materialize-list-from-view.action.js.map +1 -0
- package/dist/custom/lists/move-list-members.action.d.ts +20 -0
- package/dist/custom/lists/move-list-members.action.d.ts.map +1 -0
- package/dist/custom/lists/move-list-members.action.js +150 -0
- package/dist/custom/lists/move-list-members.action.js.map +1 -0
- package/dist/custom/lists/refresh-list-from-source.action.d.ts +15 -0
- package/dist/custom/lists/refresh-list-from-source.action.d.ts.map +1 -0
- package/dist/custom/lists/refresh-list-from-source.action.js +50 -0
- package/dist/custom/lists/refresh-list-from-source.action.js.map +1 -0
- package/dist/custom/lists/resolve-audience.action.d.ts +16 -0
- package/dist/custom/lists/resolve-audience.action.d.ts.map +1 -0
- package/dist/custom/lists/resolve-audience.action.js +59 -0
- package/dist/custom/lists/resolve-audience.action.js.map +1 -0
- package/dist/custom/lists/revoke-list-invitation.action.d.ts +12 -0
- package/dist/custom/lists/revoke-list-invitation.action.d.ts.map +1 -0
- package/dist/custom/lists/revoke-list-invitation.action.js +31 -0
- package/dist/custom/lists/revoke-list-invitation.action.js.map +1 -0
- package/dist/custom/lists/share-list.action.d.ts +16 -0
- package/dist/custom/lists/share-list.action.d.ts.map +1 -0
- package/dist/custom/lists/share-list.action.js +56 -0
- package/dist/custom/lists/share-list.action.js.map +1 -0
- package/dist/custom/lists/unshare-list.action.d.ts +11 -0
- package/dist/custom/lists/unshare-list.action.d.ts.map +1 -0
- package/dist/custom/lists/unshare-list.action.js +30 -0
- package/dist/custom/lists/unshare-list.action.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +32 -30
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
2
|
+
import { BaseAction } from '@memberjunction/actions';
|
|
3
|
+
/**
|
|
4
|
+
* Send a single message template to every record resolved from an
|
|
5
|
+
* `AudienceSource` (List / View / ad-hoc filter). Wraps the
|
|
6
|
+
* `SendToAudience` function from `@memberjunction/communication-engine`
|
|
7
|
+
* so the New Communication UI and any agent/workflow can drive a
|
|
8
|
+
* bulk send through the standard Action API.
|
|
9
|
+
*
|
|
10
|
+
* Required params:
|
|
11
|
+
* - Source: JSON-stringified `AudienceSource` ({kind:'list'|'view'|'adhoc', ...})
|
|
12
|
+
* - RecipientField: field name on the audience entity holding the recipient address (e.g. 'Email')
|
|
13
|
+
* - ProviderName: communication provider name (e.g. 'SendGrid')
|
|
14
|
+
* - ProviderMessageTypeName: provider message type (e.g. 'SingleEmail')
|
|
15
|
+
* - From: sender address
|
|
16
|
+
* - Subject, Body: standard message content. Body may include record tokens evaluated by the channel.
|
|
17
|
+
*
|
|
18
|
+
* Optional params:
|
|
19
|
+
* - FullNameField: field name for recipient's full name (for "FirstName LastName <addr>" formatting)
|
|
20
|
+
* - BodyTemplate: alternative to Body; the channel renders templating against per-record context
|
|
21
|
+
* - PreviewOnly: when true, resolve audience + build recipients but do NOT send. Returns counts only.
|
|
22
|
+
* - Credentials: JSON-stringified per-request credential override
|
|
23
|
+
*
|
|
24
|
+
* Outputs:
|
|
25
|
+
* - TotalAudienceSize, WillReceiveCount, SkippedCount, FailedCount
|
|
26
|
+
* - SkippedRecords: JSON array of {RecordID, Reason, Message}
|
|
27
|
+
* - PreviewOnly: true|false
|
|
28
|
+
*
|
|
29
|
+
* Drop-guard contract: this action never deletes any record — it only
|
|
30
|
+
* sends messages. The audience picker in the UI uses `Resolve Audience`
|
|
31
|
+
* first to preview counts before invoking this.
|
|
32
|
+
*/
|
|
33
|
+
export declare class SendToAudienceAction extends BaseAction {
|
|
34
|
+
protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=send-to-audience.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-to-audience.action.d.ts","sourceRoot":"","sources":["../../../src/custom/communication/send-to-audience.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAMrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBACa,oBAAqB,SAAQ,UAAU;cAClC,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA4FxF"}
|
|
@@ -0,0 +1,148 @@
|
|
|
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 { RegisterClass } from '@memberjunction/global';
|
|
9
|
+
import { SendToAudience } from '@memberjunction/communication-engine';
|
|
10
|
+
/**
|
|
11
|
+
* Send a single message template to every record resolved from an
|
|
12
|
+
* `AudienceSource` (List / View / ad-hoc filter). Wraps the
|
|
13
|
+
* `SendToAudience` function from `@memberjunction/communication-engine`
|
|
14
|
+
* so the New Communication UI and any agent/workflow can drive a
|
|
15
|
+
* bulk send through the standard Action API.
|
|
16
|
+
*
|
|
17
|
+
* Required params:
|
|
18
|
+
* - Source: JSON-stringified `AudienceSource` ({kind:'list'|'view'|'adhoc', ...})
|
|
19
|
+
* - RecipientField: field name on the audience entity holding the recipient address (e.g. 'Email')
|
|
20
|
+
* - ProviderName: communication provider name (e.g. 'SendGrid')
|
|
21
|
+
* - ProviderMessageTypeName: provider message type (e.g. 'SingleEmail')
|
|
22
|
+
* - From: sender address
|
|
23
|
+
* - Subject, Body: standard message content. Body may include record tokens evaluated by the channel.
|
|
24
|
+
*
|
|
25
|
+
* Optional params:
|
|
26
|
+
* - FullNameField: field name for recipient's full name (for "FirstName LastName <addr>" formatting)
|
|
27
|
+
* - BodyTemplate: alternative to Body; the channel renders templating against per-record context
|
|
28
|
+
* - PreviewOnly: when true, resolve audience + build recipients but do NOT send. Returns counts only.
|
|
29
|
+
* - Credentials: JSON-stringified per-request credential override
|
|
30
|
+
*
|
|
31
|
+
* Outputs:
|
|
32
|
+
* - TotalAudienceSize, WillReceiveCount, SkippedCount, FailedCount
|
|
33
|
+
* - SkippedRecords: JSON array of {RecordID, Reason, Message}
|
|
34
|
+
* - PreviewOnly: true|false
|
|
35
|
+
*
|
|
36
|
+
* Drop-guard contract: this action never deletes any record — it only
|
|
37
|
+
* sends messages. The audience picker in the UI uses `Resolve Audience`
|
|
38
|
+
* first to preview counts before invoking this.
|
|
39
|
+
*/
|
|
40
|
+
let SendToAudienceAction = class SendToAudienceAction extends BaseAction {
|
|
41
|
+
async InternalRunAction(params) {
|
|
42
|
+
const getStr = (name) => {
|
|
43
|
+
const p = params.Params.find((x) => x.Name.toLowerCase() === name.toLowerCase() && x.Type === 'Input');
|
|
44
|
+
return p?.Value != null ? String(p.Value) : undefined;
|
|
45
|
+
};
|
|
46
|
+
const getJson = (name) => {
|
|
47
|
+
const raw = getStr(name);
|
|
48
|
+
if (raw == null || raw.trim().length === 0)
|
|
49
|
+
return undefined;
|
|
50
|
+
try {
|
|
51
|
+
return JSON.parse(raw);
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const getBool = (name, dflt) => {
|
|
58
|
+
const v = getStr(name);
|
|
59
|
+
if (v == null)
|
|
60
|
+
return dflt;
|
|
61
|
+
const lc = v.toLowerCase();
|
|
62
|
+
if (lc === 'true' || lc === '1' || lc === 'yes')
|
|
63
|
+
return true;
|
|
64
|
+
if (lc === 'false' || lc === '0' || lc === 'no')
|
|
65
|
+
return false;
|
|
66
|
+
return dflt;
|
|
67
|
+
};
|
|
68
|
+
const missing = (name) => ({
|
|
69
|
+
Success: false,
|
|
70
|
+
ResultCode: 'MISSING_PARAMETER',
|
|
71
|
+
Message: `'${name}' is required`,
|
|
72
|
+
});
|
|
73
|
+
const source = getJson('Source');
|
|
74
|
+
if (!source) {
|
|
75
|
+
const raw = getStr('Source');
|
|
76
|
+
if (raw == null || raw.length === 0)
|
|
77
|
+
return missing('Source');
|
|
78
|
+
return { Success: false, ResultCode: 'INVALID_PARAMETER', Message: "'Source' must be JSON-stringified AudienceSource" };
|
|
79
|
+
}
|
|
80
|
+
const recipientField = getStr('RecipientField');
|
|
81
|
+
const providerName = getStr('ProviderName');
|
|
82
|
+
const providerMessageTypeName = getStr('ProviderMessageTypeName');
|
|
83
|
+
const from = getStr('From');
|
|
84
|
+
const subject = getStr('Subject');
|
|
85
|
+
const body = getStr('Body');
|
|
86
|
+
if (!recipientField)
|
|
87
|
+
return missing('RecipientField');
|
|
88
|
+
if (!providerName)
|
|
89
|
+
return missing('ProviderName');
|
|
90
|
+
if (!providerMessageTypeName)
|
|
91
|
+
return missing('ProviderMessageTypeName');
|
|
92
|
+
if (!from)
|
|
93
|
+
return missing('From');
|
|
94
|
+
// Build a Partial<Message> and cast at the boundary — the engine
|
|
95
|
+
// resolves the concrete MessageType from `ProviderName` +
|
|
96
|
+
// `ProviderMessageTypeName` before sending. SendToAudience itself
|
|
97
|
+
// only reads From / Subject / Body off Message; To gets populated
|
|
98
|
+
// per recipient inside the engine. Using Partial here avoids the
|
|
99
|
+
// `undefined as unknown as Message['MessageType']` cast and is the
|
|
100
|
+
// honest type for what we're constructing (a stub the engine
|
|
101
|
+
// completes).
|
|
102
|
+
const messageStub = {
|
|
103
|
+
From: from,
|
|
104
|
+
To: '',
|
|
105
|
+
Subject: subject,
|
|
106
|
+
Body: body,
|
|
107
|
+
};
|
|
108
|
+
const credentials = getJson('Credentials');
|
|
109
|
+
try {
|
|
110
|
+
const result = await SendToAudience({
|
|
111
|
+
Source: source,
|
|
112
|
+
RecipientField: recipientField,
|
|
113
|
+
FullNameField: getStr('FullNameField'),
|
|
114
|
+
ProviderName: providerName,
|
|
115
|
+
ProviderMessageTypeName: providerMessageTypeName,
|
|
116
|
+
Message: messageStub,
|
|
117
|
+
Credentials: credentials,
|
|
118
|
+
PreviewOnly: getBool('PreviewOnly', false),
|
|
119
|
+
ContextUser: params.ContextUser,
|
|
120
|
+
Provider: params.Provider,
|
|
121
|
+
});
|
|
122
|
+
const failed = result.Results.filter((r) => !r.Success).length;
|
|
123
|
+
params.Params.push({ Name: 'TotalAudienceSize', Type: 'Output', Value: result.TotalAudienceSize });
|
|
124
|
+
params.Params.push({ Name: 'WillReceiveCount', Type: 'Output', Value: result.WillReceiveCount });
|
|
125
|
+
params.Params.push({ Name: 'SkippedCount', Type: 'Output', Value: result.SkippedCount });
|
|
126
|
+
params.Params.push({ Name: 'FailedCount', Type: 'Output', Value: failed });
|
|
127
|
+
params.Params.push({ Name: 'SkippedRecords', Type: 'Output', Value: JSON.stringify(result.Skipped) });
|
|
128
|
+
params.Params.push({ Name: 'PreviewOnly', Type: 'Output', Value: result.PreviewOnly });
|
|
129
|
+
const sent = result.Results.length - failed;
|
|
130
|
+
return {
|
|
131
|
+
Success: failed === 0,
|
|
132
|
+
ResultCode: failed === 0 ? (result.PreviewOnly ? 'PREVIEW' : 'SUCCESS') : 'PARTIAL_SUCCESS',
|
|
133
|
+
Message: result.PreviewOnly
|
|
134
|
+
? `Preview: ${result.WillReceiveCount} of ${result.TotalAudienceSize} would receive (${result.SkippedCount} skipped)`
|
|
135
|
+
: `Sent ${sent} message(s), ${failed} failed, ${result.SkippedCount} skipped`,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
catch (e) {
|
|
139
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
140
|
+
return { Success: false, ResultCode: 'UNEXPECTED_ERROR', Message: message };
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
SendToAudienceAction = __decorate([
|
|
145
|
+
RegisterClass(BaseAction, 'Send To Audience')
|
|
146
|
+
], SendToAudienceAction);
|
|
147
|
+
export { SendToAudienceAction };
|
|
148
|
+
//# sourceMappingURL=send-to-audience.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-to-audience.action.js","sourceRoot":"","sources":["../../../src/custom/communication/send-to-audience.action.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAItE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;IACxC,KAAK,CAAC,iBAAiB,CAAC,MAAuB;QACvD,MAAM,MAAM,GAAG,CAAC,IAAY,EAAsB,EAAE;YAClD,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;YACvG,OAAO,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACxD,CAAC,CAAC;QACF,MAAM,OAAO,GAAG,CAAI,IAAY,EAAiB,EAAE;YACjD,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,GAAG,IAAI,IAAI,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AC5C,OAAO;gBACL,OAAO,EAAE,MAAM,KAAK,CAAC;gBACrB,UAAU,EAAE,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,iBAAiB;gBAC3F,OAAO,EAAE,MAAM,CAAC,WAAW;oBACzB,CAAC,CAAC,YAAY,MAAM,CAAC,gBAAgB,OAAO,MAAM,CAAC,iBAAiB,mBAAmB,MAAM,CAAC,YAAY,WAAW;oBACrH,CAAC,CAAC,QAAQ,IAAI,gBAAgB,MAAM,YAAY,MAAM,CAAC,YAAY,UAAU;aAChF,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,OAAO,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3D,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;QAC9E,CAAC;IACH,CAAC;CACF,CAAA;AA7FY,oBAAoB;IADhC,aAAa,CAAC,UAAU,EAAE,kBAAkB,CAAC;GACjC,oBAAoB,CA6FhC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
2
|
+
/**
|
|
3
|
+
* Shared param-extraction helpers for the Phase 1 list Actions. Mirrors
|
|
4
|
+
* the patterns the older list actions inline individually — extracted here
|
|
5
|
+
* so the new actions stay small.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getStringParam(params: RunActionParams, name: string): string | undefined;
|
|
8
|
+
export declare function getBooleanParam(params: RunActionParams, name: string, defaultValue: boolean): boolean;
|
|
9
|
+
export declare function getJsonParam<T>(params: RunActionParams, name: string): T | undefined;
|
|
10
|
+
export declare function addOutputParam(params: RunActionParams, name: string, value: unknown): void;
|
|
11
|
+
export declare function missingParam(name: string): ActionResultSimple;
|
|
12
|
+
//# sourceMappingURL=_action-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_action-helpers.d.ts","sourceRoot":"","sources":["../../../src/custom/lists/_action-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAExF;;;;GAIG;AAEH,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGxF;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,OAAO,GACpB,OAAO,CAOT;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAQpF;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAE1F;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAM7D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared param-extraction helpers for the Phase 1 list Actions. Mirrors
|
|
3
|
+
* the patterns the older list actions inline individually — extracted here
|
|
4
|
+
* so the new actions stay small.
|
|
5
|
+
*/
|
|
6
|
+
export function getStringParam(params, name) {
|
|
7
|
+
const param = params.Params.find((p) => p.Name.toLowerCase() === name.toLowerCase() && p.Type === 'Input');
|
|
8
|
+
return param?.Value != null ? String(param.Value) : undefined;
|
|
9
|
+
}
|
|
10
|
+
export function getBooleanParam(params, name, defaultValue) {
|
|
11
|
+
const param = params.Params.find((p) => p.Name.toLowerCase() === name.toLowerCase() && p.Type === 'Input');
|
|
12
|
+
if (param?.Value == null)
|
|
13
|
+
return defaultValue;
|
|
14
|
+
const v = String(param.Value).toLowerCase();
|
|
15
|
+
if (v === 'true' || v === '1' || v === 'yes')
|
|
16
|
+
return true;
|
|
17
|
+
if (v === 'false' || v === '0' || v === 'no')
|
|
18
|
+
return false;
|
|
19
|
+
return defaultValue;
|
|
20
|
+
}
|
|
21
|
+
export function getJsonParam(params, name) {
|
|
22
|
+
const raw = getStringParam(params, name);
|
|
23
|
+
if (raw == null || raw.trim().length === 0)
|
|
24
|
+
return undefined;
|
|
25
|
+
try {
|
|
26
|
+
return JSON.parse(raw);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function addOutputParam(params, name, value) {
|
|
33
|
+
params.Params.push({ Name: name, Type: 'Output', Value: value });
|
|
34
|
+
}
|
|
35
|
+
export function missingParam(name) {
|
|
36
|
+
return {
|
|
37
|
+
Success: false,
|
|
38
|
+
ResultCode: 'MISSING_PARAMETER',
|
|
39
|
+
Message: `'${name}' is required`,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=_action-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_action-helpers.js","sourceRoot":"","sources":["../../../src/custom/lists/_action-helpers.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,MAAM,UAAU,cAAc,CAAC,MAAuB,EAAE,IAAY;IAClE,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;IAC3G,OAAO,KAAK,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KA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QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO;QACL,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,mBAAmB;QAC/B,OAAO,EAAE,IAAI,IAAI,eAAe;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseAction } from '@memberjunction/actions';
|
|
2
|
+
import type { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
3
|
+
/**
|
|
4
|
+
* Add a User View's current results to an existing List. Always additive;
|
|
5
|
+
* never removes. Cannot trigger the drop-guard.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* await runAction({
|
|
10
|
+
* ActionName: 'Add View Results To List',
|
|
11
|
+
* Params: [
|
|
12
|
+
* { Name: 'ViewID', Value: 'view-id' },
|
|
13
|
+
* { Name: 'ListID', Value: 'list-id' }
|
|
14
|
+
* ]
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class AddViewResultsToListAction extends BaseAction {
|
|
19
|
+
protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=add-view-results-to-list.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-view-results-to-list.action.d.ts","sourceRoot":"","sources":["../../../src/custom/lists/add-view-results-to-list.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAMxF;;;;;;;;;;;;;;GAcG;AACH,qBACa,0BAA2B,SAAQ,UAAU;cACxC,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAmBxF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { RegisterClass } from '@memberjunction/global';
|
|
9
|
+
import { ListOperations } from '@memberjunction/lists';
|
|
10
|
+
import { addOutputParam, getStringParam, missingParam } from './_action-helpers.js';
|
|
11
|
+
/**
|
|
12
|
+
* Add a User View's current results to an existing List. Always additive;
|
|
13
|
+
* never removes. Cannot trigger the drop-guard.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* await runAction({
|
|
18
|
+
* ActionName: 'Add View Results To List',
|
|
19
|
+
* Params: [
|
|
20
|
+
* { Name: 'ViewID', Value: 'view-id' },
|
|
21
|
+
* { Name: 'ListID', Value: 'list-id' }
|
|
22
|
+
* ]
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
let AddViewResultsToListAction = class AddViewResultsToListAction extends BaseAction {
|
|
27
|
+
async InternalRunAction(params) {
|
|
28
|
+
const viewId = getStringParam(params, 'ViewID');
|
|
29
|
+
const listId = getStringParam(params, 'ListID');
|
|
30
|
+
if (!viewId)
|
|
31
|
+
return missingParam('ViewID');
|
|
32
|
+
if (!listId)
|
|
33
|
+
return missingParam('ListID');
|
|
34
|
+
const ops = new ListOperations(params.ContextUser, params.Provider);
|
|
35
|
+
const result = await ops.AddViewResultsToList(viewId, listId);
|
|
36
|
+
addOutputParam(params, 'Added', result.Counts?.Added);
|
|
37
|
+
addOutputParam(params, 'Removed', result.Counts?.Removed);
|
|
38
|
+
addOutputParam(params, 'Failed', result.Counts?.Failed);
|
|
39
|
+
return {
|
|
40
|
+
Success: result.Success,
|
|
41
|
+
ResultCode: result.ResultCode,
|
|
42
|
+
Message: result.Message,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
AddViewResultsToListAction = __decorate([
|
|
47
|
+
RegisterClass(BaseAction, 'Add View Results To List')
|
|
48
|
+
], AddViewResultsToListAction);
|
|
49
|
+
export { AddViewResultsToListAction };
|
|
50
|
+
//# sourceMappingURL=add-view-results-to-list.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-view-results-to-list.action.js","sourceRoot":"","sources":["../../../src/custom/lists/add-view-results-to-list.action.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjF;;;;;;;;;;;;;;GAcG;AAEI,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,UAAU;IAC9C,KAAK,CAAC,iBAAiB,CAAC,MAAuB;QACvD,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChD,IAAI,CAAC,MAAM;YAAE,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM;YAAE,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;QAE3C,MAAM,GAAG,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;QACpE,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAE9D,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACtD,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC1D,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAExD,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC;IACJ,CAAC;CACF,CAAA;AApBY,0BAA0B;IADtC,aAAa,CAAC,UAAU,EAAE,0BAA0B,CAAC;GACzC,0BAA0B,CAoBtC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseAction } from '@memberjunction/actions';
|
|
2
|
+
import type { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
3
|
+
export declare class BulkUpdateListItemStatusAction extends BaseAction {
|
|
4
|
+
protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=bulk-update-list-item-status.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk-update-list-item-status.action.d.ts","sourceRoot":"","sources":["../../../src/custom/lists/bulk-update-list-item-status.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AA0BxF,qBACa,8BAA+B,SAAQ,UAAU;cAC5C,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAgExF"}
|
|
@@ -0,0 +1,89 @@
|
|
|
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, RunView } from '@memberjunction/core';
|
|
9
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
10
|
+
import { addOutputParam, getJsonParam, getStringParam, missingParam, } from './_action-helpers.js';
|
|
11
|
+
/**
|
|
12
|
+
* Bulk-update the `Status` field on `MJ: List Detail` rows for a given
|
|
13
|
+
* list. Useful for review-style workflows where reviewers triage list
|
|
14
|
+
* items as Active / Complete / Disabled / Rejected.
|
|
15
|
+
*
|
|
16
|
+
* Params:
|
|
17
|
+
* - ListID (required)
|
|
18
|
+
* - RecordIDs: JSON-stringified array of RecordID values to update.
|
|
19
|
+
* - NewStatus: must match the MJ: List Detail Status check constraint
|
|
20
|
+
* (Active / Complete / Disabled / Error / Other / Pending / Rejected).
|
|
21
|
+
*/
|
|
22
|
+
const ALLOWED_STATUSES = ['Active', 'Complete', 'Disabled', 'Error', 'Other', 'Pending', 'Rejected'];
|
|
23
|
+
let BulkUpdateListItemStatusAction = class BulkUpdateListItemStatusAction extends BaseAction {
|
|
24
|
+
async InternalRunAction(params) {
|
|
25
|
+
const listId = getStringParam(params, 'ListID');
|
|
26
|
+
const recordIds = getJsonParam(params, 'RecordIDs');
|
|
27
|
+
const newStatus = getStringParam(params, 'NewStatus');
|
|
28
|
+
if (!listId)
|
|
29
|
+
return missingParam('ListID');
|
|
30
|
+
if (!recordIds || !Array.isArray(recordIds) || recordIds.length === 0) {
|
|
31
|
+
return {
|
|
32
|
+
Success: false,
|
|
33
|
+
ResultCode: 'INVALID_PARAMETER',
|
|
34
|
+
Message: "'RecordIDs' must be a JSON-stringified non-empty string array",
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
if (!newStatus || !ALLOWED_STATUSES.includes(newStatus)) {
|
|
38
|
+
return {
|
|
39
|
+
Success: false,
|
|
40
|
+
ResultCode: 'INVALID_PARAMETER',
|
|
41
|
+
Message: `NewStatus must be one of: ${ALLOWED_STATUSES.join(', ')} (got '${newStatus ?? ''}')`,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const md = params.Provider ?? new Metadata();
|
|
45
|
+
const rv = params.Provider ? RunView.FromMetadataProvider(params.Provider) : new RunView();
|
|
46
|
+
const filter = recordIds.map((id) => `'${id.replace(/'/g, "''")}'`).join(',');
|
|
47
|
+
const lookup = await rv.RunView({
|
|
48
|
+
EntityName: 'MJ: List Details',
|
|
49
|
+
ExtraFilter: `ListID='${listId}' AND RecordID IN (${filter})`,
|
|
50
|
+
ResultType: 'entity_object',
|
|
51
|
+
}, params.ContextUser);
|
|
52
|
+
if (!lookup.Success) {
|
|
53
|
+
return {
|
|
54
|
+
Success: false,
|
|
55
|
+
ResultCode: 'UNEXPECTED_ERROR',
|
|
56
|
+
Message: `Failed to load list details: ${lookup.ErrorMessage}`,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
let updated = 0;
|
|
60
|
+
let failed = 0;
|
|
61
|
+
const errors = [];
|
|
62
|
+
for (const detail of lookup.Results ?? []) {
|
|
63
|
+
detail.Status = newStatus;
|
|
64
|
+
const ok = await detail.Save();
|
|
65
|
+
if (ok) {
|
|
66
|
+
updated++;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
failed++;
|
|
70
|
+
errors.push(`Failed to update '${detail.RecordID}': ${detail.LatestResult?.CompleteMessage ?? 'unknown'}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
addOutputParam(params, 'Updated', updated);
|
|
74
|
+
addOutputParam(params, 'Failed', failed);
|
|
75
|
+
addOutputParam(params, 'Errors', errors);
|
|
76
|
+
return {
|
|
77
|
+
Success: failed === 0,
|
|
78
|
+
ResultCode: failed === 0 ? 'SUCCESS' : 'PARTIAL_SUCCESS',
|
|
79
|
+
Message: failed === 0
|
|
80
|
+
? `Updated ${updated} item(s) to '${newStatus}'`
|
|
81
|
+
: `Updated ${updated}, ${failed} failed`,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
BulkUpdateListItemStatusAction = __decorate([
|
|
86
|
+
RegisterClass(BaseAction, 'Bulk Update List Item Status')
|
|
87
|
+
], BulkUpdateListItemStatusAction);
|
|
88
|
+
export { BulkUpdateListItemStatusAction };
|
|
89
|
+
//# sourceMappingURL=bulk-update-list-item-status.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk-update-list-item-status.action.js","sourceRoot":"","sources":["../../../src/custom/lists/bulk-update-list-item-status.action.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,EACL,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,GACb,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;GAUG;AACH,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAU,CAA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AE,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB;YACxD,OAAO,EAAE,MAAM,KAAK,CAAC;gBACnB,CAAC,CAAC,WAAW,OAAO,gBAAgB,SAAS,GAAG;gBAChD,CAAC,CAAC,WAAW,OAAO,KAAK,MAAM,SAAS;SAC3C,CAAC;IACJ,CAAC;CACF,CAAA;AAjEY,8BAA8B;IAD1C,aAAa,CAAC,UAAU,EAAE,8BAA8B,CAAC;GAC7C,8BAA8B,CAiE1C"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseAction } from '@memberjunction/actions';
|
|
2
|
+
import type { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
|
|
3
|
+
/**
|
|
4
|
+
* Compose multiple List or View sources into a delta via a set-op
|
|
5
|
+
* (union / intersection / difference). Preview-only mode (no Target) is
|
|
6
|
+
* the default; supplying a target list projects the result back into the
|
|
7
|
+
* target — which can trigger the drop-guard.
|
|
8
|
+
*
|
|
9
|
+
* Inputs serialization: `Inputs` is a JSON-stringified array of
|
|
10
|
+
* `ListSource` objects, each `{kind: 'list'|'view'|'adhoc', ...}`. The
|
|
11
|
+
* `Target` parameter follows the same shape (single object).
|
|
12
|
+
*
|
|
13
|
+
* @example Preview a union of two views:
|
|
14
|
+
* ```typescript
|
|
15
|
+
* await runAction({
|
|
16
|
+
* ActionName: 'Compose Lists',
|
|
17
|
+
* Params: [
|
|
18
|
+
* { Name: 'Op', Value: 'union' },
|
|
19
|
+
* { Name: 'Inputs', Value: JSON.stringify([
|
|
20
|
+
* { kind: 'view', viewId: 'v1' },
|
|
21
|
+
* { kind: 'view', viewId: 'v2' }
|
|
22
|
+
* ]) }
|
|
23
|
+
* ]
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class ComposeListsAction extends BaseAction {
|
|
28
|
+
protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=compose-lists.action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose-lists.action.d.ts","sourceRoot":"","sources":["../../../src/custom/lists/compose-lists.action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAaxF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBACa,kBAAmB,SAAQ,UAAU;cAChC,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA0DxF"}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { RegisterClass } from '@memberjunction/global';
|
|
9
|
+
import { ListOperations } from '@memberjunction/lists';
|
|
10
|
+
import { addOutputParam, getBooleanParam, getJsonParam, getStringParam, missingParam, } from './_action-helpers.js';
|
|
11
|
+
/**
|
|
12
|
+
* Compose multiple List or View sources into a delta via a set-op
|
|
13
|
+
* (union / intersection / difference). Preview-only mode (no Target) is
|
|
14
|
+
* the default; supplying a target list projects the result back into the
|
|
15
|
+
* target — which can trigger the drop-guard.
|
|
16
|
+
*
|
|
17
|
+
* Inputs serialization: `Inputs` is a JSON-stringified array of
|
|
18
|
+
* `ListSource` objects, each `{kind: 'list'|'view'|'adhoc', ...}`. The
|
|
19
|
+
* `Target` parameter follows the same shape (single object).
|
|
20
|
+
*
|
|
21
|
+
* @example Preview a union of two views:
|
|
22
|
+
* ```typescript
|
|
23
|
+
* await runAction({
|
|
24
|
+
* ActionName: 'Compose Lists',
|
|
25
|
+
* Params: [
|
|
26
|
+
* { Name: 'Op', Value: 'union' },
|
|
27
|
+
* { Name: 'Inputs', Value: JSON.stringify([
|
|
28
|
+
* { kind: 'view', viewId: 'v1' },
|
|
29
|
+
* { kind: 'view', viewId: 'v2' }
|
|
30
|
+
* ]) }
|
|
31
|
+
* ]
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
let ComposeListsAction = class ComposeListsAction extends BaseAction {
|
|
36
|
+
async InternalRunAction(params) {
|
|
37
|
+
const op = getStringParam(params, 'Op');
|
|
38
|
+
if (!op)
|
|
39
|
+
return missingParam('Op');
|
|
40
|
+
if (op !== 'union' && op !== 'intersection' && op !== 'difference') {
|
|
41
|
+
return {
|
|
42
|
+
Success: false,
|
|
43
|
+
ResultCode: 'INVALID_PARAMETER',
|
|
44
|
+
Message: `Op must be one of: union | intersection | difference (got '${op}')`,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const inputs = getJsonParam(params, 'Inputs');
|
|
48
|
+
if (!inputs || !Array.isArray(inputs) || inputs.length < 2) {
|
|
49
|
+
return {
|
|
50
|
+
Success: false,
|
|
51
|
+
ResultCode: 'INVALID_PARAMETER',
|
|
52
|
+
Message: "'Inputs' must be a JSON-stringified array of at least 2 ListSource objects",
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const target = getJsonParam(params, 'Target');
|
|
56
|
+
const confirmDrops = getBooleanParam(params, 'ConfirmDrops', false);
|
|
57
|
+
const ops = new ListOperations(params.ContextUser, params.Provider);
|
|
58
|
+
const delta = await ops.ComputeSetOp(op, inputs, target);
|
|
59
|
+
// Preview-only path: no commit. Surface the delta details as outputs.
|
|
60
|
+
addOutputParam(params, 'DeltaToken', delta.DeltaToken);
|
|
61
|
+
addOutputParam(params, 'Add', delta.Counts.Add);
|
|
62
|
+
addOutputParam(params, 'Remove', delta.Counts.Remove);
|
|
63
|
+
addOutputParam(params, 'Unchanged', delta.Counts.Unchanged);
|
|
64
|
+
addOutputParam(params, 'Warnings', delta.Warnings.map((w) => ({ Code: w.Code, Message: w.Message })));
|
|
65
|
+
// If no target, this is a preview-only operation — we don't auto-apply.
|
|
66
|
+
if (!target) {
|
|
67
|
+
return {
|
|
68
|
+
Success: true,
|
|
69
|
+
ResultCode: 'SUCCESS',
|
|
70
|
+
Message: `Set-op preview: +${delta.Counts.Add} / -${delta.Counts.Remove} (Target omitted — no changes applied)`,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
// Target provided — commit via ApplyDelta. The drop-guard is enforced
|
|
74
|
+
// server-side: if Remove>0 and ConfirmDrops=false, ApplyDelta rejects.
|
|
75
|
+
const apply = await ops.ApplyDelta(delta, { ConfirmDrops: confirmDrops, DeltaToken: delta.DeltaToken });
|
|
76
|
+
addOutputParam(params, 'Added', apply.Counts?.Added);
|
|
77
|
+
addOutputParam(params, 'Removed', apply.Counts?.Removed);
|
|
78
|
+
addOutputParam(params, 'Failed', apply.Counts?.Failed);
|
|
79
|
+
return {
|
|
80
|
+
Success: apply.Success,
|
|
81
|
+
ResultCode: apply.ResultCode,
|
|
82
|
+
Message: apply.Message,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
ComposeListsAction = __decorate([
|
|
87
|
+
RegisterClass(BaseAction, 'Compose Lists')
|
|
88
|
+
], ComposeListsAction);
|
|
89
|
+
export { ComposeListsAction };
|
|
90
|
+
//# sourceMappingURL=compose-lists.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose-lists.action.js","sourceRoot":"","sources":["../../../src/custom/lists/compose-lists.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AAc,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACzD,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACvD,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC;IACJ,CAAC;CACF,CAAA;AA3DY,kBAAkB;IAD9B,aAAa,CAAC,UAAU,EAAE,eAAe,CAAC;GAC9B,kBAAkB,CA2D9B"}
|
|
@@ -6,16 +6,31 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Available Actions:
|
|
8
8
|
* - Add Records to List: Add one or more records to a list
|
|
9
|
-
* -
|
|
9
|
+
* - Add View Results To List: Append a view's results to a list (additive only)
|
|
10
|
+
* - Compose Lists: Set-op preview / commit across List + View inputs
|
|
10
11
|
* - Create List: Create a new list with optional initial records
|
|
11
12
|
* - Get List Records: Retrieve records from a list with filtering
|
|
12
13
|
* - Get Record List Membership: Find which lists contain a specific record
|
|
14
|
+
* - Materialize List From View: Create a new list from a view's results, with optional lineage
|
|
15
|
+
* - Refresh List From Source: Refresh an existing lineage-bearing list against its source
|
|
16
|
+
* - Remove Records from List: Remove records from a list
|
|
13
17
|
* - Update List Item Status: Bulk update status on list items
|
|
14
18
|
*/
|
|
15
19
|
export * from './add-records-to-list.action.js';
|
|
16
|
-
export * from './
|
|
20
|
+
export * from './add-view-results-to-list.action.js';
|
|
21
|
+
export * from './bulk-update-list-item-status.action.js';
|
|
22
|
+
export * from './compose-lists.action.js';
|
|
17
23
|
export * from './create-list.action.js';
|
|
18
24
|
export * from './get-list-records.action.js';
|
|
19
25
|
export * from './get-record-list-membership.action.js';
|
|
26
|
+
export * from './invite-to-list.action.js';
|
|
27
|
+
export * from './materialize-list-from-view.action.js';
|
|
28
|
+
export * from './move-list-members.action.js';
|
|
29
|
+
export * from './refresh-list-from-source.action.js';
|
|
30
|
+
export * from './remove-records-from-list.action.js';
|
|
31
|
+
export * from './resolve-audience.action.js';
|
|
32
|
+
export * from './revoke-list-invitation.action.js';
|
|
33
|
+
export * from './share-list.action.js';
|
|
34
|
+
export * from './unshare-list.action.js';
|
|
20
35
|
export * from './update-list-item-status.action.js';
|
|
21
36
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/custom/lists/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/custom/lists/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kCAAkC,CAAC"}
|