@mj-biz-apps/sales-server 5.1.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/LICENSE ADDED
@@ -0,0 +1,183 @@
1
+ Business Source License 1.1
2
+
3
+ License text copyright (c) 2024 MariaDB plc, All Rights Reserved.
4
+ "Business Source License" is a trademark of MariaDB plc.
5
+
6
+ -----------------------------------------------------------------------------
7
+
8
+ Parameters
9
+
10
+ Licensor: Blue Cypress, Inc.
11
+
12
+ Licensed Work: MemberJunction.
13
+ The Licensed Work is (c) 2023-2026 Blue Cypress, Inc.
14
+
15
+ Additional Use Grant: Subject to the terms of this License, Licensor grants
16
+ you the following additional rights to make Production
17
+ Use of the Licensed Work.
18
+
19
+ 1. Internal Use
20
+
21
+ You may make production use of the Licensed Work for
22
+ your own internal business or organizational operations.
23
+
24
+ 2. Nonprofit Use
25
+
26
+ If you are a Nonprofit, you may make production use of
27
+ the Licensed Work for the operations and activities of
28
+ your Organizational Family.
29
+
30
+ 3. MemberJunction Certified Program Use
31
+
32
+ If you are authorized by Licensor under the
33
+ MemberJunction Certified Program to provide professional
34
+ services using the Licensed Work, you may make
35
+ production use of the Licensed Work in providing such
36
+ professional services to a client, provided that:
37
+
38
+ (a) the Licensed Work is deployed in, and the applicable
39
+ production use occurs within, an environment owned,
40
+ leased, licensed, subscribed to, or otherwise controlled
41
+ by that client; and
42
+
43
+ (b) the production use is for that client's own internal
44
+ business or organizational operations or is otherwise
45
+ independently permitted to that client under this
46
+ Additional Use Grant.
47
+
48
+ 4. Definitions Applicable to the Additional Use Grant
49
+
50
+ "Affiliate" means, with respect to a specified Person,
51
+ any other Person that directly or indirectly Controls,
52
+ is Controlled by, or is under common Control with such
53
+ specified Person.
54
+
55
+ "Control" (including the terms "Controls," "Controlled
56
+ by," and "under common Control with") means the direct
57
+ or indirect possession of the power to direct or cause
58
+ the direction of the management and policies of a
59
+ Person, whether through ownership of voting interests,
60
+ by contract, or otherwise.
61
+
62
+ "Organizational Family" means, with respect to a Person,
63
+ (a) such Person and its Affiliates, and (b) any
64
+ nonprofit organization, governmental entity, chapter,
65
+ division, local affiliate, regional affiliate, state
66
+ affiliate, national affiliate, or other entity that is
67
+ formally affiliated with such Person through governing
68
+ documents, a charter, bylaws, a membership agreement, or
69
+ another written organizational instrument, and is
70
+ recognized under such documents as part of the same
71
+ organizational structure.
72
+
73
+ "Nonprofit" means a Person recognized by the Internal
74
+ Revenue Service as exempt from federal income taxation
75
+ under Section 501(c)(3), 501(c)(4), 501(c)(5), or
76
+ 501(c)(6) of the Internal Revenue Code, or a foreign
77
+ organization recognized under substantially equivalent
78
+ laws.
79
+
80
+ A Person claiming eligibility as a Nonprofit shall, upon
81
+ Licensor's reasonable request, provide documentation
82
+ reasonably sufficient to demonstrate that it qualifies
83
+ as a Nonprofit. If such Person materially misrepresents,
84
+ or is unable to demonstrate, its qualification as a
85
+ Nonprofit, the rights granted to such Person under
86
+ Section 2 of this Additional Use Grant shall terminate.
87
+
88
+ "MemberJunction Certified Program" means Licensor's
89
+ then-current program for certifying and authorizing a
90
+ Person to provide professional services using the
91
+ Licensed Work.
92
+
93
+ "Person" means any individual, corporation, limited
94
+ liability company, partnership, association, nonprofit
95
+ organization, governmental entity, or other legal or
96
+ organizational entity.
97
+
98
+ Change Date: Four (4) years from the date the Licensed Work is first
99
+ made available.
100
+
101
+ Change License: MIT License.
102
+
103
+ For information about alternative licensing arrangements for the Licensed
104
+ Work, please contact Blue Cypress, Inc.
105
+
106
+ -----------------------------------------------------------------------------
107
+
108
+ Terms
109
+
110
+ The Licensor hereby grants you the right to copy, modify, create derivative
111
+ works, redistribute, and make non-production use of the Licensed Work. The
112
+ Licensor may make an Additional Use Grant, above, permitting limited
113
+ production use.
114
+
115
+ Effective on the Change Date, or the fourth anniversary of the first publicly
116
+ available distribution of a specific version of the Licensed Work under this
117
+ License, whichever comes first, the Licensor hereby grants you rights under
118
+ the terms of the Change License, and the rights granted in the paragraph
119
+ above terminate.
120
+
121
+ If your use of the Licensed Work does not comply with the requirements
122
+ currently in effect as described in this License, you must purchase a
123
+ commercial license from the Licensor, its affiliated entities, or authorized
124
+ resellers, or you must refrain from using the Licensed Work.
125
+
126
+ All copies of the original and modified Licensed Work, and derivative works
127
+ of the Licensed Work, are subject to this License. This License applies
128
+ separately for each version of the Licensed Work and the Change Date may vary
129
+ for each version of the Licensed Work released by Licensor.
130
+
131
+ You must conspicuously display this License on each original or modified copy
132
+ of the Licensed Work. If you receive the Licensed Work in original or
133
+ modified form from a third party, the terms and conditions set forth in this
134
+ License apply to your use of that work.
135
+
136
+ Any use of the Licensed Work in violation of this License will automatically
137
+ terminate your rights under this License for the current and all other
138
+ versions of the Licensed Work.
139
+
140
+ This License does not grant you any right in any trademark or logo of
141
+ Licensor or its affiliates (provided that you may use a trademark or logo of
142
+ Licensor as expressly required by this License).
143
+
144
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
145
+ AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
146
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
147
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
148
+ TITLE.
149
+
150
+ MariaDB hereby grants you permission to use this License's text to license
151
+ your works, and to refer to it using the trademark "Business Source License",
152
+ as long as you comply with the Covenants of Licensor below.
153
+
154
+ -----------------------------------------------------------------------------
155
+
156
+ Covenants of Licensor
157
+
158
+ In consideration of the right to use this License's text and the "Business
159
+ Source License" name and trademark, Licensor covenants to MariaDB, and to all
160
+ other recipients of the licensed work to be provided by Licensor:
161
+
162
+ 1. To specify as the Change License the GPL Version 2.0 or any later version,
163
+ or a license that is compatible with GPL Version 2.0 or a later version,
164
+ where "compatible" means that software provided under the Change License
165
+ can be included in a program with software provided under GPL Version 2.0
166
+ or a later version. Licensor may specify additional Change Licenses without
167
+ limitation.
168
+
169
+ 2. To either: (a) specify an additional grant of rights to use that does not
170
+ impose any additional restriction on the right granted in this License, as
171
+ the Additional Use Grant; or (b) insert the text "None".
172
+
173
+ 3. To specify a Change Date.
174
+
175
+ 4. Not to modify this License in any other way.
176
+
177
+ -----------------------------------------------------------------------------
178
+
179
+ Notice
180
+
181
+ The Business Source License (this document, or the "License") is not an Open
182
+ Source license. However, the Licensed Work will eventually be made available
183
+ under an Open Source License, as stated in this License.
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @fileoverview `Sales.CaptureForecastSnapshot` — the daily snapshot Action (#40).
3
+ *
4
+ * Second instance of the shape `Sales.SyncActivities` established: read the params, call the job with
5
+ * whatever source factory is registered, report tallies as outputs, never throw at the caller.
6
+ *
7
+ * @module @mj-biz-apps/sales-server
8
+ */
9
+ import { BaseAction } from '@memberjunction/actions';
10
+ import type { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
11
+ export declare class CaptureForecastSnapshotAction extends BaseAction {
12
+ protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
13
+ private capture;
14
+ }
15
+ /** Anti-tree-shaking anchor — see the note on `LoadSyncActivitiesAction`. */
16
+ export declare function LoadCaptureForecastSnapshotAction(): void;
17
+ //# sourceMappingURL=forecast-snapshot.action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forecast-snapshot.action.d.ts","sourceRoot":"","sources":["../../src/custom/forecast-snapshot.action.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAe,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAgCrG,qBACa,6BAA8B,SAAQ,UAAU;cACzC,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;YAYzE,OAAO;CAyDxB;AAED,6EAA6E;AAC7E,wBAAgB,iCAAiC,IAAI,IAAI,CAExD"}
@@ -0,0 +1,112 @@
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
+ /**
8
+ * @fileoverview `Sales.CaptureForecastSnapshot` — the daily snapshot Action (#40).
9
+ *
10
+ * Second instance of the shape `Sales.SyncActivities` established: read the params, call the job with
11
+ * whatever source factory is registered, report tallies as outputs, never throw at the caller.
12
+ *
13
+ * @module @mj-biz-apps/sales-server
14
+ */
15
+ import { BaseAction } from '@memberjunction/actions';
16
+ import { Metadata } from '@memberjunction/core';
17
+ import { RegisterClass } from '@memberjunction/global';
18
+ import { RunForecastSnapshot } from '@mj-biz-apps/sales-core-entities-server';
19
+ const P_PERIOD_START = 'PeriodStart';
20
+ const P_PERIOD_END = 'PeriodEnd';
21
+ function readParam(params, name) {
22
+ return params.Params?.find((p) => p.Name?.toLowerCase() === name.toLowerCase())?.Value;
23
+ }
24
+ function setOutput(params, name, value) {
25
+ const existing = params.Params?.find((p) => p.Name?.toLowerCase() === name.toLowerCase());
26
+ if (existing) {
27
+ existing.Value = value;
28
+ return;
29
+ }
30
+ params.Params = params.Params ?? [];
31
+ params.Params.push({ Name: name, Value: value, Type: 'Output' });
32
+ }
33
+ /** A supplied date, or null. Refuses a value it cannot parse rather than substituting today. */
34
+ function readDate(params, name) {
35
+ const raw = readParam(params, name);
36
+ if (raw === null || raw === undefined || raw === '') {
37
+ return null;
38
+ }
39
+ const parsed = new Date(String(raw));
40
+ return Number.isNaN(parsed.getTime()) ? null : parsed;
41
+ }
42
+ let CaptureForecastSnapshotAction = class CaptureForecastSnapshotAction extends BaseAction {
43
+ async InternalRunAction(params) {
44
+ try {
45
+ return await this.capture(params);
46
+ }
47
+ catch (error) {
48
+ return {
49
+ Success: false,
50
+ ResultCode: 'ERROR',
51
+ Message: `The forecast snapshot failed: ${error instanceof Error ? error.message : String(error)}`,
52
+ };
53
+ }
54
+ }
55
+ async capture(params) {
56
+ /**
57
+ * BOTH DATES OR NEITHER. A start with no end (or the reverse) is an incomplete instruction, and
58
+ * filling in the missing half from the current month would silently snapshot a window nobody asked
59
+ * for — attributing measures to the wrong period, which is exactly what a forecast series cannot
60
+ * survive. Omitting both is the ordinary case and means "the current month".
61
+ */
62
+ const start = readDate(params, P_PERIOD_START);
63
+ const end = readDate(params, P_PERIOD_END);
64
+ if ((start && !end) || (!start && end)) {
65
+ return {
66
+ Success: false,
67
+ ResultCode: 'BAD_PERIOD',
68
+ Message: `Supply both ${P_PERIOD_START} and ${P_PERIOD_END}, or neither. One alone would have to be `
69
+ + 'paired with an invented boundary, and the snapshot would be filed against a period '
70
+ + 'nobody chose.',
71
+ };
72
+ }
73
+ const period = start && end ? { PeriodStart: start, PeriodEnd: end } : undefined;
74
+ const result = await RunForecastSnapshot(Metadata.Provider, params.ContextUser, new Date(), period);
75
+ setOutput(params, 'Measured', result.Measured);
76
+ setOutput(params, 'Written', result.Written);
77
+ setOutput(params, 'SkippedAsAlreadyCaptured', result.SkippedAsAlreadyCaptured);
78
+ setOutput(params, 'PeriodStart', result.Period?.PeriodStart ?? null);
79
+ setOutput(params, 'PeriodEnd', result.Period?.PeriodEnd ?? null);
80
+ setOutput(params, 'Issues', JSON.stringify(result.Issues));
81
+ /**
82
+ * NO SOURCE IS A SUCCESS, and says so. Until the forecast queries land there is nothing to read,
83
+ * and a daily job reporting failure for that would be red from the day it shipped — which is how a
84
+ * job log stops being read before it ever has anything to say.
85
+ */
86
+ if (!result.Period) {
87
+ return {
88
+ Success: true,
89
+ ResultCode: 'NO_SOURCE',
90
+ Message: 'No forecast source is registered, so nothing was captured. The chain is wired; the MJ '
91
+ + 'Queries it reads from do not exist yet.',
92
+ };
93
+ }
94
+ return {
95
+ Success: result.Success,
96
+ ResultCode: result.Success ? 'SUCCESS' : 'PARTIAL',
97
+ Message: `Period ${result.Period.PeriodStart} to ${result.Period.PeriodEnd}: measured `
98
+ + `${result.Measured}, wrote ${result.Written}, skipped `
99
+ + `${result.SkippedAsAlreadyCaptured} already captured today.`
100
+ + (result.Issues.length ? ` Issues: ${result.Issues.join(' | ')}` : ''),
101
+ };
102
+ }
103
+ };
104
+ CaptureForecastSnapshotAction = __decorate([
105
+ RegisterClass(BaseAction, 'Sales.CaptureForecastSnapshot')
106
+ ], CaptureForecastSnapshotAction);
107
+ export { CaptureForecastSnapshotAction };
108
+ /** Anti-tree-shaking anchor — see the note on `LoadSyncActivitiesAction`. */
109
+ export function LoadCaptureForecastSnapshotAction() {
110
+ void CaptureForecastSnapshotAction;
111
+ }
112
+ //# sourceMappingURL=forecast-snapshot.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forecast-snapshot.action.js","sourceRoot":"","sources":["../../src/custom/forecast-snapshot.action.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAuB,MAAM,yCAAyC,CAAC;AAEnG,MAAM,cAAc,GAAG,aAAa,CAAC;AACrC,MAAM,YAAY,GAAG,WAAW,CAAC;AAEjC,SAAS,SAAS,CAAC,MAAuB,EAAE,IAAY;IACpD,OAAO,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,KAAK,CAAC;AA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IS AN ACTION ────────────────────────────────────────────────────
5
+ *
6
+ * `ActivityWriterService` is the canonical composition: one `Activity`, N `ActivityLink` rows, one
7
+ * transaction, the deal's parties resolved, `LoggedByUserID` stamped. Its own header warned that if the
8
+ * composition also lived in the pane, "the ingest would grow its own copy, and the two would drift."
9
+ *
10
+ * They did. The pane wrote its own reduced version and **omitted `LoggedByUserID`**, which is NOT NULL
11
+ * with no default — so every attempt to log an activity from the UI failed at the database with a raw
12
+ * constraint error, for the whole life of the feature. It also saved the activity and its link as two
13
+ * independent statements, so a link failure left a committed activity no surface could reach.
14
+ *
15
+ * The fix is not to add the missing field to the pane. It is to delete the pane's copy, which is what
16
+ * this Action makes possible.
17
+ *
18
+ * ── AN ACTION, NOT A REMOTE OPERATION, AND THAT IS A CONSTRAINT NOT A PREFERENCE ────────────────
19
+ *
20
+ * A remote operation would read more naturally beside `Sales.CloseDeal`. But operation shells are
21
+ * CodeGen output, and CodeGen is not a tool this repository runs to close a gap — three partially-failed
22
+ * runs are recorded in `docs/CODEGEN-PARTIAL-RUNS.md`. An Action needs only a metadata row and a
23
+ * `@RegisterClass`, which is why the two scheduled jobs are Actions too.
24
+ *
25
+ * It is also genuinely callable from the browser: `GraphQLActionClient.RunAction(actionID, params)`, the
26
+ * same path MJ's own `interactive-form-apply.service.ts` uses. So the pane can reach the real
27
+ * composition without a transaction it cannot open and without a duplicate it will drift from.
28
+ *
29
+ * @module @mj-biz-apps/sales-server
30
+ */
31
+ import { BaseAction } from '@memberjunction/actions';
32
+ import type { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
33
+ export declare class LogActivityAction extends BaseAction {
34
+ protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
35
+ private log;
36
+ }
37
+ /** Anti-tree-shaking anchor — see the note on `LoadSyncActivitiesAction`. */
38
+ export declare function LoadLogActivityAction(): void;
39
+ //# sourceMappingURL=log-activity.action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-activity.action.d.ts","sourceRoot":"","sources":["../../src/custom/log-activity.action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAe,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAsCrG,qBACa,iBAAkB,SAAQ,UAAU;cAC7B,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;YAczE,GAAG;CAwFpB;AAED,6EAA6E;AAC7E,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C"}
@@ -0,0 +1,168 @@
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
+ /**
8
+ * @fileoverview `Sales.LogActivity` — the server side of S-US9's "log an activity" button.
9
+ *
10
+ * ── WHY THIS EXISTS, AND WHY IT IS AN ACTION ────────────────────────────────────────────────────
11
+ *
12
+ * `ActivityWriterService` is the canonical composition: one `Activity`, N `ActivityLink` rows, one
13
+ * transaction, the deal's parties resolved, `LoggedByUserID` stamped. Its own header warned that if the
14
+ * composition also lived in the pane, "the ingest would grow its own copy, and the two would drift."
15
+ *
16
+ * They did. The pane wrote its own reduced version and **omitted `LoggedByUserID`**, which is NOT NULL
17
+ * with no default — so every attempt to log an activity from the UI failed at the database with a raw
18
+ * constraint error, for the whole life of the feature. It also saved the activity and its link as two
19
+ * independent statements, so a link failure left a committed activity no surface could reach.
20
+ *
21
+ * The fix is not to add the missing field to the pane. It is to delete the pane's copy, which is what
22
+ * this Action makes possible.
23
+ *
24
+ * ── AN ACTION, NOT A REMOTE OPERATION, AND THAT IS A CONSTRAINT NOT A PREFERENCE ────────────────
25
+ *
26
+ * A remote operation would read more naturally beside `Sales.CloseDeal`. But operation shells are
27
+ * CodeGen output, and CodeGen is not a tool this repository runs to close a gap — three partially-failed
28
+ * runs are recorded in `docs/CODEGEN-PARTIAL-RUNS.md`. An Action needs only a metadata row and a
29
+ * `@RegisterClass`, which is why the two scheduled jobs are Actions too.
30
+ *
31
+ * It is also genuinely callable from the browser: `GraphQLActionClient.RunAction(actionID, params)`, the
32
+ * same path MJ's own `interactive-form-apply.service.ts` uses. So the pane can reach the real
33
+ * composition without a transaction it cannot open and without a duplicate it will drift from.
34
+ *
35
+ * @module @mj-biz-apps/sales-server
36
+ */
37
+ import { BaseAction } from '@memberjunction/actions';
38
+ import { Metadata } from '@memberjunction/core';
39
+ import { RegisterClass } from '@memberjunction/global';
40
+ import { ActivityWriterService } from '@mj-biz-apps/sales-core-entities-server';
41
+ const P_DEAL_ID = 'DealID';
42
+ const P_TYPE_CODE = 'TypeCode';
43
+ const P_TITLE = 'Title';
44
+ const P_NOTES = 'Notes';
45
+ const P_STARTED_AT = 'StartedAt';
46
+ /** The codes a person may log by hand. A meeting arrives from the calendar, not from this form. */
47
+ const LOGGABLE = ['Call', 'Meeting', 'Note', 'Email'];
48
+ function readParam(params, name) {
49
+ return params.Params?.find((p) => p.Name?.toLowerCase() === name.toLowerCase())?.Value;
50
+ }
51
+ function readText(params, name) {
52
+ const raw = readParam(params, name);
53
+ if (raw === null || raw === undefined) {
54
+ return null;
55
+ }
56
+ const s = String(raw).trim();
57
+ return s ? s : null;
58
+ }
59
+ function setOutput(params, name, value) {
60
+ const existing = params.Params?.find((p) => p.Name?.toLowerCase() === name.toLowerCase());
61
+ if (existing) {
62
+ existing.Value = value;
63
+ return;
64
+ }
65
+ params.Params = params.Params ?? [];
66
+ params.Params.push({ Name: name, Value: value, Type: 'Output' });
67
+ }
68
+ let LogActivityAction = class LogActivityAction extends BaseAction {
69
+ async InternalRunAction(params) {
70
+ try {
71
+ return await this.log(params);
72
+ }
73
+ catch (error) {
74
+ return {
75
+ Success: false,
76
+ ResultCode: 'ERROR',
77
+ Message: `The activity could not be logged: ${error instanceof Error ? error.message : String(error)}`,
78
+ };
79
+ }
80
+ }
81
+ async log(params) {
82
+ const dealID = readText(params, P_DEAL_ID);
83
+ const title = readText(params, P_TITLE);
84
+ const rawCode = readText(params, P_TYPE_CODE);
85
+ if (!dealID) {
86
+ return { Success: false, ResultCode: 'BAD_INPUT', Message: 'A deal is required.' };
87
+ }
88
+ if (!title) {
89
+ return { Success: false, ResultCode: 'BAD_INPUT', Message: 'A subject is required.' };
90
+ }
91
+ /**
92
+ * THE CODE IS VALIDATED AGAINST THE LOGGABLE SET, not passed through.
93
+ *
94
+ * A caller supplying `SMS` or an invented string would otherwise reach the writer's own lookup and
95
+ * come back "no ActivityType with Code 'X'", which reads like a missing seed rather than a bad
96
+ * request. Refusing here names the actual mistake, and keeps the browser from being the thing that
97
+ * decides what a person may log.
98
+ */
99
+ const code = LOGGABLE.find((c) => c === rawCode);
100
+ if (!code) {
101
+ return {
102
+ Success: false,
103
+ ResultCode: 'BAD_INPUT',
104
+ Message: `'${rawCode ?? '(none)'}' is not a loggable activity type. Expected one of: `
105
+ + `${LOGGABLE.join(', ')}.`,
106
+ };
107
+ }
108
+ /**
109
+ * A SUPPLIED TIME IS PARSED OR REFUSED, never defaulted quietly. Falling back to "now" for an
110
+ * unparseable value would file the activity at the wrong moment and put it in the wrong place on a
111
+ * timeline ordered by `StartedAt` -- with nothing to indicate it had been moved.
112
+ */
113
+ const rawStarted = readText(params, P_STARTED_AT);
114
+ let startedAt = new Date();
115
+ if (rawStarted) {
116
+ const parsed = new Date(rawStarted);
117
+ if (Number.isNaN(parsed.getTime())) {
118
+ return {
119
+ Success: false,
120
+ ResultCode: 'BAD_INPUT',
121
+ Message: `'${rawStarted}' is not a date/time this can read.`,
122
+ };
123
+ }
124
+ startedAt = parsed;
125
+ }
126
+ const result = await new ActivityWriterService().LogActivity({
127
+ DealID: dealID,
128
+ TypeCode: code,
129
+ Title: title,
130
+ Description: readText(params, P_NOTES),
131
+ StartedAt: startedAt,
132
+ Direction: 'Internal',
133
+ Status: 'Logged',
134
+ Source: 'Manual',
135
+ /**
136
+ * TRUE, which is the point of routing through the service. The deal's account and primary
137
+ * contact become participants -- "where relevant to the account and contact" (S-US9) -- and
138
+ * the pane's own version attached neither.
139
+ */
140
+ IncludeDealParties: true,
141
+ }, Metadata.Provider, params.ContextUser);
142
+ setOutput(params, 'ActivityID', result.ActivityID);
143
+ setOutput(params, 'LinkCount', result.LinkCount);
144
+ setOutput(params, 'Issues', JSON.stringify(result.Issues));
145
+ if (!result.Success) {
146
+ return {
147
+ Success: false,
148
+ ResultCode: 'REFUSED',
149
+ Message: result.Issues.join(' | ') || 'The activity could not be written.',
150
+ };
151
+ }
152
+ return {
153
+ Success: true,
154
+ ResultCode: 'SUCCESS',
155
+ Message: `Logged ${code} with ${result.LinkCount} link(s).`
156
+ + (result.Issues.length ? ` Notes: ${result.Issues.join(' | ')}` : ''),
157
+ };
158
+ }
159
+ };
160
+ LogActivityAction = __decorate([
161
+ RegisterClass(BaseAction, 'Sales.LogActivity')
162
+ ], LogActivityAction);
163
+ export { LogActivityAction };
164
+ /** Anti-tree-shaking anchor — see the note on `LoadSyncActivitiesAction`. */
165
+ export function LoadLogActivityAction() {
166
+ void LogActivityAction;
167
+ }
168
+ //# sourceMappingURL=log-activity.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-activity.action.js","sourceRoot":"","sources":["../../src/custom/log-activity.action.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB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W,CACrB,CAAC;QAEF,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;QACnD,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QACjD,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAE3D,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAClB,OAAO;gBACH,OAAO,EAAE,KAAK;gBACd,UAAU,EAAE,SAAS;gBACrB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,oCAAoC;aAC7E,CAAC;QACN,CAAC;QACD,OAAO;YACH,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,SAAS;YACrB,OAAO,EAAE,UAAU,IAAI,SAAS,MAAM,CAAC,SAAS,WAAW;kBACrD,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC7E,CAAC;IACN,CAAC;CACJ,CAAA;AAvGY,iBAAiB;IAD7B,aAAa,CAAC,UAAU,EAAE,mBAAmB,CAAC;GAClC,iBAAiB,CAuG7B;;AAED,6EAA6E;AAC7E,MAAM,UAAU,qBAAqB;IACjC,KAAK,iBAAiB,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @fileoverview `Sales.SyncActivities` — the MJ Action a `ScheduledJob` fires hourly.
3
+ *
4
+ * ── WHERE THIS LIVES, AND WHY NOT IN `packages/Actions` ─────────────────────────────────────────
5
+ *
6
+ * `packages/Actions` holds only CodeGen output. Orders puts its hand-written actions in
7
+ * `packages/Server/src/custom/*.action.ts` — `Orders.GenerateInvoice`, `Orders.SendDocument` — and this
8
+ * follows that exactly, because the alternative is a second convention for the same thing in the same
9
+ * workspace. Sales had no action of its own before this one, so there was nothing local to match.
10
+ *
11
+ * ── WHAT IT DOES, AND WHAT IT DELIBERATELY DOES NOT DECIDE ──────────────────────────────────────
12
+ *
13
+ * It calls `ActivitySyncJob.Run()` with whatever source factory is currently registered, and reports the
14
+ * tallies. It does NOT choose the source: that is `CurrentActivitySourceFactory()`, whose default is an
15
+ * empty fixture, and swapping it is the single change a scoped mailbox credential requires. An action
16
+ * that picked its own source would put that decision behind a metadata row nobody reads.
17
+ *
18
+ * @module @mj-biz-apps/sales-server
19
+ */
20
+ import { BaseAction } from '@memberjunction/actions';
21
+ import type { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
22
+ export declare class SyncActivitiesAction extends BaseAction {
23
+ /**
24
+ * AN ACTION MUST NOT THROW AT ITS CALLER. The scheduler, a workflow and a manual "run now" all want a
25
+ * result they can branch on; an exception loses the tallies from the mailboxes that did succeed. So
26
+ * the whole body runs behind this and every failure comes back as `Success: false` with a code.
27
+ */
28
+ protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
29
+ private sync;
30
+ }
31
+ /**
32
+ * WITHOUT THIS ANCHOR the class is tree-shaken out of the bundle, the `@RegisterClass` decorator never
33
+ * runs, and `ActionEngine` finds no implementation for `Sales.SyncActivities` — which surfaces as an
34
+ * action that exists in metadata, is scheduled, fires, and does nothing at all.
35
+ */
36
+ export declare function LoadSyncActivitiesAction(): void;
37
+ //# sourceMappingURL=sync-activities.action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-activities.action.d.ts","sourceRoot":"","sources":["../../src/custom/sync-activities.action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAe,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAyBrG,qBACa,oBAAqB,SAAQ,UAAU;IAChD;;;;OAIG;cACa,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;YAYzE,IAAI;CA+DrB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}